Five-Number Summary Calculator Explained

Tukey's five-number summary captures the centre, spread and tails of a dataset in five robust statistics — without any assumption about its distribution. This article spells out how the calculator computes Q1 and Q3, why different software gives different answers, how to read a box plot off the result, and when the summary beats the mean-and-standard-deviation pair.

#math#statistics#five-number-summary#quartiles#iqr#tukey#box-plot

What the five-number summary is

The five-number summary is the smallest set of descriptive statistics that captures the shape of a dataset: the minimum, the first quartile (Q1), the median, the third quartile (Q3), and the maximum. John Tukey introduced it in Exploratory Data Analysis (1977) as a compact way to describe a univariate sample without assuming any underlying distribution. Five numbers, no parametric assumptions, no formulas with Greek letters — and yet you can read the centre, the spread, the skew, and the tails off the summary at a glance.

The five-number summary calculator on this page takes any list of real numbers and returns Tukey's five statistics plus the interquartile range, the Tukey fences, and any outliers beyond them. This article explains what each of those numbers means, which quartile method the calculator uses (there are several), how to read a box plot off the result, and when the five-number summary outperforms the more familiar mean-and-standard-deviation pair.

How the five-number summary is calculated

Start by sorting the data ascending. The minimum and maximum are then trivial — the first and last entries. The median is the middle value: for a list of odd length, the single middle entry; for even length, the mean of the two middle entries. So for the dataset 1, 3, 4, 5, 5, 6, 7, 11 the median is (5 + 5) ÷ 2 = 5.

Q1 and Q3 require a choice. There are at least nine valid quantile definitions in mainstream statistical software (R catalogues them as Types 1 through 9); the two most common are the exclusive method — also called the Moore & McCabe method — and the inclusive method, sometimes called Tukey's hinges. The five-number summary calculator uses the exclusive method, which is the convention in OpenStax Introductory Statistics, Khan Academy, most US college textbooks, and Excel's QUARTILE.EXC function.

Under the exclusive method, you split the sorted data into a lower half and an upper half. If the count is even, the split sits between the two middle entries and each half has exactly half the data. If the count is odd, the median itself is excluded from each half so that the two halves are of equal size. Q1 is the median of the lower half and Q3 is the median of the upper half — same recipe as for the overall median, just applied twice more.

The inclusive method (Tukey's original) keeps the median in both halves when the count is odd. For even-length samples the two methods agree exactly. For odd-length samples they differ by a fraction, and the difference disappears as the sample grows. Neither is wrong; they are conventions. When you compare quartiles with a result reported elsewhere — a textbook answer key, a result from Excel, a number from R — always check which convention was used before assuming the calculator is broken.

Worked example

Take the dataset Tukey himself used as his canonical teaching example, the same eight values pre-loaded in the five-number summary calculator: 1, 3, 4, 5, 5, 6, 7, 11. The list is already sorted, so the minimum is 1 and the maximum is 11. The two middle values are both 5, so the median is 5.

The count is even (eight), so the lower half is 1, 3, 4, 5 and the upper half is 5, 6, 7, 11. Q1 is the median of 1, 3, 4, 5, which is (3 + 4) ÷ 2 = 3.5. Q3 is the median of 5, 6, 7, 11, which is (6 + 7) ÷ 2 = 6.5. The interquartile range is Q3 − Q1 = 3.0 and the full range is max − min = 10.

Tukey's 1.5·IQR fences sit at Q1 − 1.5·IQR = 3.5 − 4.5 = −1 and Q3 + 1.5·IQR = 6.5 + 4.5 = 11. The value 11 sits exactly on the upper fence — equal to it, not beyond — so the dataset has no Tukey outliers. The five-number summary, written compactly, is (1, 3.5, 5, 6.5, 11). On a box plot the box runs from 3.5 to 6.5 with a line at 5, and the whiskers reach out to 1 and 11.

Try an odd-length variant to see the exclusive rule in action. Drop the first 5 from the list to get 1, 3, 4, 5, 6, 7, 11 — seven values. The median is the fourth entry, 5. The lower half excludes the median, so it is 1, 3, 4. Q1 is the median of 1, 3, 4, which is 3. The upper half is 6, 7, 11. Q3 is the median of those, which is 7. The summary is now (1, 3, 5, 7, 11).

What each statistic tells you

Minimum and maximum

The two extremes give you the data range. Useful but not robust: a single typo or measurement glitch will swing one of them and inflate the range without telling you anything about the bulk of the values. That is why Tukey paired them with the quartiles — the box of the box plot stays put even when the whiskers wave around.

Median

The middle of the distribution, splitting the data into two halves of equal count. Unlike the arithmetic mean, the median is robust to outliers — a single billionaire dropped into a sample of incomes does not budge the median. For skewed distributions, the median is the more honest centre.

Q1 and Q3

The first and third quartiles cut off the bottom and top 25% of the data respectively. Together with the median (Q2), they divide the dataset into four roughly equal groups. The distance between them, the interquartile range, is the width of the middle half of the data — a robust spread measure that ignores the extreme tails entirely.

Interquartile range

IQR = Q3 − Q1. Like the median, the IQR is resistant to outliers: it is a function of the order statistics rather than the values themselves, so a single freak observation cannot wreck it. It is reported in the same units as the data, which makes it easy to interpret without unit conversions. For a normal distribution, the IQR equals roughly 1.349·σ, so you can convert between IQR and standard deviation in either direction if you know the data is normal.

Tukey fences and outliers

Tukey's 1.5·IQR rule defines an outlier as any value below Q1 − 1.5·IQR or above Q3 + 1.5·IQR. The thresholds are called the lower and upper fences. The rule is a heuristic, not a definition: it flags roughly 0.7% of values from a true normal distribution, which is usually low enough to be useful and high enough to catch genuine anomalies. Some texts also draw outer fences at 3·IQR for "extreme" outliers; this calculator only shows the standard 1.5·IQR fences.

How to read a box plot

A box plot is the picture of a five-number summary. The box runs from Q1 to Q3 with a line at the median. Whiskers extend out — in the original Tukey version, to the minimum and maximum; in the modern variant, to the most extreme values still inside the 1.5·IQR fences, with any outliers drawn as individual dots beyond. The box width is the IQR. The position of the median line inside the box hints at skew: if the median sits close to Q1, the data is right-skewed (a long tail on the high side); if it sits close to Q3, the data is left-skewed.

Side-by-side box plots are the single most useful comparison chart in exploratory data analysis. Plot income by region, exam scores by class, error rates by model — and the relative position of the boxes tells you whether the groups differ in centre, spread, or both, in a single glance. The five numbers compute instantly from any list you can paste into the five-number summary calculator; combine several runs and you have the data behind a comparative box plot in a few minutes.

Quartile method differences across software

Different software defaults trip up users every term. Excel's legacy QUARTILE and QUARTILE.INC use linear interpolation at position (n − 1)·p + 1. QUARTILE.EXC picks position (n + 1)·p and is roughly equivalent to the exclusive method this calculator uses. R's quantile() defaults to Type 7, matching Excel INC; for Moore & McCabe, pass type=6. NumPy's numpy.percentile defaults to method='linear' (same as R Type 7); pass method='exclusive' (NumPy 1.22+) to match the exclusive convention. SAS, SPSS and Stata each have their own defaults. The point: two statistical packages can both be correct and report different Q1 and Q3 on the same data — always check which convention is being used before treating a discrepancy as a bug.

When the five-number summary beats mean and standard deviation

For symmetric, bell-shaped data with no outliers, the mean and standard deviation are a sufficient summary — any other statistic is, in a precise information-theoretic sense, redundant. For everything else, the five-number summary is usually more honest.

Consider three cases. Income data: a long right tail of high earners drags the mean far above the median. Quoting average income makes the typical worker sound richer than they are; quoting the median plus the IQR tells a truer story. Website response times: most users get fast pages, but a few hit cache misses; the mean is sensitive to those tail cases in a way that hides what the typical user experiences. Test scores with a ceiling — many students hit 100% — compress the upper quartile and standard deviation, but the five-number summary shows the ceiling clearly via the gap between Q3 and the maximum.

The other advantage of the five-number summary is transparency. Anyone can re-derive it from the raw data with a sort and a couple of mental arithmetic steps — no "mean ± standard deviation, assuming normality" fine print. For standard deviation , reach for that separately when you need it.

Common mistakes

Reporting Q1 and Q3 without naming the method

Two analysts can hand you different quartile values on the same data and both be correct under their preferred convention. Always state which method you used (exclusive, inclusive, Excel INC, R Type 7, etc.) when reporting quartiles for reproducibility. The five-number summary calculator documents its choice — the exclusive / Moore & McCabe method — directly under each result.

Treating Tukey's rule as a definition of outlier

Tukey's 1.5·IQR fences are a useful screening heuristic, not a statistical definition. A value flagged by the rule is worth a second look — was it a typo, a measurement glitch, a sensor failure, or just an unusual but real observation? Outlier in this sense means "worth investigating" not "must be discarded." Deleting data because Tukey's rule flagged it without reading the context is how you lose the most interesting points in any dataset.

Using the IQR on tiny samples

The IQR is meaningful when you have, say, twenty or more values. For samples of size three or four the quartiles are heavily influenced by the exact positioning of one or two points and any of the nine quantile methods will give wildly different answers. For small samples, report the raw values instead — there is no virtue in compressing five numbers into five numbers.

How to report a five-number summary well

  • Pair it with a box plot. Five numbers is fine for a footnote; a box plot lets readers see skew, ceiling effects, and outliers at a glance.
  • Report n alongside. The summary alone does not tell you whether you are reading eight values or eight million.
  • Name the quartile convention. Write down whether Q1 and Q3 are exclusive, inclusive, R Type 7, or some other method.
  • Show outliers explicitly. Do not report "3 outliers detected" without the values — flagging is an invitation to look, not a count to hide.
  • Pair with the arithmetic mean for a skew read. Mean far above median means right skew; mean below median means left skew.

When to seek professional advice

The five-number summary is a description, not an inference. For confidence intervals on a quantile, hypothesis tests on whether two groups have different medians, or any analysis that generalises from sample to population, reach for a formal method — bootstrap intervals, Mann–Whitney, Kruskal–Wallis, or their parametric equivalents. A practising statistician can pick the right method for your study design; do not infer from a five-number summary alone for any decision that matters.

Frequently asked questions

Quick answers to the questions that come up most often about the five-number summary and the calculator on this page.

Why does the calculator give a different Q1 than Excel?

Excel's default QUARTILE and QUARTILE.INC use linear interpolation between order statistics, which is equivalent to R's Type 7 quantile. This calculator uses the exclusive / Moore & McCabe method, which matches Excel's QUARTILE.EXC. For even-length samples the methods often agree; for odd-length samples they typically differ by a fraction.

What if my dataset has only one or two values?

With one value, all five summary statistics collapse to that single number and the IQR and range are both zero. With two distinct values, the median is their average, Q1 equals the smaller value, and Q3 equals the larger. The calculator reports those degenerate cases honestly rather than refusing to return a number.

Are values exactly on the Tukey fence considered outliers?

No. The standard Tukey rule flags values strictly beyond Q1 − 1.5·IQR or Q3 + 1.5·IQR. A value exactly equal to a fence sits inside the rule. The calculator follows this convention — in the worked example above, the value 11 lies exactly on the upper fence and is not flagged.

Can I use the five-number summary for non-numeric data?

Only if the data has a meaningful order. The summary is well-defined for any ordinal scale — Likert ratings, T-shirt sizes, school grades — so long as you can sort the values. For nominal data (colours, brand names, country codes) there is no minimum or median; reach for a frequency table instead.

How does the five-number summary relate to percentiles?

Directly. The minimum is the 0th percentile, Q1 is the 25th percentile, the median is the 50th, Q3 is the 75th, and the maximum is the 100th. The summary is five named percentiles, evenly spaced. You can compute any other percentile from a list of values using the same exclusive method this calculator uses for the quartiles.

Does the calculator handle duplicate values?

Yes. Duplicates are included in the count and treated as separate observations. So 1, 1, 2, 3 has four values, not three; the median is (1 + 2) ÷ 2 = 1.5, and the lower half is 1, 1. Duplicates can pull Q1, Q3 and the median onto repeated values, which is the correct behaviour for any sample where the same observation can recur.

Related calculators

Frequently asked questions

What is the five-number summary?

Five statistics — minimum, first quartile (Q1), median, third quartile (Q3) and maximum — that John Tukey introduced in Exploratory Data Analysis (1977) to describe a univariate dataset without assuming any distribution. They divide the data into four roughly equal groups and capture centre, spread and tails in one compact summary. A box plot is the picture of a five-number summary.

Which quartile method does this calculator use?

The exclusive / Moore & McCabe method. For odd-length samples, the median is excluded from both halves before each half's median is taken. This is the convention used in OpenStax Introductory Statistics, Khan Academy, most US college textbooks, and Excel's QUARTILE.EXC function. Other valid methods include Tukey's hinges (median included), Excel QUARTILE.INC / R Type 7 (linear interpolation), and seven more in R's quantile() function.

Why does Excel give a different Q1 than this calculator?

Excel's default QUARTILE and QUARTILE.INC use linear interpolation between order statistics, equivalent to R's Type 7 quantile. This calculator uses the exclusive method, matching Excel's QUARTILE.EXC. For even-length samples the methods often agree; for odd-length samples they differ by a small amount that disappears as the sample grows.

What does the interquartile range tell me?

The IQR is Q3 − Q1, the width of the middle half of the data. It is a robust measure of spread: unlike the range (max − min), it ignores both tails, so a single extreme value cannot change it. For a normal distribution, the IQR equals roughly 1.349·σ. The IQR is also the box width on a box plot and the basis for Tukey's outlier rule.

How does the calculator decide what counts as an outlier?

It uses Tukey's 1.5·IQR rule: any value strictly below Q1 − 1.5·IQR or strictly above Q3 + 1.5·IQR is flagged. The thresholds are called the lower and upper fences. The rule flags roughly 0.7% of values from a true normal distribution. Values exactly equal to a fence are not flagged. The rule is a heuristic, not a definition — a flagged value is worth investigating, not necessarily discarding.

What if my dataset has only one or two values?

With one value, all five summary statistics collapse to that single number and the IQR and range are both zero. With two distinct values, the median is their average, Q1 equals the smaller value, and Q3 equals the larger. The calculator reports those degenerate cases honestly rather than refusing to return a number.

How does the five-number summary relate to percentiles?

Directly. The minimum is the 0th percentile, Q1 is the 25th, the median is the 50th, Q3 is the 75th, and the maximum is the 100th. The summary is five named percentiles, evenly spaced. Any other percentile can be computed from a list of values using the same exclusive method this calculator applies to the quartiles.

Can I use the five-number summary for non-numeric data?

Only if the data has a meaningful order. The summary is well-defined for any ordinal scale — Likert ratings, T-shirt sizes, school grades — so long as the values can be sorted. For nominal data (colours, brand names, country codes) there is no minimum or median; reach for a frequency table instead.

Informational only. Not personalised financial, legal, or tax advice.