Enter up to 10 values to compute the first quartile (Q1), third quartile (Q3), and interquartile range (IQR = Q3 - Q1). The IQR measures the spread of the middle 50% of data.
The interquartile range (IQR) measures the spread of the middle 50% of data. It's the difference between the third quartile (Q3, 75th percentile) and first quartile (Q1, 25th percentile). Unlike standard deviation, which can be inflated by extreme values, the IQR is robust to outliers — making it the preferred spread measure for skewed distributions or data with extreme values.
This calculator returns Q1, Q3, and the IQR. The IQR is fundamental to box plots, outlier detection (1.5×IQR rule), and any analysis requiring a robust measure of variability. It's particularly useful for: - **Income data**: outliers (CEOs) don't dominate. - **Time-to-failure**: extreme values often present. - **Test scores**: middle students of interest. - **Manufacturing tolerances**: tracking process consistency.
IQR provides intuitive interpretation: half of all values fall between Q1 and Q3, covering the IQR width. A small IQR means tight clustering; a large IQR means wide variability. For comparing groups: similar medians but different IQRs reveals different consistency levels.
**Scenario:** Annual salaries: $35K, $40K, $45K, $50K, $55K, $60K, $65K, $200K (CEO). **Calculation:** Median = $52.5K. Q1 = $42.5K. Q3 = $62.5K. IQR = $20K. Outlier check: $62.5K + 30 = $92.5K. $200K is outlier. **Result:** Middle 50% of employees earn $42.5K-$62.5K. CEO at $200K is statistical outlier. IQR provides robust spread; standard deviation would be inflated by CEO salary.
**Scenario:** Part dimensions in mm: 49.8, 49.9, 50.0, 50.0, 50.1, 50.1, 50.2, 50.3. **Calculation:** Median = 50.05. Q1 = 49.95. Q3 = 50.15. IQR = 0.20. **Result:** Middle 50% of parts within 0.20mm range. Very tight tolerance. Process well-controlled. Specs allow ±0.50mm; current process exceeds requirements.
**Scenario:** Group A test scores: 70, 75, 80, 82, 85. Group B: 50, 70, 85, 95, 100. **Calculation:** A: Q1=72.5, Q3=83.5, IQR=11. B: Q1=60, Q3=97.5, IQR=37.5. **Result:** Group A more consistent (smaller IQR). Group B has wider spread despite similar medians. Educational implications: A more uniform performance; B has greater variability needing differentiated instruction.
**Use IQR for:**
- **Spread measurement** robust to outliers. - **Outlier detection** (1.5×IQR rule). - **Box plot construction**. - **Skewed distributions** where SD misleading. - **Comparing variability** across groups with outliers. - **Educational reporting** alongside median.
**IQR vs other spread measures:**
| Measure | Pros | Cons | |---|---|---| | IQR | Robust to outliers | Misses tail info | | SD | Standard, theoretical | Sensitive to outliers | | Range | Simple | Heavily affected by extremes | | Variance | Underlying SD | Same issues + units squared | | MAD | Very robust | Less familiar |
**Choose IQR when:**
- Data has outliers. - Distribution skewed. - Reporting alongside median. - Robust summary needed.
**Choose SD when:**
- Data approximately normal. - Theoretical work. - Confidence intervals. - Most statistical tests.
**Outlier identification rules:**
| Rule | Method | |---|---| | 1.5×IQR | Standard, Tukey | | 3×SD | Normal distribution | | 1% / 99% percentiles | Tail rule | | Modified z-score | More robust |
The 1.5×IQR is most common for general use.
**Common applications:**
- **Income / wealth data**: outliers common. - **Time data**: skewed distributions. - **Manufacturing**: process variation. - **Educational testing**: identifying extremes. - **Healthcare**: clinical measurements. - **Sports analytics**: performance ranges.
**Software:**
- **Excel**: QUARTILE.INC() for Q1, Q3. - **R**: quantile() function; IQR(). - **Python**: numpy.percentile(), scipy.stats.iqr(). - **SPSS**: Descriptive Statistics → Frequencies.
**Best practices:**
- Report median + IQR for skewed data. - Use mean + SD for normal data. - Always note sample size. - Investigate outliers before removing. - Compare with other measures.
**Limitations:**
- Doesn't use specific values (just ranks). - Ignores tail information. - Less efficient for normal data than SD. - Convention varies across software.
Calculate box plot statistics: min, Q1, median, Q3, and max from a data set.
Detect outliers in a data set using the IQR method.
Calculate population and sample standard deviation from a data set.
Find the percentile rank of a value in a data set.
Perform a z-test for hypothesis testing with a decision at your chosen significance level.
Calculate P(A|B) using Bayes theorem from P(B|A), P(A), and P(B).
IQR
13.5
Q1 (25th Percentile)
9.25
Q2 (Median)
17.5
Q3 (75th Percentile)
22.75
Lower Fence
-11
Upper Fence
43
Min
4
Max
30