How Are Percentiles Calculated? Rank, Mean and Standard Deviation, and Worked Examples
A percentile is a standing in a data set, not a score. This guide works rank and value in both directions, names the method, and connects percentiles to z-scores.
A percentile answers a standing question: where does this value sit among all the values? A score at the 85th percentile beats about 85 percent of the data set, which is a statement about rank, not about quality — an 85th percentile score on an easy test and on a hard test mean different things in absolute terms and the same thing in standing. This guide works percentiles in both directions, from value to rank and from rank to value, explains why two methods give two answers, and connects percentiles to quartiles, deciles, and z-scores, so a percentile is never quoted without its meaning attached.
- Percentile rank is where a value stands; percentile value is the value at a given rank. The two directions need different inputs.
- Two honest methods — nearest-rank and linear interpolation — can differ on small data sets. Name the method with the answer.
- The 50th percentile is the median, the 25th and 75th are the quartiles, and a z-score states the same standing in standard-deviation units.
Rank and value: the two directions
Percentile rank takes a value and returns a standing. Count the values at or below it, divide by the total count, multiply by 100. In a class of 100 scores, a score that beats 85 others and ties none has a rank near 85. Percentile value takes a rank and returns a value: the score below which a given percentage of the data falls. The 85th percentile value is the score that 85 percent of the class scored at or below.
The two directions answer different questions and need different inputs. A rank question needs the value and the data set. A value question needs the rank and the data set. Feeding one question’s inputs into the other’s calculation produces a number with the wrong meaning, which is the most common percentile error after the method error below.
Two methods, two answers, both honest
Nearest-rank counts up the sorted data and picks the value at the rank position: for the 50th percentile of ten values, it takes the 5th value. Linear interpolation treats the data as points on a line and interpolates between the two nearest values: for the same ten values, it averages the 5th and 6th. On the sorted set 12, 15, 18, 21, 24, 27, 30, 33, 36, 39, nearest-rank gives 24 and interpolation gives 25.5, and neither is wrong.
The difference shrinks as data sets grow, because neighbouring values sit closer together, but on small sets it is visible and must be disclosed. A percentile quoted without its method is underspecified in exactly the way a temperature without its scale is: the number is there and the meaning is not. The calculator on this page states its method, and any report built on its figures should do the same.
A worked example, start to finish
Take ten exam scores, sorted: 55, 62, 68, 71, 74, 78, 82, 85, 90, 95. The score 82 sits above 7 of the 10 values, so its percentile rank is about 70. The 90th percentile value by nearest-rank is the 9th value, 90. By interpolation it falls between the 9th and 10th values, giving 90.5. The median, the 50th percentile, is between the 5th and 6th values by interpolation, 76, and is the 5th value, 74, by nearest-rank — a visible gap that again comes down to method, not error.
Ten sorted scores: 55, 62, 68, 71, 74, 78, 82, 85, 90, 95.
| Question | Answer | Method note |
|---|---|---|
| Rank of 82 | About 70th | 7 of 10 values at or below it |
| 90th percentile value | 90 (nearest-rank) / 90.5 (interpolated) | Between 9th and 10th values |
| 50th percentile (median) | 74 (nearest-rank) / 76 (interpolated) | Between 5th and 6th values |
Quartiles, deciles, and the five-number summary
Quartiles are percentiles with special names: the 25th percentile is the first quartile, the 50th is the second quartile and the median, and the 75th is the third quartile. Deciles are every tenth percentile. Together with the minimum and maximum, the quartiles form the five-number summary, which describes a distribution’s centre, spread, and shape in five figures, and which is what a box plot draws.
The interquartile range, the third quartile minus the first, measures the spread of the middle half of the data, and it is robust in a way the full range is not: one extreme outlier moves the range enormously and the interquartile range barely at all. For skewed data — incomes, house prices, waiting times — the five-number summary tells the truth that a mean and standard deviation would smooth over.
Z-scores: the same standing, in standard-deviation units
A z-score states a value’s standing as distance from the mean in standard-deviation units: subtract the mean, divide by the standard deviation. A z-score of 1.0 sits one standard deviation above the mean, which, in a normal distribution, is about the 84th percentile. A z-score of 0 is the mean, the 50th percentile. The conversion between z-scores and percentiles needs the normal assumption; on non-normal data, the percentile rank from counting is the honest figure and the z-score conversion is an approximation.
The two languages suit different purposes. Percentiles are intuitive for reporting — everyone understands beating 85 percent of a group — while z-scores are convenient for statistics, because they combine, average, and feed into further calculations. A report that gives both, with the distribution named, gives its readers both intuition and machinery.
Mistakes: rank, value, method, and the top-percent illusion
First, confusing rank with value: quoting the 85th percentile value as if it were a rank of 85. Second, omitting the method on small data sets, where nearest-rank and interpolation visibly differ. Third, the top-percent illusion: the difference between the 99th and 99.9th percentiles can be enormous in value terms, because the tail stretches, so top-percentile language hides more than it reveals at the extremes. Fourth, applying percentile language to a single value with no data set: a percentile is a standing among values, and a lone number has no standing until a distribution is supplied.
Frequently asked questions
How is a percentile calculated?
Sort the data. For a rank, count values at or below the value, divide by the total, and multiply by 100. For a value at a rank, take the value at that position in the sorted data, by nearest-rank or interpolation.
What is the difference between percentile rank and percentile value?
Rank is where a value stands; value is the score at a given standing. A rank question needs the value and the data set, while a value question needs the rank and the data set.
Why do two percentile calculators give different answers?
Because they use different methods. Nearest-rank returns an observed value; linear interpolation returns a value between two observations. On small data sets the difference is visible, so name the method with the answer.
Is the 50th percentile the same as the median?
Yes. The 50th percentile is the median by definition. The 25th and 75th percentiles are the first and third quartiles.
How do percentiles relate to z-scores?
A z-score states standing in standard-deviation units from the mean. In a normal distribution, a z-score of 1.0 is about the 84th percentile and 0 is the 50th. On non-normal data, the counted percentile rank is the honest figure.
Can a single number have a percentile?
No, not alone. A percentile is a standing among values, so a distribution must be supplied. A lone score has no percentile until it is placed in a data set.
Try it on the calculator
Run the numbers on the calculator this guide explains, and check the result against the worked examples above.
Open the Percentile Calculator →- 1Percentile Calculator
Enter data and a value, or a rank, and see both directions.
- 2Statistics Calculator
The full data-set work-up.
- 3Standard Deviation Calculator
Spread around the average.
- 4Average Calculator
Mean, median, mode, range.
