Percentile calculator

Find percentiles, quartiles, and IQR using explicit linear interpolation.

Separate numbers with spaces, commas, or newlines. Commas separate values, not thousands. Up to 1,000 values, 20,000 characters; magnitude ≤ 10¹⁰⁰.

Method: linear interpolation (type 7), including endpoints.

Assumptions & limits

Linear interpolation (Hyndman–Fan type 7) is used for every percentile and quartile. After sorting, use zero-based position (n − 1) × p / 100 and interpolate between adjacent values. p ranges from 0 to 100 inclusive; endpoints are minimum and maximum. Q1, median and Q3 are the 25th, 50th and 75th percentiles; IQR = Q3 − Q1. One value returns that value for every percentile and IQR zero. Other methods, including nearest rank or median-of-halves, can differ. This finds a data value at a percentile, not a percentile rank for a score.

YOUR ANSWER

Percentile 90

37

Q1 (25th)
17.5
Median (50th)
25
Q3 (75th)
32.5
IQR
15
Count
4
Minimum
10
Maximum
40
How it’s calculatedCalculated on your device

Type 7: sort ascending, h = (n − 1)p/100, j = floor(h), g = h − j. Result = (1 − g)x[j] + gx[j+1], with zero-based indices. Endpoints use min/max.

Displayed values may be rounded. Calculations keep the underlying precision.

Method: Hyndman–Fan type 7, linear interpolation including both endpoints. Use 1–1,000 values, at most 20,000 characters, magnitude ≤ 10¹⁰⁰. Commas, spaces and newlines separate values. One observation supplies every percentile; p = 0 is minimum and p = 100 is maximum. Repeated observations are retained. Results use binary floating-point arithmetic.

The formula, made simple

Find a data value at any percentile from 0 to 100, plus the first quartile, median, third quartile and interquartile range. Every result uses the same clearly specified interpolation method.

Sort values ascending. For percentile p, h = (n − 1)p/100, j = floor(h) and g = h − j. Using zero-based positions, result = (1 − g)x[j] + gx[j+1]. An integer position uses that value directly. Q1 = P25, median = P50, Q3 = P75, IQR = Q3 − Q1.

A worked example

For 10, 20, 30, 40, P90 uses h = 2.7, giving 0.3 × 30 + 0.7 × 40 = 37. Q1 = 17.5, median = 25, Q3 = 32.5, and IQR = 15.

A few useful answers

Why does another calculator give different quartiles?

Percentiles have multiple conventions. Nearest rank, median-of-halves and different interpolation positions can produce different answers, especially in small samples. This tool always uses type 7 for both requested percentiles and quartiles.

Is this percentile rank?

No. You supply a percentile and receive the corresponding data value. Percentile rank instead asks what proportion of observations fall below or at a particular score and needs a tie convention.

Back to calculator ↑