Percentile Calculator - Rank and Position

Calculate percentiles and percentile ranks for datasets. Find specific percentile values or determine rank positions.

Results

Calculated
Result
—

What it is and when to use it

A percentile marks the value below which a given share of a dataset falls. The 50th percentile is the median, the 25th and 75th percentiles are the first and third quartiles, and the 90th percentile is the point that 90 percent of observations sit at or under. Because percentiles depend only on the ordering of the data, they are robust to extreme outliers in a way the mean is not.

Use this calculator when you have a raw list of numbers and want to describe it: test scores, response times, salaries, delivery durations, or lab measurements. Paste values separated by commas or spaces and it returns the minimum, quartiles, median, mean, interquartile range, and a table of common percentiles (10th, 25th, 50th, 75th, 90th, 95th, 99th). For lists of 25 values or fewer it also lists each value with its positional rank.

The formula and how it works

The calculator sorts your data from smallest to largest, then finds the position of the p-th percentile with linear interpolation:

  • idx = (p / 100) x (n - 1), using zero-based positions in the sorted list.
  • n is how many valid numbers you entered; entries that cannot be read as numbers are ignored.
  • lo = floor(idx) and hi = ceil(idx) are the two neighbouring sorted values.
  • percentile = x[lo] + (idx - lo) x (x[hi] - x[lo]). When idx is a whole number the answer is exactly that data point.
  • IQR = P75 - P25, the spread of the middle half of the data.

The rank column uses rank = i / (n - 1) x 100 where i is the zero-based position of the value in the sorted list.

Worked example

Take the data 12, 15, 18, 22, 30, so n = 5 and the sorted list is unchanged. For the 25th percentile, idx = 0.25 x 4 = 1, which lands exactly on the second value, so Q1 = 15. The median has idx = 2, giving 18, and the 75th percentile has idx = 3, giving 22. The IQR is 22 - 15 = 7 and the mean is 97 / 5 = 19.4.

For the 90th percentile, idx = 0.9 x 4 = 3.6, so lo = 3 (value 22) and hi = 4 (value 30). The result is 22 + 0.6 x (30 - 22) = 26.8. The 10th percentile has idx = 0.4, so it is 12 + 0.4 x 3 = 13.2, the 95th is 22 + 0.8 x 8 = 28.4, and the 99th is 22 + 0.96 x 8 = 29.68. These are the values the calculator prints for this input, and the ranks come out as 0, 25, 50, 75 and 100 for the five data points.

Common mistakes and how to interpret the result

  • Mixing up methods: different tools use different position formulas, so Q1 for a small dataset may differ from your textbook or another program. Both answers are valid under their own definition.
  • Reading the rank as the share of values strictly below: the rank in this tool is positional, so the top value is always 100 even if you only have five observations.
  • Trusting extreme percentiles on small samples: the 99th percentile of five points is just a point between the two largest values and says little about the underlying population.
  • Ignoring the mean versus median gap: if the mean sits well above the median, the data is likely right-skewed, and percentiles describe it better than the average does.
  • Forgetting that ties and duplicates are kept: repeated values are counted each time, which is correct for percentiles but can make several ranks look identical.

Frequently Asked Questions

Which percentile method does this calculator use?
It uses linear interpolation between closest ranks, with the position computed as (p/100) x (n - 1) on the sorted data using zero-based indexing. This is the same convention as the default in NumPy and the PERCENTILE.INC function in Excel and Google Sheets. Other software, such as PERCENTILE.EXC or some textbook tables, uses different position formulas, so small datasets can give slightly different quartiles.
Why does the calculator show a percentile rank of 0 for the smallest value and 100 for the largest?
The rank shown for each value is its position in the sorted list scaled to 0-100, calculated as index / (n - 1) x 100. The minimum therefore sits at 0 and the maximum at 100. Some textbooks define percentile rank as the percentage of values below a score, or below plus half of those equal to it, which gives different numbers, so treat this as a positional rank.
How many data points do I need?
The math works with any list of at least one number, but percentiles are only informative with enough data. With five values the 90th and 99th percentiles are just interpolations between the top two points. For stable tail percentiles you generally want dozens or hundreds of observations.
What is the difference between a percentile and a percentage?
A percentage describes a proportion of a whole, such as 80 percent of questions correct. A percentile describes a position within a distribution: the 80th percentile is the value below which about 80 percent of observations fall. A student can score 60 percent on a test and still be at the 90th percentile if most classmates scored lower.

Related calculators