Percentile Calculator

Find the percentile of a dataset.

How it is calculated

The values are sorted from smallest to largest, then the percentile is found by linear interpolation: rank = p / 100 × (n − 1), counted from zero, where n is the number of values and p is between 0 and 100. If the rank falls between two positions, the result is xlo + (rank − lo) × (xhi − xlo). Numbers can be separated by commas, spaces or line breaks; anything that is not a number is silently skipped. The result is rounded to two decimals. This is method 7 of the Hyndman and Fan family (the default in R, and Excel's PERCENTILE.INC). The NIST e-Handbook and many textbooks instead place the percentile at rank p(n + 1) / 100, which gives different values on small samples, so results can differ from yours elsewhere.

Worked example

The data are 12, 15, 11, 20, 18, 25, 14, 30 and p = 90. Sorted: 11, 12, 14, 15, 18, 20, 25, 30, so n = 8. Rank = 0.9 × 7 = 6.3, which lies between position 6 (value 25) and position 7 (value 30). Result = 25 + 0.3 × (30 − 25) = 26.5. The 90th percentile is 26.50.

Try this example →

Common mistakes

  • Typing the percentile as a fraction (0.9) instead of 90; 0.9 gives almost the minimum.
  • Expecting the result to be one of the data values; with interpolation it often sits between two of them.
  • Mixing in labels or units such as 12kg; items that are not plain numbers are dropped, which changes n without warning.
  • Comparing with spreadsheet or statistics software that uses another percentile definition and getting a slightly different answer on small samples.
  • Confusing a percentile of the data with a percentile rank: this tool returns a value, not the position of a value.

Sources

About this calculator

This calculator finds the k-th percentile of a dataset — the value below which k% of the data points fall — using linear interpolation between the two closest ranked values when the exact percentile position doesn't land on a whole number, the same method used by Excel's PERCENTILE.INC function and most statistics software.

Teachers converting raw test scores into percentile rankings, HR analysts benchmarking a salary against a market range (the "75th percentile salary" for a role), and researchers summarizing a distribution of data (reporting the 25th, 50th and 75th percentiles as a box-plot summary) all use this calculation to describe where a value sits relative to the rest of a dataset.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    This tool uses linear interpolation between the two nearest sorted values, the same approach as Excel's PERCENTILE.INC, so the result is often a number that is not in your data at all. With only a handful of values that matters: the 90th percentile of eight scores can land between two of them. If your course or exam board defines percentiles by nearest rank, expect small differences. Which percentile method does your field use?

Popular calculators

All Calculators