Interquartile Range Calculator
Calculate Q1, median, Q3 and the interquartile range of a data set
Quartiles use the median-of-halves method.
Interquartile range
How we calculated it
About the Interquartile Range Calculator
The interquartile range measures the spread of the middle 50% of a data set. It is the difference between the third quartile and first quartile and is less sensitive to extreme values than the full range.
IQR is commonly used with box plots and outlier rules because it focuses on the central half of the ordered data.
How to Use the Interquartile Range Calculator
- Enter the numerical data set.
- Calculate the first quartile Q1 and third quartile Q3.
- Subtract Q1 from Q3 to obtain the IQR.
- Use the same quartile convention when comparing results from different software.
How the Calculation Works
IQR = Q3 − Q1. The data are sorted, then quartiles are located using the calculator’s selected percentile or median-of-halves convention.
Potential outlier fences are often estimated as Q1−1.5×IQR and Q3+1.5×IQR, although that rule is a descriptive convention rather than proof that a value is erroneous.
Worked examples
Interquartile Range Calculator Worked Examples
Default
For 2, 4, 5, 7, 8, 10, 12, 15, Q1 is 4.5, the median is 7.5 and Q3 is 11, so the IQR is 6.5.
Odd count
For 1 to 7, Q1 is 2, the median is 4 and Q3 is 6, so the IQR is 4.
Outlier check
For 50, 52, 55, 60, 61, 63, 70, 90, the IQR is 13. The upper fence is 86, so 90 is flagged as a possible outlier.
Quartiles and IQR
Median-of-halves method.
| Data | Q1 | Median | Q3 | IQR |
|---|---|---|---|---|
| 2, 4, 5, 7, 8, 10, 12, 15 | 4.5 | 7.5 | 11 | 6.5 |
| 1, 2, 3, 4, 5, 6, 7 | 2 | 4 | 6 | 4 |
| 10, 20, 30, 40 | 15 | 25 | 35 | 20 |
| 3, 5, 7, 8, 12, 13, 14, 18, 21 | 6 | 12 | 16 | 10 |
| 1, 1, 2, 2, 3, 3, 100, 100 | 1.5 | 2.5 | 51.5 | 50 |
| 50, 52, 55, 60, 61, 63, 70, 90 | 53.5 | 60.5 | 66.5 | 13 |
How the calculator works
The data is sorted and split at the median. Q1 is the median of the lower half and Q3 is the median of the upper half. With an odd count, the middle value is left out of both halves. The interquartile range is Q3 − Q1, the spread of the middle 50% of the data. At least four values are needed.
Using the IQR
The IQR ignores the most extreme quarter at each end, so it is not distorted by outliers the way the range is. A common rule flags values below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR as possible outliers, which is how box plots draw their whiskers. Other quartile methods exist, so results may differ slightly from some software.
Common Mistakes
- Using the range. The range is distorted by extremes.
- Including the median in both halves. This method leaves it out for odd counts.
- Expecting all software to match. Quartile methods vary.
Result guide
Understanding Your Interquartile Range Calculator Result
A larger IQR means the central half of the data is more spread out. Extreme minimum or maximum values do not directly change the IQR unless they affect quartile positions.
Before you rely on the answer
Assumptions and Limitations
- The quartile convention is consistent.
- Values belong to one comparable data set.
- Outlier fences are descriptive thresholds, not automatic deletion rules.
Practical tip
Using This Result in Practice
Use IQR alongside a plot or ordered list. A flagged outlier may be a valid unusual observation rather than a data error.
Related calculations
Useful Calculations to Continue With
If you need a percentile other than the first or third quartile, use the Percentile Calculator.
If you want a spread measure that uses every value and is centered on the mean, use the Standard Deviation Calculator.
Common questions
Interquartile Range Calculator FAQ
What is the interquartile range?
Q3 − Q1, the spread of the middle half.
How do I find Q1?
The median of the lower half.
How are outliers found?
Below Q1 − 1.5 IQR or above Q3 + 1.5 IQR.
Why use IQR instead of SD?
It is resistant to outliers.
How many values do I need?
At least four.
