Math & Statistics

Percentile Calculator

Calculates percentiles both ways — interpolated and nearest-rank — so you can see where the two definitions disagree.

Loading the tool…

Processing happens locally in your browser. What you paste or load is processed by this page and is not uploaded to a server. Nothing is stored unless you use a control that says it stores something, and you can clear anything this site has kept from the privacy page.

How to use this tool

  1. Paste your numbers, one per line.
  2. Set the percentiles you want as a comma-separated list, or leave the default set.
  3. Select Calculate.
  4. Compare the two result columns. Where they disagree, say which definition you used when you quote the figure.

What percentile calculator does

There is no single definition of a percentile. Excel, NumPy and R type 7 interpolate between the two neighbouring values; monitoring tools and most textbooks take the nearest rank instead. On a large dataset the two barely differ, but on the small samples people usually paste in they can differ a great deal, and a latency target argued from one definition and measured with the other is an argument nobody wins.

Both columns are shown for every percentile you ask for, along with the rank the nearest-rank answer came from and the share of the data at or below it. Ask for the ones you care about as a comma-separated list — the default covers the usual P50, P90, P95 and P99 service-level set as well as the quartiles.

Frequently asked questions

Because there are two common definitions. The interpolated column is what Excel’s PERCENTILE.INC, NumPy and R type 7 give — it takes a weighted position between the two neighbouring values. The nearest-rank column picks the actual observation at or above the position, which is what most monitoring tools report. Neither is wrong; they simply answer slightly different questions.

Match whatever your monitoring system produces, because the SLA will be measured against that. If you cannot find out, state which definition your figure uses when you publish it. The two columns here exist precisely so you can see how much difference the choice makes on your data.

A P99 is asking about the worst one in a hundred, so under a hundred values it is barely distinguishable from the maximum and moves wildly with each new observation. The page reports the sample count for that reason. For a stable P99 you want thousands.