Descriptive statistics
Percentile and Quartile Calculator
Find the value at any percentile, or the percentile of any value — with the method named, because the four common conventions genuinely disagree.
Also called percentile calculator, quartile calculator, interquartile range calculator.
Have a spreadsheet? Drop a CSV here
Or . CSV, TSV or plain text. You pick which column is which after it loads — the names in your file do not have to match ours. The file is read in your browser and never uploaded.
How to read this result
A percentile is a value, a percentile rank is a position. The 90th percentile is the number below which 90% of the data fall. The percentile rank of 27 is the share of the data at or below 27. The calculator does both, in separate modes, because the two get conflated constantly.
Quartiles are just three particular percentiles — the 25th, 50th and 75th — and the distance between the first and third is the interquartile range, the spread of the middle half.
The method matters and is usually unstated. With ten values, the four conventions here can put the 25th percentile in noticeably different places. Excel alone ships two functions that disagree. The comparison table shows all four so that a mismatch with someone else's number is explainable rather than mysterious.
This is a statistical percentile, not a growth chart. A child's height percentile compares against a national reference population, not against the numbers you paste in. Same word, different calculation, different data.
The formula
- the position in the sorted data, usually fractional
- the number of values
- the percentile wanted, 0 to 100
The linear-interpolation method (R type 7, Excel PERCENTILE.INC). The exclusive method uses h = (n + 1)p/100 instead; nearest rank ignores h entirely and takes the value at rank ⌈np/100⌉ (R type 1); Tukey's hinges use the medians of the two halves.
Worked example
Quartiles of twenty daily customer counts
Twenty days of customer counts: 18, 22, 25, 19, 31, 28, 24, 21, 27, 33, 26, 23, 29, 20, 35, 30, 22, 26, 24, 28.
- Sort the twenty values.18 19 20 21 22 22 23 24 24 25 26 26 27 28 28 29 30 31 33 35
- For Q1, the position is h = (20 − 1) × 0.25 + 1 = 5.75.between the 5th (22) and 6th (22) values
- Interpolate: 22 + 0.75 × (22 − 22) = 22.Q1 = 22
- For Q3, h = (20 − 1) × 0.75 + 1 = 15.25.between the 15th (28) and 16th (29): 28 + 0.25 × 1 = 28.25
- The interquartile range is the gap between them.IQR = 28.25 − 22 = 6.25
- The 90th percentile: h = 19 × 0.9 + 1 = 18.1 → 31 + 0.1 × (33 − 31).P90 = 31.2
Half the days fall between 22 and 28 customers. That range — rather than the mean — is the useful number for staffing.
Checked against R's quantile(x, type = 7).
The calculator above is loaded with these numbers by the Load the worked example button.
Assumptions, and when to use something else
Percentiles assume the data can be ordered, and nothing else. They work on skewed data, on ordinal scales, and in the presence of outliers, which is what makes them the robust alternative to the mean and standard deviation.
The one genuine limitation is small samples: with ten values, the 90th percentile is being estimated from essentially one observation, and it moves a lot from sample to sample. Extreme percentiles need substantial data before they mean much.
- You want all five headline numbersFive-number summaryMinimum, Q1, median, Q3 and maximum — everything a box plot draws.
- You want a pictureBox plot makerDraws the quartiles directly, with outliers marked.
- You want to use the normal distribution insteadZ-score calculatorThe percentile of a value under a normal model rather than in your data.
- You are looking for unusual valuesOutlier detectionThe IQR fences that come from Q1 and Q3.
Questions people ask
Why does Excel give a different quartile?
Because Excel ships two functions with different definitions — PERCENTILE.INC and PERCENTILE.EXC — and neither matches Tukey's hinges, which box plots use. On small samples the differences are real. The comparison table above shows all four so you can see which one your other tool used.
What is the difference between a percentile and a percentage?
A percentage is a proportion of a total. A percentile is a position in a distribution. Scoring 90% on a test says you got 90% of the marks; being in the 90th percentile says you beat 90% of the other candidates. They are frequently very different numbers.
How do I calculate the percentile rank of a value?
Count how many values fall below it, add half the ties, and divide by n. That mid-rank definition is the one most statistical software uses, and it is what the second mode above computes.
Is the 50th percentile always the median?
Yes, by definition — under every one of the four methods, though they can disagree about it by a hair when n is even and the two middle values differ.