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

CriterionIQRRangeStd Deviation
Outlier resistanceHigh — ignores extreme valuesNone — determined by extremesModerate — pulled by outliers
Best data shapeSkewed or unknownSymmetric, no outliersSymmetric, approximately normal
Used inBox plots, exploratory analysisQuality control, simple rangesHypothesis tests, CIs, z-scores
Meaningful forOrdinal and interval dataAny numeric dataInterval and ratio data
Changes with n?Stable (middle 50%)Increases with nConverges with n
For normal dataIQR ≈ 1.35 × SD≈ 4–6 × SD for n=50–200The 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.

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).

Frequently Asked Questions