Free Percentile Calculator

Find the value at any percentile of a list of numbers using the linear-interpolation method, with the sorted data, interpolated rank, and full arithmetic shown for every result.

Enter your numbers and a percentile (0–100) to find the value at that position using linear interpolation.

50ᵗʰ percentile
30
Count (N)
5
Interpolated rank
2
Minimum
10
Maximum
50

rank = (p ÷ 100) · (N − 1) = (50 ÷ 100) · (5 − 1) = 2 → exact hit at sorted position 2: 30

Quick answer

A percentile is the value below which a given percentage of a data set falls. To compute the p-th percentile by linear interpolation, sort the data ascending, find the rank with rank = (p ÷ 100) · (N − 1), then interpolate between the two surrounding values. For example, the 50th percentile (median) of 10, 20, 30, 40, 50 has rank = (50 ÷ 100) · (5 − 1) = 2, so the answer is the value at sorted index 2, which is 30.

Formula & method

Interpolated rank

rank = (p / 100) × (N − 1)
  • p Target percentile, from 0 to 100
  • N Count of values in the data set
  • rank Fractional position (0-based) in the sorted list

Data is first sorted in ascending order. The rank is a 0-based position, so rank 0 is the minimum and rank N−1 is the maximum.

Linear interpolation

Pₚ = x[k] + (x[k+1] − x[k]) × f
  • k Integer part of rank (floor), the lower sorted index
  • f Fractional part of rank (rank − k)
  • x[k] Value at sorted index k
  • Pₚ Resulting value at the p-th percentile

When rank is a whole number (f = 0) the percentile equals x[k] exactly, with no interpolation needed. This matches the 'linear' method used by NumPy's default and Excel's PERCENTILE.INC.

Examples

Example 1: Median (50th percentile) of 10, 20, 30, 40, 50
Input
Data = 10, 20, 30, 40, 50; p = 50
Result
30
Why
N = 5, so rank = (50 ÷ 100) × (5 − 1) = 0.5 × 4 = 2. Rank 2 is a whole number, so the answer is the value at sorted index 2, which is 30. No interpolation is needed.
Example 2: 25th percentile (Q1) of 1 through 10
Input
Data = 1, 2, 3, 4, 5, 6, 7, 8, 9, 10; p = 25
Result
3.25
Why
N = 10, so rank = (25 ÷ 100) × (10 − 1) = 0.25 × 9 = 2.25. The integer part k = 2 (value 3) and fraction f = 0.25, so P₂₅ = 3 + (4 − 3) × 0.25 = 3.25.
Example 3: 90th percentile of ten test scores
Input
Data = 55, 62, 68, 71, 74, 77, 80, 83, 88, 95; p = 90
Result
88.7
Why
Already sorted; N = 10, so rank = (90 ÷ 100) × (10 − 1) = 0.9 × 9 = 8.1. Here k = 8 (value 88) and f = 0.1, so P₉₀ = 88 + (95 − 88) × 0.1 = 88 + 0.7 = 88.7. Only the top 10% scored above this.
Example 4: Median of an unsorted, odd-length list
Input
Data = 3, 7, 8, 5, 12, 14, 21, 13, 18; p = 50
Result
12
Why
Sort first → 3, 5, 7, 8, 12, 13, 14, 18, 21. N = 9, so rank = (50 ÷ 100) × (9 − 1) = 0.5 × 8 = 4. Rank 4 is whole, so the median is the value at sorted index 4, which is 12 (the middle element of 9 values).

When to use this tool

  • Reporting quartiles (Q1 = 25th, Q3 = 75th) or the median (50th) to summarize the spread of a data set.
  • Setting a cutoff or threshold, such as a 90th-percentile latency target, a 95th-percentile billing tier, or an admissions score band.
  • Comparing an individual value against a group — for example, finding the salary or test score that sits at a chosen percentile.
  • Building box plots or detecting outliers, where the inter-quartile range (Q3 − Q1) is the core ingredient.

Common mistakes

  • Forgetting to sort the data first. The rank formula is meaningless until the values are in ascending order, so an unsorted list gives a wrong answer.
  • Using a 1-based rank. The formula (p/100)·(N−1) produces a 0-based position, where rank 0 is the minimum and rank N−1 is the maximum — adding 1 shifts every result.
  • Confusing a percentile with a percentage or a percentile rank. The 90th percentile is a value from your data, not 90% of anything; the percentile rank is the inverse question (what percent of data lies below a given value).
  • Expecting one universal answer. Several valid percentile definitions exist (linear, nearest-rank, exclusive). This tool uses linear interpolation (Excel's PERCENTILE.INC / NumPy default), so results may differ slightly from a method that picks the nearest actual data point.

Frequently asked questions

What is the formula for a percentile?

Sort the data ascending, then compute the interpolated rank as rank = (p ÷ 100) × (N − 1), where p is the percentile and N is the number of values. If the rank is a whole number, the percentile is the value at that 0-based sorted index. If it falls between two indices, interpolate linearly: Pₚ = x[k] + (x[k+1] − x[k]) × f, where k is the floor of the rank and f is its fractional part.

How do I calculate the 25th, 50th, and 75th percentile (quartiles)?

Use p = 25 for the first quartile (Q1), p = 50 for the median (Q2), and p = 75 for the third quartile (Q3). For the data 1–10: Q1 = 3.25, Q2 = 5.5, and Q3 = 7.75 with the linear-interpolation method. The inter-quartile range is Q3 − Q1 = 4.5, a common measure of spread.

Why do different tools give slightly different percentile values?

There is no single agreed definition. This calculator uses linear interpolation between closest ranks — the same method as Excel's PERCENTILE.INC and NumPy's default — while other tools may use the nearest-rank method, the exclusive method (PERCENTILE.EXC), or Tukey's hinges. The differences are largest in small data sets and disappear as N grows.

What is the difference between a percentile and a percentile rank?

A percentile is a value: the 90th percentile is the data point below which 90% of values fall. A percentile rank is the inverse — given a value, it tells you the percentage of the data that lies at or below it. This tool computes the percentile (the value) from a percentage you supply.

Does this percentile calculator handle decimals and negative numbers?

Yes. You can enter decimals (e.g. 3.5, 7.25) and negative numbers (e.g. −10, −2). Values can be separated by commas, spaces, or new lines, and the tool sorts them automatically before computing the percentile.

What percentile is the minimum and maximum?

With this method the 0th percentile equals the minimum value and the 100th percentile equals the maximum, because rank = 0 lands on the first sorted value and rank = N − 1 lands on the last. The median (middle) corresponds to the 50th percentile.

Sources & references

External references open in a new tab. We are independent and not affiliated with these organizations.

  • ✓ Free to use
  • ✓ No sign-up required
  • Runs entirely in your browser — nothing is uploaded.
  • ✓ Formula and method shown above

Provided “as is” for general information only — results may be inaccurate, so verify before you rely on them. No warranty; use at your own risk.

Built and reviewed by HIFreeTools against the formula shown above and any authoritative references cited on this page. See our methodology and editorial standards.

Related tools

Embed this tool on your site

Free to embed, no sign-up. Paste this code where you want the percentile calculator to appear: