Audited 27 Jul 2026·Last updated 27 Jul 2026·4 citations·Tier 2·0 uses

Quartile Calculator

Free quartile calculator: paste your dataset and get Q1, Q2 (median), Q3, and the IQR, with the interpolation method stated so you know the convention used.

Quartile Calculator

Comma-separated numbers, at least 4 values, in any order.
First quartile (Q1)
72.5
The 25th percentile — one quarter of the data falls at or below this value.
Second quartile (Q2 / median)
81
Third quartile (Q3)
89.5
Interquartile range (Q3 − Q1)
17
Count (n)
11

Background.

The Quanta quartile calculator splits any dataset into four equal-sized quarters and reports the three boundary values — Q1, Q2, and Q3 — that mark those splits, along with the interquartile range (Q3 − Q1) as a bonus spread statistic. Quartiles are simply percentiles at three fixed, well-known positions: Q1 is the 25th percentile, Q2 is the 50th percentile (the median), and Q3 is the 75th percentile. Together they answer 'how is this data distributed across its range' in a single glance, which is exactly the information a box-and-whisker plot is built to display.

The question this calculator answers is different from a plain median lookup or a spread measurement. Asking 'what is my median' only tells you where the centre sits; asking 'what is my quartile' tells you where a quarter and three-quarters of the way through the data sit as well, giving you a sense of how the lower half and upper half of the dataset are each internally distributed. A dataset where Q1 sits close to the minimum and Q3 sits close to the maximum is spread out fairly evenly; a dataset where Q1 and Q3 both huddle close to Q2 is tightly clustered around its centre with the extremes reserved for a small number of unusual values.

A detail worth stating plainly, because it is exactly the kind of thing that causes two 'correct' calculators to disagree: there is more than one accepted mathematical convention for computing quartiles, in exactly the same way there is more than one convention for percentiles in general. This calculator uses linear interpolation between the two closest ranks — the method Hyndman and Fan's definitive 1996 survey labels 'Type 7' — which is the default behaviour of R's quantile() function, NumPy, pandas, and Microsoft Excel's QUARTILE and QUARTILE.INC functions. Older textbooks and some graphing calculators instead use John Tukey's original 'hinges' method, or Excel's alternative QUARTILE.EXC function, both of which can produce a slightly different Q1 or Q3 for the same dataset — most noticeably with small sample sizes, where the exact rounding convention has more room to matter. Neither method is wrong; they are different, well-documented conventions, and this page tells you exactly which one you're getting.

Use this calculator whenever you need the classic Q1/Q2/Q3 split — for building a box plot by hand, checking a homework answer, or getting a fast sense of how a dataset's lower and upper halves are shaped. If you specifically want the single interquartile-range number as a standalone spread statistic (comparable to the range or the standard deviation), the dedicated interquartile-range calculator headlines that number directly. If you want to know exactly which individual data points count as outliers under the 1.5×IQR rule, the outlier calculator applies these same quartiles to flag specific values rather than just reporting the summary statistics.

What is quartile calculator?

