Interquartile Range Calculator
Reviewed by CalcMulti Editorial Team·Last updated: ·← Statistics Hub
The interquartile range (IQR) measures the spread of the middle 50% of a dataset — the distance between the 75th percentile (Q3) and the 25th percentile (Q1). Unlike range, the IQR is resistant to outliers, making it the preferred spread measure for skewed distributions.
This calculator computes all quartiles, IQR, Tukey fence boundaries, and automatically identifies outliers using the standard 1.5×IQR rule. Paste any dataset to get a complete five-number summary.
Formula
IQR = Q3 − Q1 Lower fence = Q1 − 1.5 × IQR Upper fence = Q3 + 1.5 × IQR
- Q1
- 25th percentile — median of the lower half of the sorted data
- Q3
- 75th percentile — median of the upper half of the sorted data
- IQR
- interquartile range — spread of the central 50% of the data
- 1.5 × IQR
- Tukey's fence multiplier — values beyond fences are flagged as outliers
Accepts commas, spaces, semicolons, or newlines as separators. Min 4 values.
IQR vs Range vs Standard Deviation — When to Use Each
| Criterion | IQR | Range | Std Deviation |
|---|---|---|---|
| Outlier resistance | High — ignores extreme values | None — determined by extremes | Moderate — pulled by outliers |
| Best data shape | Skewed or unknown | Symmetric, no outliers | Symmetric, approximately normal |
| Used in | Box plots, exploratory analysis | Quality control, simple ranges | Hypothesis tests, CIs, z-scores |
| Meaningful for | Ordinal and interval data | Any numeric data | Interval and ratio data |
| Changes with n? | Stable (middle 50%) | Increases with n | Converges with n |
| For normal data | IQR ≈ 1.35 × SD | ≈ 4–6 × SD for n=50–200 | The primary metric |
Case Study: Software Engineer Salary Analysis
An HR analyst reviewed salary data for 120 software engineers at a mid-size tech company. The dataset had mean=$118K and SD=$34K — suggesting wide spread. But the SD was inflated by 4 staff with stock-based compensation over $280K.
After computing quartiles: Q1=$88K, Q2=$105K, Q3=$130K, IQR=$42K. Fences: lower=[$88K − $63K]=$25K, upper=[$130K + $63K]=$193K. The 4 high earners exceeded $193K and were flagged as outliers.
The analyst reported median $105K with IQR $42K to the compensation committee — correctly showing that 50% of engineers earned $88K–$130K. Using mean $118K (inflated by 4 outliers) would have misrepresented the typical engineer's pay by $13K, potentially skewing budget decisions and offer benchmarks.
Related Calculators
Full data range (max − min)
Percentile CalculatorQ1, Q2, Q3 are the 25th/50th/75th percentiles
Variance CalculatorStandard deviation-based spread
Coefficient of Variation CalculatorRelative spread metric
Mean CalculatorCentral tendency for comparison
Normal Distribution CalculatorIQR ≈ 1.35 × SD for normal data
Statistics HubAll statistics calculators & guides
Disclaimer
Quartile values may differ slightly from other tools depending on the calculation method. This calculator uses linear interpolation (consistent with R type 7 and scipy).