Home / Statistics & Probability / Descriptive Statistics / Interquartile Range (IQR)

Formula & Calculator

Interquartile Range (IQR)

The interquartile range (IQR) is the spread of the middle 50% of the data. It is the third quartile (75th percentile) minus the first quartile (25th percentile). Because it ignores the lowest and highest 25% of values, the IQR is not affected by extreme outliers. For example, in income data, the IQR tells you the range of incomes for the middle half of the population. It is often used in box plots and robust statistics.

Statistics Descriptive Statistics Spread
VORZEP · DESCRIPTIVE STATISTICS & OUTLIER TOOLS

Interquartile Range Calculator

Solve the classic IQR relation IQR = Q₃ − Q₁ for any of its three unknowns — interquartile range, third quartile, or first quartile — with step-by-step math, a live box-plot schematic, and a dataset analyzer that computes all five-number summary values plus outlier fences under the 1.5×IQR rule.

IQR = Q₃ − Q₁
Solve for
Interquartile Range (IQR) The spread of the middle 50 % of the data, from the 25th percentile (Q₁) to the 75th percentile (Q₃). Unlike the full range, the IQR ignores the highest and lowest quarters of the data, making it robust to outliers. It is the standard measure of dispersion for box plots and the basis of Tukey's 1.5×IQR outlier rule. Always non-negative.
units
IQR must be ≥ 0. Use Q₃ ≥ Q₁.
= 20.000 units · inner fences: Q₁ − 1.5·IQR, Q₃ + 1.5·IQR
Third Quartile (Q₃) The 75th percentile — the value below which 75 % of the data fall. Also called the upper quartile. In a box plot, Q₃ is the top edge of the box. Together with Q₁ and the median (Q₂ = the 50th percentile), Q₃ completes the three quartiles that summarise the shape of the distribution. Computing method matters: this calculator supports the standard methods (see FAQ).
units
Q₃ must be a finite number.
= Q₃ = 80.000 · upper inner fence = — · upper outer fence = —
First Quartile (Q₁) The 25th percentile — the value below which 25 % of the data fall. Also called the lower quartile. In a box plot, Q₁ is the bottom edge of the box. The distance from Q₁ to Q₃ is the IQR. Because the IQR discards the outer quarters of the data, it remains stable when a few extreme values are present, making it the preferred spread measure for skewed or heavy-tailed data.
units
Q₁ must be a finite number.
= Q₁ = 60.000 · lower inner fence = — · lower outer fence = —
Median (Q₂) — optional The sample median (50th percentile). Not required to compute the IQR, but used here for derived statistics including quartile skewness (Bowley's measure) and the lower/upper quartile asymmetry. Enter 0 if you do not have a median value.
units
Median must be a finite number.
= Q₂ = 70.000 · Bowley skewness = —
INTERQUARTILE RANGE (IQR)
20.000 units
Q₁ = 60 · Q₃ = 80 · median = 70 · inner fences [30, 110]
MODERATE SPREAD — IQR IN THE TENS
IQR = Q₃ − Q₁
Step-by-step solution
Five-number summary on a number line
IQR box (Q₁ to Q₃) Median Inner fences (1.5×IQR)
Quartile comparison — Q₁, median, Q₃ & IQR
Q₁ Median (Q₂) Q₃ IQR
Sensitivity
Companion outlier & skewness metrics
Box plot & outlier fences — live schematic
BOX PLOT · IQR = Q₃ − Q₁ · OUTLIER FENCES = Q₁ − 1.5·IQR, Q₃ + 1.5·IQR Q₁ Q₃ Q₂ low fence high fence IQR Q₁ = 60 Q₂ = 70 Q₃ = 80 IQR = 80 − 60 = 20
Box: Q₁ to Q₃ (the middle 50 % of data) Median Q₂ — line inside the box Inner fences at Q₁ − 1.5·IQR and Q₃ + 1.5·IQR
Whiskers extend to the most extreme data points still inside the fences. Any value beyond the fences is flagged as an outlier under Tukey's 1.5×IQR rule.
What the interquartile range really measures
IQRspread of middle 50 %
=
Q₃75th percentile
−
Q₁25th percentile

Robust to outliers and skew

Unlike the range (which uses only the two extremes) or the standard deviation (which squares every deviation), the IQR captures the spread of the middle 50 % of the data. This makes it insensitive to a handful of extreme values: even if the highest 25 % and lowest 25 % of the data are arbitrarily replaced with wild numbers, the IQR stays the same, because it depends only on Q₁ and Q₃. This is why the IQR is the standard measure of spread for box plots and the foundation of Tukey's outlier detection method.

The basis of the box plot

The five-number summary — min, Q₁, median, Q₃, max — is the standard graphical summary of a dataset, and the box plot draws it directly: a box from Q₁ to Q₃, a line at the median, and whiskers extending to the most extreme values inside the fences. The IQR is the height of the box, so a box plot communicates IQR visually without any numeric annotation. Side-by-side box plots make it easy to compare the median and IQR of several groups at a glance.

Tukey's 1.5×IQR outlier rule

The most widely used non-parametric outlier rule flags any value outside the inner fences Q₁ − 1.5·IQR and Q₃ + 1.5·IQR as a suspected outlier. Values outside the outer fences Q₁ − 3·IQR and Q₃ + 3·IQR are sometimes labelled extreme outliers. The 1.5 constant is not magic — it was chosen by John Tukey to give roughly the right balance for normal data (about 0.7 % of normal data falls outside the fences) while remaining sensitive to genuine contamination. Under a perfectly normal distribution, the fences correspond to about ±2.7 standard deviations from the mean.

Quartile skewness (Bowley's measure)

The IQR enables a robust measure of asymmetry: Bowley's quartile skewness B = (Q₃ + Q₁ − 2·Q₂) / (Q₃ − Q₁). It is bounded in [−1, 1], equals zero for symmetric distributions, and is not affected by outliers because it uses only the three quartiles. A positive B means the data are right-skewed (Q₃ is farther above the median than Q₁ is below it); negative B means left-skewed. This is a much more robust way to assess skewness than the classical moment-based measure, which is dominated by extreme values.

How to Use This Calculator

The IQR formula links three quantities: IQR, Q₃ and Q₁. Pick which one you want the tool to solve, then fill in the other two. The optional median Q₂ unlocks Bowley's skewness and the quartile asymmetry metric.

1. Choose what to solve for

Pick IQR, Q₃ or Q₁ from the toggle. The calculator rearranges IQR = Q₃ − Q₁ for whichever quantity you select, using direct algebra in every case.

2. Use realistic presets

IQR presets span 1 to 200 units. Q₃ and Q₁ presets cover 10 to 500, giving you a fast way to model typical box plots for exam scores, temperature, or financial data.

3. Match units carefully

All four quantities — IQR, Q₃, Q₁ and the optional median — share the same units as the underlying data (points, °C, dollars, etc.). Sliders are linear from 0 to 20,000 so you can dial in either small or large values.

4. Read the result and verdict

The result card shows the solved value plus derived equivalents — Q₁, Q₃, median, inner fences, outer fences, and Bowley skewness when a median is provided. A colour-coded badge classifies the spread from negligible to extreme.

5. Check the schematic and charts

The schematic is a full box plot with the box, median line, fences and whiskers marked. The result-card chart plots the whole five-number summary on a number line; the advanced chart compares Q₁, median, Q₃ and IQR as separate bars.

6. Analyse a dataset

Scroll to the dataset analyzer, paste any comma- or space-separated numbers, and the tool computes all five-number summary values, the IQR, the inner and outer fences, and any outliers under the 1.5×IQR rule.

What This Tool Offers

Built around the classic IQR relation, the robust measure of spread at the heart of box plots and outlier detection.

Three-way solving

Solve for IQR, Q₃ or Q₁. Each rearrangement is direct algebra from IQR = Q₃ − Q₁ — no numerical methods needed.

Live box-plot schematic

A full box plot with the box drawn from Q₁ to Q₃, the median line inside it, whiskers extending to the fence-adjacent extremes, and inner fences as dashed verticals.

Spread-class verdict

Each result is classified from negligible (IQR < 1) through moderate and large to extreme (IQR > 10,000), with a colour-coded badge.

Two comparison charts

A five-number-summary number line with the IQR box and fence markers, plus an advanced bar chart comparing Q₁, median, Q₃ and IQR side by side.

Full dataset analyzer

Paste any list of numbers and the tool computes the five-number summary, IQR, inner fences, outer fences, and any outliers under Tukey's rule.

Reference tables

Typical IQR values by domain, a dynamic IQR lookup grid, and a full variable reference table with formula notes.

Dataset Analyzer & Reference Tables

Paste a list of numbers to compute the IQR and detect outliers, or use the lookup grid to see how IQR varies with Q₃ and Q₁.

Quick dataset analyzer — IQR and outlier detection

Enter any comma-, space-, or newline-separated numbers. The tool returns the five-number summary, IQR, inner and outer fences, and any values flagged as outliers under Tukey's 1.5×IQR rule. Non-numeric tokens are ignored.

Paste numbers above and click Analyze to compute the IQR.

IQR lookup — IQR = Q₃ − Q₁

Rows are Q₃ values, columns are Q₁ values. Empty cells indicate invalid combinations (Q₃ < Q₁).

Q₃ \ Q₁Q₁ = 0Q₁ = 25Q₁ = 50Q₁ = 75Q₁ = 100Q₁ = 500

Typical IQR Values by Domain

Representative examples to help calibrate the magnitude of the IQR for your data.

ContextTypical Q₁Typical Q₃IQRNotes
Exam scores (single class)728816Consistent with σ ≈ 12
Adult human height (mixed)1.62 m1.78 m0.16 mIQR/4 ≈ σ
Daily temperature (temperate)14 °C22 °C8 °CAcross a summer month
Blood pressure (systolic, adults)110 mmHg130 mmHg20 mmHgClinical reference
Household income (US)$45,000$115,000$70,000Right-skewed; IQR still informative
Daily stock return (S&P 500)−0.4 %+0.5 %0.9 %Robust to extreme days
Reaction yield (batch)82 %93 %11 %Process control
Batch weight (food packaging)495 g505 g10 gRegulatory tolerance
Latency (network, ms)18 ms35 ms17 msHeavy-tailed distribution
Particle size (powder)12 µm38 µm26 µmSpan of the central 50 %
Patient wait time (ED)22 min75 min53 minTargeting < 60 min
Sensor voltage noise−0.01 V+0.01 V0.02 VTrimmed spread

Variable Reference

SymbolMeaningTypical rangeUnits
IQRInterquartile range0 – 10⁶same as data
Q₁First quartile (25th percentile)any realsame as data
Q₂Median (50th percentile)any realsame as data
Q₃Third quartile (75th percentile)any realsame as data
LFinLower inner fence = Q₁ − 1.5·IQRany realsame as data
UFinUpper inner fence = Q₃ + 1.5·IQRany realsame as data
LFoutLower outer fence = Q₁ − 3·IQRany realsame as data
UFoutUpper outer fence = Q₃ + 3·IQRany realsame as data
BBowley's quartile skewness−1 to +1dimensionless

What Does IQR = Q₃ − Q₁ Measure?

The interquartile range is the distance between the 75th percentile and the 25th percentile of a dataset. It answers the question: how spread out is the middle 50 % of my data? Unlike the range, which uses only the two extreme values, and unlike the standard deviation, which squares every deviation from the mean, the IQR depends only on two well-chosen percentiles that are themselves robust to outliers. This makes the IQR the standard spread measure for skewed distributions and the basis of box plots and Tukey's outlier detection rule.

Interquartile Range Formula

The defining relationship is:

IQR = Q₃ − Q₁

Rearranged to solve for the other two unknowns:

Q₃ = Q₁ + IQR
Q₁ = Q₃ − IQR

By convention the IQR is non-negative, which requires Q₃ ≥ Q₁. Two closely related quantities are used throughout statistics:

Lower inner fence = Q₁ − 1.5·IQR
Upper inner fence = Q₃ + 1.5·IQR
Lower outer fence = Q₁ − 3·IQR
Upper outer fence = Q₃ + 3·IQR

Any value outside the inner fences is flagged as a suspected outlier (Tukey's rule); values outside the outer fences are usually labelled extreme outliers. A robust measure of skewness also follows directly from the quartiles:

Bowley skewness B = (Q₃ + Q₁ − 2·Q₂) / (Q₃ − Q₁)

The quantity B lies in [−1, 1], equals 0 for symmetric data, and is not sensitive to outliers because it uses only the three quartiles.

Interquartile Range Variables

SymbolMeaningNotes
IQRInterquartile rangeSpread of the middle 50 %; robust to outliers
Q₁First quartile25th percentile; lower edge of the box
Q₂Median50th percentile; line inside the box
Q₃Third quartile75th percentile; upper edge of the box
LFin, UFinInner fencesQ₁ − 1.5·IQR and Q₃ + 1.5·IQR
LFout, UFoutOuter fencesQ₁ − 3·IQR and Q₃ + 3·IQR
BBowley's quartile skewness(Q₃ + Q₁ − 2·Q₂)/IQR; in [−1, 1]

How Each Variable Affects the IQR

The IQR is linear in Q₁ and Q₃ with opposite signs: increasing Q₃ by 1 increases the IQR by 1; increasing Q₁ by 1 decreases it by 1. The two effects are independent — the IQR responds additively and separately to each quartile. This makes sensitivity analysis trivial, and it is why the IQR is so easy to interpret. It is also why the IQR is unaffected by any change to the data outside the middle 50 %: replacing the smallest value with −10⁹ or the largest with +10⁹ does not move Q₁ or Q₃ and therefore does not change the IQR at all.

In practice, the IQR is best interpreted alongside the median. A common rule of thumb is that for roughly normal data, σ ≈ IQR/1.35, so the IQR gives a rough robust estimate of the standard deviation. For skewed distributions this equivalence breaks down, and the IQR itself becomes the more useful summary. When reporting, it is standard practice to quote the median and IQR together — for example, "median wait time 40 minutes (IQR 22–75 minutes)" — because the pair gives a robust picture of both the centre and the spread of the data, especially when outliers or skew are present.

IQR Calculation Examples

Given: Q₁ = 60, Q₃ = 80 — solve for IQR
IQR = 80 − 60 = 20
Given: Q₁ = 60, IQR = 20 — solve for Q₃
Q₃ = 60 + 20 = 80
Given: Q₃ = 80, IQR = 20 — solve for Q₁
Q₁ = 80 − 20 = 60
Dataset: {12, 45, 78, 23, 56, 89, 34, 67, 90, 11, 55, 63, 41, 72, 130}
Sorted: {11, 12, 23, 34, 41, 45, 55, 56, 63, 67, 72, 78, 89, 90, 130}
Q₁ = 34, Q₂ = 56, Q₃ = 78
IQR = 78 − 34 = 44
Outlier fences for the above: Q₁ − 1.5·IQR = 34 − 66 = −32
Q₃ + 1.5·IQR = 78 + 66 = 144
Any value < −32 or > 144 is flagged as an outlier. 130 is not an outlier.
Bowley skewness: (78 + 34 − 2·56) / 44 = 0 / 44 = 0.000 — perfectly symmetric at the quartiles.

Frequently Asked Questions

Because the IQR is robust to outliers while the range is not. The range uses only the two most extreme values, so a single bad measurement can double it. The IQR uses Q₁ and Q₃, which are determined by where 25 % and 75 % of the data lie — replacing the extreme 25 % of values with arbitrary numbers will not change them at all. This makes the IQR a stable measure of spread even when the data contain contamination, measurement errors, or genuinely heavy tails. For skewed data (income, latency, particle size) the IQR is almost always the more informative measure, and it is the standard used in box plots and robust statistical summaries.

There are several conventions, and they can give slightly different values for small samples. The three commonest methods are: (1) Tukey's hinges, where the median splits the sorted data into two halves and Q₁ and Q₃ are the medians of the lower and upper halves (inclusive or exclusive of the median depending on n); (2) the linear interpolation method, where Q₁ is the value at position 1 + (n − 1)/4 in the sorted data and Q₃ is at position 1 + 3(n − 1)/4, with linear interpolation between adjacent order statistics; (3) the nearest-rank method. All methods agree for large samples and usually agree closely for small ones. The dataset analyzer above uses the linear interpolation method, which matches the default in most statistical software and in spreadsheet programs like Excel, R, and Python's numpy.

The 1.5 multiplier was chosen by John Tukey, the inventor of the box plot, as a good balance between sensitivity and specificity. Under a perfectly normal distribution, the inner fences Q₁ − 1.5·IQR and Q₃ + 1.5·IQR correspond roughly to ±2.7 standard deviations from the mean, and about 0.7 % of the data falls outside them. Increasing the multiplier to 3.0 (the outer fences) makes the rule much more conservative — for normal data, only about 0.0002 % of values fall outside. The 1.5 rule is a convention, not a law: some fields use 2.0 or 3.0, and any value flagged by the rule should be investigated, not automatically removed. The rule is a screening tool, not a statistical test.

For a normal distribution, the IQR is approximately 1.35 times the standard deviation: IQR ≈ 1.35·σ, or equivalently σ ≈ IQR/1.35. This gives a quick robust estimate of σ from the quartiles when you suspect outliers may have inflated the sample standard deviation. For skewed distributions the relationship breaks down: right-skewed distributions (income, latency) have an IQR that underestimates σ relative to the normal case, and left-skewed distributions have the opposite. Both measures are useful — σ for mathematical tractability and inferential tests, IQR for robust description and outlier detection.

Bowley's measure is B = (Q₃ + Q₁ − 2·Q₂)/(Q₃ − Q₁). It measures the asymmetry of the distribution using only the three quartiles. B = 0 means the data are symmetric around the median at the quartile level; B > 0 means the upper half is more spread out than the lower half (right-skewed); B < 0 means left-skewed. Because it uses the median and quartiles rather than the mean and standard deviation, Bowley's measure is robust to outliers — a single extreme value cannot push it out of the [−1, 1] interval. It is a useful companion to the classical moment-based skewness, especially for small samples or heavy-tailed data.

No. By definition, Q₁ is the 25th percentile and Q₃ is the 75th percentile of the same dataset, so Q₃ ≥ Q₁ always, which means IQR = Q₃ − Q₁ ≥ 0. If you compute a negative IQR, you have either mislabelled the quartiles or you are working with a sample that is too small to define quartiles reliably. The calculator flags this case as invalid. When IQR = 0, the middle 50 % of the data all share the same value — this happens with heavily discretised data (e.g., integer ratings) or very small samples.

Use the IQR when your data are skewed, contain outliers, or are measured on an ordinal scale. Use the standard deviation when your data are roughly normal, outlier-free, and you need to perform inferential tests (t-tests, ANOVAs, regression) — those methods all rest on the mean and standard deviation, not on the quartiles. In exploratory analysis, report both: "The wait times had a median of 40 minutes (IQR 22–75) and a mean of 55 minutes (SD 48)". When the mean and median diverge, or when the IQR and standard deviation give very different impressions of spread, that itself is informative — it signals skewness or outliers that merit closer inspection.

Calculating...

Variables

Symbol Quantity Unit
IQR Interquartile range
Q3 Third quartile (75th percentile)
Q1 First quartile (25th percentile)

What it means

The interquartile range (IQR) is the difference between the third quartile (Q3, 75th percentile) and the first quartile (Q1, 25th percentile). It represents the spread of the central 50% of the data and is a robust measure of dispersion that is not influenced by outliers. The IQR is used to construct boxplots, to identify outliers (data points beyond 1.5×IQR from the quartiles), and to compare variability across groups. It is also used in non‑parametric statistics. Understanding the IQR is important for exploring data and for selecting appropriate measures of spread when the data are skewed or contain outliers.

Worked example

Interquartile Range – Two Examples

Real‑World
Scenario: A dataset has Q1=25 and Q3=75. Find the IQR.
ParameterValue
Q125
Q375
1IQR = 75 − 25 = 50
Result 50 ✓ Spread of middle 50%
Scenario: For household incomes, Q1=$15,000 and Q3=$35,000. Find IQR.
ParameterValue
Q115000
Q335000
1IQR = 35000 − 15000 = 20000
Result $20,000 ✓ Middle 50% spread
Insight: IQR measures the spread of the middle 50% and is robust to outliers. Used in box plots and outlier detection (1.5×IQR).

Common mistakes

  • Quartiles: Q1 (25th percentile) and Q3 (75th percentile) – different methods may give slightly different values.
  • Ordering: Data must be sorted before calculating quartiles.
  • IQR: Is a measure of spread – resistant to outliers.
  • Outlier detection: Values below Q1 − 1.5·IQR or above Q3 + 1.5·IQR are often considered outliers.
  • Units: IQR has the same units as the data.

Applications

The interquartile range (IQR) is the difference between the third and first quartiles, covering the middle 50% of the data. It is a robust measure of spread, unaffected by outliers. Engineers use IQR to identify outliers, to describe skewed distributions, and to construct box plots. In quality control, it helps assess process dispersion. In healthcare, it summarises patient data with extreme values. By using IQR, professionals can focus on the central bulk of the data, reducing the influence of extreme observations. It is often combined with the median to provide a robust summary. Understanding IQR is crucial for exploratory data analysis and for communicating data variability in a clear, interpretable manner.

  • Identification of outliers in datasets
  • Exploratory data analysis and box plot construction
  • Healthcare and clinical data summarisation
  • Quality control – robust process dispersion measure
  • Educational assessment – distribution of scores