IQR Calculator: Interquartile Range (Q1, Q3)
Find the Interquartile Range, Q1, Q3, and median.
Interquartile Range (IQR)
Calculate interquartile range and quartile values
Quick Tips
- • IQR = Q3 - Q1 (middle 50% of data)
- • Q1: 25th percentile, Q3: 75th percentile
- • Used to identify outliers in data
- • Outliers are often below Q1-1.5×IQR or above Q3+1.5×IQR
What is IQR?
Interquartile Range (IQR) measures how spread out the middle 50% of your data is.
It focuses on the center of the dataset, so it’s much less sensitive to outliers than range or standard deviation.
Key Formulas
IQR = Q3 − Q1
Q1 = first quartile (25th percentile)
Q2 = median (50th percentile)
Q3 = third quartile (75th percentile)
What Each Quartile Means
| Statistic | Meaning | Percent of data below it |
|---|---|---|
| Q1 | Lower quartile | 25% |
| Q2 (Median) | Middle value | 50% |
| Q3 | Upper quartile | 75% |
| IQR | Middle spread (Q3 − Q1) | Covers middle 50% |
How to Calculate IQR (Step-by-Step)
- 1Sort the data from smallest to largest.
- 2Find the median (Q2).
- 3Split the data into a lower half and an upper half.
- 4Find the median of the lower half → Q1.
- 5Find the median of the upper half → Q3.
- 6Compute IQR = Q3 − Q1.
Important: There are multiple quartile conventions (inclusive vs exclusive methods). That means Q1 and Q3 can differ slightly between calculators. This tool uses a consistent median-of-halves method so results are stable and explainable.
Worked Example (Even Count)
| Dataset | Q1 | Median (Q2) | Q3 | IQR |
|---|---|---|---|---|
| 1, 2, 3, 4, 5, 6, 7, 8 | 2.5 | 4.5 | 6.5 | 4 |
Worked Example (Odd Count)
| Dataset | Q1 | Median (Q2) | Q3 | IQR |
|---|---|---|---|---|
| 1, 2, 3, 4, 5, 6, 7 | 2 | 4 | 6 | 4 |
Outlier Detection (1.5×IQR Rule)
IQR is often used to detect outliers with the box plot rule:
- Lower fence = Q1 − 1.5 × IQR
- Upper fence = Q3 + 1.5 × IQR
Values outside these fences are commonly treated as outliers.
Box Plot Intuition (Q1, Median, Q3, IQR)
When IQR is More Useful Than Standard Deviation
- When your data has extreme outliers
- When your distribution is skewed (not symmetric)
- When you want a robust measure of spread (middle-focused)
- When building a box plot summary
IQR Calculator FAQs
What does IQR tell you in simple words?
It tells you how spread out the middle half of your data is, ignoring extreme values.
Is IQR affected by outliers?
Much less than range or standard deviation, because it only uses Q1 and Q3 (middle 50%).
Can IQR be 0?
Yes. If many values are the same and Q1 equals Q3, then IQR becomes 0.
Why do different calculators give different Q1 and Q3?
Because quartile calculation has multiple conventions (inclusive/exclusive percentile methods). Small differences are normal.
What is the 1.5×IQR rule?
It’s a common rule to flag outliers: values below Q1 − 1.5×IQR or above Q3 + 1.5×IQR.
Does the calculator support decimals and negative numbers?
Yes. Quartiles and IQR work normally with negative values and decimals.
