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.
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.
IQR lookup — IQR = Q₃ − Q₁
Rows are Q₃ values, columns are Q₁ values. Empty cells indicate invalid combinations (Q₃ < Q₁).
| Q₃ \ Q₁ | Q₁ = 0 | Q₁ = 25 | Q₁ = 50 | Q₁ = 75 | Q₁ = 100 | Q₁ = 500 |
|---|
Typical IQR Values by Domain
Representative examples to help calibrate the magnitude of the IQR for your data.
| Context | Typical Q₁ | Typical Q₃ | IQR | Notes |
|---|---|---|---|---|
| Exam scores (single class) | 72 | 88 | 16 | Consistent with σ ≈ 12 |
| Adult human height (mixed) | 1.62 m | 1.78 m | 0.16 m | IQR/4 ≈ σ |
| Daily temperature (temperate) | 14 °C | 22 °C | 8 °C | Across a summer month |
| Blood pressure (systolic, adults) | 110 mmHg | 130 mmHg | 20 mmHg | Clinical reference |
| Household income (US) | $45,000 | $115,000 | $70,000 | Right-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 g | 505 g | 10 g | Regulatory tolerance |
| Latency (network, ms) | 18 ms | 35 ms | 17 ms | Heavy-tailed distribution |
| Particle size (powder) | 12 µm | 38 µm | 26 µm | Span of the central 50 % |
| Patient wait time (ED) | 22 min | 75 min | 53 min | Targeting < 60 min |
| Sensor voltage noise | −0.01 V | +0.01 V | 0.02 V | Trimmed spread |
Variable Reference
| Symbol | Meaning | Typical range | Units |
|---|---|---|---|
| IQR | Interquartile range | 0 – 10⁶ | same as data |
| Q₁ | First quartile (25th percentile) | any real | same as data |
| Q₂ | Median (50th percentile) | any real | same as data |
| Q₃ | Third quartile (75th percentile) | any real | same as data |
| LFin | Lower inner fence = Q₁ − 1.5·IQR | any real | same as data |
| UFin | Upper inner fence = Q₃ + 1.5·IQR | any real | same as data |
| LFout | Lower outer fence = Q₁ − 3·IQR | any real | same as data |
| UFout | Upper outer fence = Q₃ + 3·IQR | any real | same as data |
| B | Bowley's quartile skewness | −1 to +1 | dimensionless |
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:
Rearranged to solve for the other two unknowns:
Q₁ = Q₃ − IQR
By convention the IQR is non-negative, which requires Q₃ ≥ Q₁. Two closely related quantities are used throughout statistics:
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:
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
| Symbol | Meaning | Notes |
|---|---|---|
| IQR | Interquartile range | Spread of the middle 50 %; robust to outliers |
| Q₁ | First quartile | 25th percentile; lower edge of the box |
| Q₂ | Median | 50th percentile; line inside the box |
| Q₃ | Third quartile | 75th percentile; upper edge of the box |
| LFin, UFin | Inner fences | Q₁ − 1.5·IQR and Q₃ + 1.5·IQR |
| LFout, UFout | Outer fences | Q₁ − 3·IQR and Q₃ + 3·IQR |
| B | Bowley'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
IQR = 80 − 60 = 20
Q₃ = 60 + 20 = 80
Q₁ = 80 − 20 = 60
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
Q₃ + 1.5·IQR = 78 + 66 = 144
Any value < −32 or > 144 is flagged as an outlier. 130 is not an outlier.
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.
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| Parameter | Value |
|---|---|
| Q1 | 25 |
| Q3 | 75 |
| Parameter | Value |
|---|---|
| Q1 | 15000 |
| Q3 | 35000 |
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
Related calculators · Descriptive Statistics
Recently updated formulas
Suggest an improvement
Found a mistake? Have a better example? Let us know.
You may send up to 3 suggestions per 24 hours.