Use commas, spaces, semicolons, or line breaks between numbers.
What is the interquartile range (IQR)?
The interquartile range is a measure of statistical spread. It tells you how wide the middle 50% of your data is. It is calculated as:
IQR = Q3 - Q1
- Q1 (first quartile): the 25th percentile
- Q2 (median): the 50th percentile
- Q3 (third quartile): the 75th percentile
Because it focuses on the middle half of values, IQR is less sensitive to extreme outliers than the full range.
How to use this interquartile range calculator
Step-by-step
- Paste your numbers into the input box.
- Click Calculate IQR.
- Review Q1, median (Q2), Q3, and IQR instantly.
- Use the fences to quickly identify potential outliers.
The calculator also displays a sorted version of your dataset, sample size, minimum/maximum values, and outlier thresholds.
Why IQR is useful
IQR is excellent when your data may contain very low or very high values that can distort other metrics. In finance, education, healthcare, and operations, IQR helps analysts summarize variability in a robust way.
- Resistant to outliers compared with range and standard deviation in skewed data.
- Easy to interpret: “How wide is the middle half of observations?”
- Great for box plots and quick distribution checks.
Outlier rule based on IQR
A common rule marks potential outliers using:
- Lower fence = Q1 - 1.5 × IQR
- Upper fence = Q3 + 1.5 × IQR
Any values below the lower fence or above the upper fence can be flagged as possible outliers. This is a screening rule, not an automatic reason to remove data.
Example
Suppose your sorted data is: 4, 7, 8, 12, 13, 15, 18, 21, 24. The median is 13. Lower half is 4, 7, 8, 12 and upper half is 15, 18, 21, 24. So Q1 = (7 + 8)/2 = 7.5, Q3 = (18 + 21)/2 = 19.5, and IQR = 12.
Frequently asked questions
Do I need sorted data?
No. The calculator sorts values automatically.
Can I enter decimals and negative numbers?
Yes. Decimal values and negative numbers are fully supported.
Why might quartiles differ from another calculator?
Different tools use different quartile conventions (inclusive, exclusive, interpolation methods). This tool uses the median-of-halves method, which is common in introductory statistics and box-plot workflows.