Percentile Calculator

Find the value at any percentile using linear interpolation, or the reverse — the percentile rank of a value — with a full step-by-step breakdown.

Loading calculator…

What a percentile is

The Pth percentile of a data set is the value below which P% of the values fall. The 25th percentile (P25) has roughly a quarter of the data below it; the median is the 50th percentile (P50); the 100th percentile is the maximum value in the set.

This calculator works both directions:

  • Value at percentile — give it P, get the value at that percentile.
  • Percentile rank of a value — give it a value x, get the percentile it corresponds to.

Linear interpolation, step by step

This calculator finds the value at a percentile using linear interpolation, one of several standard conventions (the quartile & IQR calculator uses a different one — see below):

  1. Sort the data in ascending order.
  2. Find the rank: rank = P/100 × (n − 1), using a 0-indexed position (this calculator displays it 1-indexed, as rank + 1, since "the 2.5th value" reads more naturally than "the 1.5th index").
  3. If the rank lands exactly on a whole position, that value is the answer.
  4. Otherwise, the rank falls between two neighboring sorted values — interpolate: take the lower value, then add the fractional part of the rank times the gap to the next value.
Tip: Because the rank formula divides by n − 1, the minimum value is always P0 and the maximum is always P100 — the interpolation only kicks in strictly between them.

Worked example: value at a percentile

For the data set 40, 42, 47, 53, 54, 59, 65 (7 values, already sorted), find P25:

  1. Rank = 25/100 × (7 − 1) + 1 = 0.25 × 6 + 1 = 2.5 (1-indexed).
  2. Rank 2.5 falls between position 2 (42) and position 3 (47).
  3. Interpolate: 42 + 0.5 × (47 − 42) = 42 + 2.5 = 44.5.
  4. P25 = 44.5.

Other percentiles of the same set: P0 = 40 (the minimum), P50 = 53 (the median, position 4 exactly), P100 = 65 (the maximum).

The reverse: percentile rank of a value

Percentile rank flips the question around: instead of "what value is at percentile P," it asks "what percentile is this value at." The formula is simpler — no interpolation needed:

Percentile rank of x = (number of values strictly below x) / n × 100

For the same data set, the percentile rank of x = 54 is: 4 of the 7 values (40, 42, 47, 53) are below 54, so rank = 4/7 × 100 = 57.14%. Note the strictly below — a value equal to the maximum never reaches exactly 100%, since it doesn't count itself as "below."

Percentile is not the same as quartile

If you've used the quartile & IQR calculator, you may notice its Q1 doesn't match this calculator's P25 on the same data — for the example set above, Q1 = 42 there but P25 = 44.5 here. That's not a bug in either calculator; they're built on two different, equally valid textbook conventions:

  • Exclusive method (quartile-iqr): find the median, then the median of the lower half and the median of the upper half.
  • Linear interpolation (this calculator): rank every value and interpolate between the two closest ranks.

The two methods agree closely on large, evenly spread data sets, but can diverge noticeably on small ones like the 7-value example here. Use whichever convention your textbook, course, or statistics software specifies, and don't mix the two within the same analysis.

Where percentiles show up

Percentiles are everywhere test scores and growth charts are used — "you scored in the 90th percentile" means 90% of test-takers scored at or below you. They also drive service-level targets like "p95 latency," meaning 95% of requests were faster than that value. For the exclusive-method quartiles and the 1.5×IQR outlier rule instead of interpolation, see quartile & IQR; for z-scores measuring how many standard deviations a value sits from the mean, see z-score; for a fuller statistical summary in one pass, see descriptive statistics.

Frequently asked questions

What does "the 25th percentile" mean?
The Pth percentile is the value below which P% of the data falls. The 25th percentile (P25) is the value with roughly a quarter of the data below it and three quarters above. P50 is the median, and P100 is the maximum value.
Why doesn't P25 match Q1 on the quartile calculator?
They use different, both standard, conventions. This calculator uses linear interpolation — it ranks every value (rank = P/100 × (n − 1)) and interpolates between the two closest ranks. The [quartile & IQR calculator](/en/calculators/statistics/quartile-iqr) uses the exclusive method — it finds the median, then the median of the lower and upper halves. For the example set on this page, P25 = 44.5 by interpolation, but Q1 = 42 by the exclusive method. Neither is wrong; pick the method your textbook, course, or software uses and stay consistent.
What is percentile rank, and how is it different from percentile value?
They are reverses of each other. Percentile value answers "what number sits at the Pth percentile?" — you give a percentile, it gives a value. Percentile rank answers "what percentage of the data is below this number?" — you give a value, it gives a percentile. This calculator has a toggle for each direction.
Why do I need at least one number?
A percentile only means something relative to a data set, so at least one value is required. With a single value, every percentile from 0 to 100 equals that one number, and its percentile rank is always 0 (nothing else is below it).
Does percentile rank count values equal to x, or only values strictly below it?
Only values strictly below x. If x equals the maximum value in the set, its rank is not 100 — it's (n − 1)/n × 100, since the maximum itself isn't counted as "below." Try it — the rank of the biggest number in your data set will always be a little short of 100%, not exactly 100%, unless there are ties at the top.
Why must P be between 0 and 100?
Percentiles are percentages of the data set that fall below a value, and a percentage above 100% or below 0% has no data-set interpretation — you can't have more than "all of it" below a value, or less than "none of it."

Related calculators