How this instrument works
A quartile is one of three values that split ranked data into four equal-sized groups. Sort your numbers from smallest to largest and mark the three points that carve the list into quarters: Q1 sits at the boundary between the lowest fourth and the rest, Q2 is the median — the boundary at the exact middle — and Q3 marks the top fourth. A quarter of your values fall below Q1, half fall below Q2, and three-quarters fall below Q3.
Real data rarely lines up so a cut point lands exactly on a value, so this instrument uses linear interpolation between the two closest ranked values — the same method spreadsheets use in their PERCENTILE.INC function and the one NIST documents for exploratory data analysis. It is one of several published quartile conventions, and different textbooks pick different ones, so two correct answers can legitimately differ by a fraction — what matters is knowing which method produced the number you're quoting.
Quartiles matter because they describe shape, not just a single centre. The gap between Q1 and Q3 — the interquartile range — tells you how spread out the middle half of your data is, resistant to the wild swings a single extreme value can cause in the mean. Comparing all three at once, as this calculator does, shows you at a glance whether the data leans — a Q2 sitting closer to Q1 than Q3 signals a longer tail stretching upward, and vice versa.
- Paste or type your numbers into the Data set field — commas, spaces or new lines all work as separators.
- Read Q1 (25th pctile), the value below which the bottom quarter of your sorted data falls.
- Read Q2 / median (50th pctile) directly beneath it — the midpoint of the whole list.
- Read Q3 (75th pctile) last — the value below which the bottom three-quarters of your data falls.
- Only need one cut point rather than all three? This site's dedicated first-quartile and third-quartile instruments return a single value with the same method.
Worked example — the eight quiz scores
Take {2, 4, 4, 4, 5, 5, 7, 9}, already sorted, n = 8. For Q1, rank r = 1 + 0.25 x 7 = 2.75, landing between the 2nd value (4) and 3rd value (4) — both are 4, so Q1 = 4.0 exactly. For Q2, r = 1 + 0.5 x 7 = 4.5, between the 4th value (4) and 5th value (5): Q2 = 4 + 0.5 x (5 - 4) = 4.5, matching the median.
For Q3, r = 1 + 0.75 x 7 = 6.25, between the 6th value (5) and 7th value (7): Q3 = 5 + 0.25 x (7 - 5) = 5.5. So this instrument reports Q1 = 4.0, Q2 = 4.5, Q3 = 5.5 — the bottom quarter of scores sits at or below 4, the middle score is 4.5, and the top quarter starts above 5.5.
Questions
Why do my quartiles differ from another calculator's answer?
There are at least nine published quartile conventions, and calculators disagree because they pick different ones. This instrument uses linear interpolation between closest ranks (rank = 1 + (p/100)(n-1)) — the same method as Excel and Google Sheets' PERCENTILE.INC function and the one NIST documents. Neither convention is wrong; they're different definitions of the same idea, so always check which method a source used before comparing numbers.
Is Q2 the same as the median?
Yes, exactly — Q2 is just the formal name for the median inside the quartile system, since both mark the point below which half the data falls. This instrument computes it with the identical percentile formula it uses for Q1 and Q3, just with p = 50, so all three numbers come from one consistent method rather than the median being computed a different way.
I only need one quartile, not all three — is there a simpler tool?
Yes. If you only need the bottom cut point, the first-quartile calculator returns just Q1; for the top cut point alone, the third-quartile calculator returns just Q3. Both use the identical interpolation method as this page, so the numbers will always agree — they just skip computing and displaying the other two.
What's the difference between quartiles and the interquartile range?
Quartiles are the three cut points themselves — Q1, Q2 and Q3. The interquartile range (IQR) is a single number, Q3 minus Q1, describing how wide the middle half of the data spreads. If you specifically want that spread measure rather than the three underlying cut points, look for a dedicated IQR calculator, which reports the difference directly.
Can quartiles be equal to each other?
Yes, when several values repeat near the centre of the sorted list. If, say, Q1 and Q2 land on the same interpolated value, it means at least a quarter of your data is tightly clustered right at that point — not an error, just a feature of that particular data set worth noting.
How many values do I need for quartiles to make sense?
This instrument needs at least two values to run, but quartiles become genuinely informative with a reasonable spread of data — a handful of points can produce technically valid but jumpy results, since each interpolated cut point depends heavily on just one or two neighbouring values.