Percentile & Quartile Calculator
Compute quartiles (Q1, Q2, Q3) and the interquartile range (IQR), or find any percentile of your data using linear interpolation. Includes a box-plot visual.
Quartiles & percentiles explained, step by step
Percentiles rank values against the rest of the data. Being in the 90th percentile on a test means you outscored 90% of the group — the raw score itself might be 78/100. Quartiles are just the three named percentiles (25th, 50th, 75th) that split sorted data into quarters. Each card below walks through one piece of the workflow this calculator runs.
1. Quartiles — Q1, Q2, Q3 split the data into four equal groups
Sort ascending, then split. Q2 is the median. Q1 is the median of the lower half (25% of the data falls below it); Q3 is the median of the upper half (75% falls below it). Together they carve the sorted data into four groups of roughly equal size.
2. Arbitrary percentile — linear interpolation
For any P between 0 and 100, compute the fractional rank r = (P/100)·(n − 1). If r isn't an integer, slide between the two neighbouring sorted values proportionally. This is what NumPy percentile and Excel PERCENTILE.INC use by default.
3. IQR — spread of the middle 50%
IQR = Q3 − Q1 captures the spread of the middle half of the data. Unlike range (max − min), a single stray value can't distort it. Tukey's rule flags values beyond Q1 − 1.5·IQR or Q3 + 1.5·IQR as candidate outliers.
4. Reading a box plot
The box spans Q1 to Q3 — its width is the IQR. The line inside is the median. Whiskers reach to the extreme non-outlier values. Dots beyond the whiskers are outliers. A lopsided box or a median stuck near one end signals skew.
For a full outlier workflow across the whole data set, pair this with the Outlier Detector Calculator, which applies Tukey's 1.5·IQR and 3·IQR fences and highlights every flagged value.
Common mistakes
- Not sorting first. Quartiles are always computed on the sorted data — the original order tells you nothing.
- Confusing percentile with percentage. A test score is a percentage of possible marks; a percentile is a rank against other people.
- Expecting every tool to agree. Different quartile methods legitimately give slightly different Q1 and Q3 on small samples. Always state which method you used.
- Treating any outlier as bad data. Tukey's fences flag candidates. Investigate — an outlier can be a data-entry error or the most interesting point in your sample.
- Using IQR on tiny samples. With fewer than about 8 values, quartiles are jumpy — a single point can move them a lot.
Features of this calculator
- Two sub-tools: full quartile breakdown, or any specific percentile from 0 to 100
- Quartiles use the exclusive median-of-halves method (matches this site's Median calculator)
- Arbitrary percentiles use linear interpolation between closest ranks (same as NumPy & Excel PERCENTILE.INC)
- Box plot showing min, Q1, median, Q3 and max — with potential outliers marked separately
- Automatic outlier detection using Tukey's 1.5·IQR fences
- Full step-by-step working — sorted data, rank, interpolation, IQR and outlier fences
- Copy the result summary or download the whole panel — box plot and steps — as an image
Frequently asked questions
+What's the difference between a percentile and a percentage?
A percentage measures how much of something you got; a percentile measures how you rank against others. Scoring 87% on a test means 87 marks out of 100. Being in the 87th percentile means you outscored 87% of the people who took it.
+Why do different tools give different quartile values?
There are multiple defined ways to compute quartiles (nine, in R's convention). The two most common are the exclusive method (median-of-halves, excluding the median for odd n) and the inclusive method. Excel's PERCENTILE.INC uses linear interpolation across the full data. All are correct — they just cut slightly differently, mainly on small samples.
+Which method does this calculator use?
Q1, Q2, Q3 use the exclusive median-of-halves method, matching this site's Mean/Median/Mode calculator. Arbitrary percentiles use linear interpolation between closest ranks (rank = (P/100)·(n−1)) — NumPy's and Excel PERCENTILE.INC's default.
+How is IQR used to detect outliers?
Tukey's rule flags values below Q1 − 1.5·IQR or above Q3 + 1.5·IQR as potential outliers, and beyond ±3·IQR as extreme outliers. This calculator highlights any it finds.
+Can a percentile equal one of my data points?
Yes — whenever the fractional rank lands on a whole number, the percentile equals the value at that sorted position exactly, with no interpolation needed.