Percentile Calculator

Percentile Calculator

Find the value at any percentile of your data, such as the 90th percentile of test scores or response times, using the same method as Excel or your textbook.

The Pth percentile has about P% of the data at or below it

Method

Position p(n − 1) + 1, interpolating between neighbours. Excel PERCENTILE.INC, Google Sheets, R and NumPy defaults.

Enter your data and the percentile you want

What is a Percentile?

The Pth percentile is the value below which roughly P% of the data falls. If the 90th percentile of delivery times is 45 minutes, about 90% of deliveries arrived within 45 minutes.

Percentiles describe position rather than averages, so they suit skewed data and setting thresholds. Child growth charts, exam grade boundaries, salary bands and website speed targets ("p95 under 200 ms") are all built on them.

A percentile is not the same as a percentile rank. The percentile is a value ("the 90th percentile is 84.5"); the percentile rank works the other way round ("a score of 84.5 is at the 90th percentile"). The percentile rank calculator handles that direction.

How to Calculate a Percentile

Methods as catalogued by Hyndman and Fan (1996) and documented for Excel by Microsoft. See Sources.

1. Sort the data and convert P to a decimal

The 90th percentile is p = 0.9. Let n be the number of values.

2. Find the position

Inclusive (PERCENTILE.INC): p(n − 1) + 1
Exclusive (PERCENTILE.EXC): p(n + 1)
Nearest rank: ⌈p × n⌉ (round up)

3. Read off the value

Position 10.9 = 10th value + 0.9 × (11th value − 10th value)

The two Excel methods interpolate between neighbouring values. Nearest rank never does, so it always returns a value from your data.

Worked Example: the 90th Percentile of Twelve Scores

Given:
Scores 15, 20, 35, 40, 50, 55, 60, 70, 75, 80, 85, 90 (n = 12). Find the 90th percentile.
Step 1:
Inclusive:
0.9 × 11 + 1 = 10.9 → 80 + 0.9 × (85 − 80) = 84.5
Step 2:
Exclusive:
0.9 × 13 = 11.7 → 85 + 0.7 × (90 − 85) = 88.5
Step 3:
Nearest rank:
⌈0.9 × 12⌉ = ⌈10.8⌉ = 11th value = 85
Result:
84.5, 88.5 or 85.

With only 12 values, the method moves the answer by 4 points. With thousands of values the three would agree closely.

Every Decile, Three Ways

The 10th to 90th percentiles of the twelve example scores. Enter your own data above to see it here.

Deciles under three percentile methods
PercentilePERCENTILE.INCPERCENTILE.EXCNearest rank
P1021.516.520
P20362935
P304339.540
P40525150
P5057.557.555
P60666870
P7073.575.575
P80798280
P9084.588.585

Common Percentile Mistakes

  • Confusing percentile with percentage. Scoring at the 90th percentile means doing better than about 90% of people, not getting 90% of the marks.
  • Mixing up a percentile and a percentile rank. One turns a percentage into a value, the other turns a value into a percentage.
  • Averaging percentiles from different groups. The average of two groups' 90th percentiles isn't the 90th percentile of the combined group. Pool the data and recalculate.
  • Trusting extreme percentiles from small samples. The 99th percentile of 20 values is essentially just the largest value, which tells you little about the true 99th percentile.

Percentile Calculator FAQs

Is the 50th percentile the median?

Yes. All three methods give the median at P50. The 25th and 75th percentiles are the first and third quartiles.

Which method does Excel use?

PERCENTILE and PERCENTILE.INC use the inclusive method; PERCENTILE.EXC uses the exclusive one. Google Sheets’ PERCENTILE matches PERCENTILE.INC.

Which method should I use?

Match whatever your course, report or colleagues use. If there’s no convention, the inclusive method is the most widely used in software.

Can a percentile be a value that isn’t in the data?

With interpolation, yes: 84.5 in the example lies between 80 and 85. The nearest-rank method always returns an actual data value.

What do p95 and p99 mean for response times?

The time within which 95% or 99% of requests finish. They capture the slow tail that an average hides, which is why performance targets use them.

What is a decile or quintile?

Deciles split data into tenths (P10, P20, … P90) and quintiles into fifths (P20, P40, P60, P80). Both are just particular percentiles.

Why does exclusive give an error for P0 or P100 in Excel?

Its position p(n + 1) falls outside the data for extreme percentiles. Excel returns an error; this calculator clamps to the minimum or maximum instead.

How many values do I need?

Enough that the percentile isn’t just the most extreme value. As a rough guide, estimating the 90th percentile well needs dozens of values; the 99th needs hundreds.

Sources

Related Tools