Percentile calculator

A percentile is a cut through sorted data. Choose a percentile to see the value, or choose a value to see its rank, both drawn on your data.

Separate with spaces, commas or new lines. 20 numbers read.
90th percentile88.3
60708090P90

Orange dots are at or below the cut.

  1. Sort the 20 values.
  2. Position = (n − 1) × p + 1 = (20 − 1) × 0.9 + 1 = 18.1
  3. Value 18 is 88, value 19 is 91; go 0.1 of the way between them → 88.3
Percentile methods compared
Method (used by)RankP90
Linear interpolation, (n − 1)p + 1 (Excel PERCENTILE.INC, Google Sheets, R default)18.188.3
Exclusive, (n + 1)p (Excel PERCENTILE.EXC, many textbooks)18.990.7
Nearest rank, ⌈np⌉ (no interpolation)1888
Percentile10th25th50th75th90th95th99th
Value61.868.573.581.588.391.294.24
Every percentile, 1st to 99th

Percentiles in one picture

The p-th percentile is the value with p% of the data at or below it. If your score is at the 90th percentile, you did as well as or better than 90% of the group. That is different from scoring 90%: on a hard test, 62% might be the 90th percentile.

The percentile formula, by hand

  1. Sort the n values from smallest to largest.
  2. Find the rank r = (P/100) × (n − 1) + 1. For the 90th percentile of 20 values, r = 0.9 × 19 + 1 = 18.1.
  3. If r is a whole number, the answer is the value at that rank. Otherwise take the value at rank ⌊r⌋ and add the fractional part of r times the gap to the next value: here, the 18th value plus 0.1 × (19th − 18th).

The comparison table above shows how the two other common definitions, the exclusive (n + 1) method and nearest rank, change the answer for your data. For large data sets they converge.

Two questions, two directions

  • "What score is the 75th percentile?" Value at a percentile. The answer is a data value.
  • "What percentile is a score of 80?" Percentile rank. The answer is a percentage.

Percentiles for normal data

If you only know a mean and standard deviation, and the data are bell-shaped, convert to a z-score and use the normal curve instead: the z-score calculator gives the percentile directly. Growth charts from the CDC and WHO work this way.

The 25th, 50th and 75th percentiles are the quartiles, the backbone of the box plot.

Still not clicking? Ask the tutor

An AI tutor that sees the numbers you entered above and explains them. It can make mistakes, so check anything important against the worked steps.

Questions students ask

How do you calculate a percentile?

Sort the data and compute the position (n − 1) × p + 1 for percentile p (as a decimal). If the position falls between two values, interpolate between them. This is the method used by Excel's PERCENTILE.INC and R's default.

What is percentile rank?

The percentage of values below a given value. This page reports the common "mid-rank" version, (below + ½ × equal) / n × 100, and the strict "below only" version.

What is the percentile formula?

For the value at percentile P with n sorted values, the most common formula (Excel PERCENTILE.INC) puts it at rank r = (P/100)(n − 1) + 1 and interpolates between the values either side of r. The simpler nearest-rank method uses r = ⌈(P/100) × n⌉ and takes that value directly. For the percentile of a value x, use (number below x + ½ × number equal to x) / n × 100.

Is the 50th percentile the median?

Yes. The 25th and 75th percentiles are the first and third quartiles.

Why do calculators give slightly different percentiles?

There are at least nine textbook definitions (Hyndman and Fan, 1996). They agree for large data sets but differ slightly for small ones. This calculator uses linear interpolation (type 7).

Keep exploring