A quartile is one of three values that divide a sorted dataset into four equal-sized groups, each containing roughly one quarter of the observations. The first quartile (Q1) is the value at the 25th percentile — one quarter of the data lies at or below it. The second quartile (Q2) is the value at the 50th percentile, which is exactly the median — half of the data lies at or below it. The third quartile (Q3) is the value at the 75th percentile — three quarters of the data lies at or below it. Quartiles are the specific case of the more general concept of a percentile, evaluated at three fixed, standard positions. When the requested percentile position does not land exactly on one of the sorted data points — which is the common case — the value must be interpolated, and different statistical software packages use different, well-documented interpolation conventions. This calculator implements Type 7 (per Hyndman & Fan's 1996 taxonomy of nine competing methods), matching the default behaviour of R, NumPy, pandas, and Excel's QUARTILE/QUARTILE.INC functions.

How to use this calculator.

  1. Paste your dataset as comma-separated numbers, in any order — the calculator sorts them internally.
  2. You need at least 4 values for quartiles to be meaningful.
  3. Read Q1, Q2, and Q3 in the results. Q2 is always the ordinary median of the dataset.
  4. Use the IQR (Q3 − Q1) shown alongside the quartiles as a quick spread check, or move to the dedicated interquartile-range or outlier calculators for a deeper dive into spread and outlier detection.
  5. If you compare this result against Excel, a graphing calculator, or a textbook and see a slightly different Q1 or Q3, check which quartile convention that tool uses — see the FAQ below.

The formula.

h = 1 + p·(n−1), p ∈ {.25, .5, .75}

Sort the n values into ascending order statistics x₍₁₎ ≤ x₍₂₎ ≤ … ≤ x₍ₙ₎. For each quartile proportion p (0.25 for Q1, 0.5 for Q2, 0.75 for Q3), compute the interpolated rank position h = 1 + p·(n − 1). If h lands exactly on an integer, the quartile equals x₍ₕ₎ directly. Otherwise, interpolate linearly between the order statistics just below and just above: quartile = x₍⌊h⌋₎ + (h − ⌊h⌋)·(x₍⌈h⌉₎ − x₍⌊h⌋₎). This is the Type 7 method from Hyndman and Fan's 1996 taxonomy — the default in R, NumPy, pandas, and Excel's QUARTILE/QUARTILE.INC. The IQR is simply Q3 − Q1, per the NIST/SEMATECH e-Handbook's definition of the interquartile range as the 75th percentile minus the 25th percentile.

A worked example.

Example

Eleven exam scores, already sorted ascending: 62, 68, 71, 74, 78, 81, 85, 88, 91, 95, 99 (n = 11). For Q1, h = 1 + 0.25·10 = 3.5, which falls between the 3rd order statistic (71) and the 4th (74): Q1 = 71 + 0.5·(74 − 71) = 72.5. For Q2, h = 1 + 0.5·10 = 6 exactly, so Q2 is simply the 6th order statistic: 81. For Q3, h = 1 + 0.75·10 = 8.5, between the 8th order statistic (88) and the 9th (91): Q3 = 88 + 0.5·(91 − 88) = 89.5. The interquartile range is Q3 − Q1 = 89.5 − 72.5 = 17. In plain terms, the middle 50% of scores in this class span a 17-point range, roughly from the low 70s to the high 80s, centred on a median score of 81.

values62, 68, 71, 74, 78, 81, 85, 88, 91, 95, 99

Frequently asked questions.

What are Q1, Q2, and Q3?
Q1 (the first or lower quartile) is the value at the 25th percentile. Q2 (the second quartile) is the value at the 50th percentile, which is exactly the median. Q3 (the third or upper quartile) is the value at the 75th percentile. Together they divide a sorted dataset into four groups of roughly equal size.
Why do different tools give slightly different quartile values for the same data?
Because there are several accepted mathematical conventions for interpolating a quartile when it doesn't land exactly on one of your data points. This calculator uses Type 7 (linear interpolation between the two closest ranks), the default in R, NumPy, pandas, and Excel's QUARTILE/QUARTILE.INC functions. Older textbooks and some calculators use Tukey's original 'hinges' method or Excel's QUARTILE.EXC function instead, which can give a slightly different Q1 or Q3 — most noticeably with small datasets. See Hyndman & Fan (1996) for the full catalogue of nine competing conventions used across different software.
How is Q2 different from just computing the median directly?
Q2 is not different at all — it is defined as exactly the 50th percentile, which is the median by definition. Reporting it as part of the quartile trio is useful because it shows you the median in the same context as Q1 and Q3, letting you see at a glance whether the lower half of the data (between the minimum and Q2) is more or less spread out than the upper half (between Q2 and the maximum).
What is the difference between this page and the interquartile-range calculator?
This page headlines Q1 and reports all three quartiles individually — the answer to 'what are my quartiles.' The dedicated interquartile-range calculator headlines the single IQR number (Q3 − Q1) as a standalone measure of spread, comparable to the range or standard deviation, for the answer to 'how spread out is my data, in one number.' Both compute the same underlying Q1/Q3, but each page is built around a different primary question.
How do quartiles relate to a box-and-whisker plot?
A box plot is drawn directly from the five-number summary: the minimum, Q1, Q2 (the median), Q3, and the maximum. The box spans from Q1 to Q3 (so its height or width is exactly the IQR), with a line drawn at Q2, and whiskers extending out to the minimum and maximum (or, in the common variant, to the 1.5×IQR fences with points beyond flagged individually — see the outlier calculator for that variant).
How many values do I need to compute meaningful quartiles?
This calculator requires at least 4 values. Below that, the concept of splitting data into quarters stops being meaningful — with 3 or fewer values you cannot form four distinct groups, and the interpolated positions become degenerate. Quartiles become genuinely informative once you have a reasonable number of observations (roughly 10 or more), since with very small samples Q1 and Q3 can be heavily influenced by just one or two data points.

In this category

Embed

Quanta Pro

Paid features are coming later.

  • All 313 calculators remain free
  • No billing is enabled
Coming soon