Percentile Calculator
Paste any dataset and find the value at any percentile (P50, P90, …), the percentile rank of a score, quartiles and IQR — with a box plot and a side-by-side method comparison.
Value at a percentile
Linear interpolation (type 7) is the default in R and NumPy. Nearest-rank always returns an actual data point.
Summary statistics
Box plot
Method comparison
| Percentile | Linear (type 7) | Nearest-rank |
|---|
Sorted data with ranks
| # | Value | Nearest-rank percentile |
|---|
Percentile rank of a value
What percentage of the dataset does a value beat? Computed as (values below + ½ × ties) ÷ n × 100.
Worked example: 20 exam scores
Dataset (sorted): 55, 61, 65, 68, 69, 70, 72, 73, 76, 77, 79, 81, 82, 84, 86, 88, 90, 91, 94, 95
Rank position h = (20 − 1) × 0.90 + 1 = 18.1 → between the 18th value (91) and 19th value (94).
P90 = 91 + 0.1 × (94 − 91) = 91.3
P90 by nearest-rank: round 0.90 × 20 = 18 up → 18th value = 91
Quartiles: Q1 (P25) = 69.75, median (P50) = 78, Q3 (P75) = 86.5.
IQR = 86.5 − 69.75 = 16.75 — the middle half of students scored within a 16.75-point band.
Percentile rank of 85: 14 scores below, 0 ties → (14 + 0) ÷ 20 × 100 = 70th percentile.
Method reference
| Method | Formula (sorted x, 1-indexed) | Notes |
|---|---|---|
| Linear interpolation (type 7) | h = (n−1)·p/100 + 1; x⌊h⌋ + (h−⌊h⌋)(x⌊h⌋+1 − x⌊h⌋) | Default in R, NumPy, and this tool |
| Nearest-rank | r = ⌈p/100 · n⌉; xr | Always returns an actual data point |
| Percentile rank | (#<v + ½·#=v) / n × 100 | Ties count as half a win |
| Outlier fences | Q1 − 1.5·IQR, Q3 + 1.5·IQR | Tukey fences; plotted on the box plot |
Frequently asked questions
What is a percentile?
A percentile tells you where a value stands inside a dataset. If your score is at the 90th percentile (P90), you scored higher than 90% of the values in the dataset. P50 is the median — half the values are below it and half above.
How is P90 of the worked exam example equal to 91.3?
The 20 exam scores sorted are 55, 61, 65, 68, 69, 70, 72, 73, 76, 77, 79, 81, 82, 84, 86, 88, 90, 91, 94, 95. With linear interpolation (type 7), the rank position is h = (20−1) × 0.90 + 1 = 18.1, so P90 sits 0.1 of the way between the 18th value (91) and the 19th value (94): 91 + 0.1 × (94 − 91) = 91.3. The nearest-rank method instead rounds up to the 18th value, 91.
What is the difference between linear interpolation and nearest-rank?
Linear interpolation (type 7, the R and NumPy default) can land between two data points — for the dataset 1 to 10, P25 is 3.25, a quarter of the way from 3 to 4. Nearest-rank always returns an actual data point: it rounds the rank up, so P25 of 1 to 10 is the 3rd value, 3. Interpolation is smoother and standard in statistics; nearest-rank is simpler and never invents values.
What is percentile rank, and how is it different from a percentile?
They are inverses. A percentile answers “what value is at P percent?”; percentile rank answers “what percent of values is this value above?”. It is computed as (values below + half the ties) ÷ n × 100. Example: in the scores 55, 60, 65, 70, 75, 80, 85, 90, 95, 100, a score of 85 beats 6 scores and ties 1, so its percentile rank is (6 + 0.5) ÷ 10 × 100 = 65.
How does the calculator handle tied values?
Each tied value counts as half a win in the percentile-rank formula. In the dataset 70, 70, 70, 80, 90, the value 70 has 0 values below it and 3 ties, so its percentile rank is (0 + 0.5 × 3) ÷ 5 × 100 = 30. This is the standard competition-style convention and keeps the ranks symmetric.
What do Q1, Q3, and IQR tell me about my data?
Q1 (25th percentile) and Q3 (75th percentile) bracket the middle half of your data; the interquartile range IQR = Q3 − Q1 measures its spread. For the worked exam scores, Q1 = 69.75, Q3 = 86.5, so IQR = 16.75 — the middle 50% of students scored within a 16.75-point band. Values beyond Q1 − 1.5×IQR or Q3 + 1.5×IQR are flagged as outliers on the box plot.
Is this the same as baby or child growth percentiles?
No — that is a different method for a different question. Growth percentiles (for example baby weight or child BMI percentiles) compare one measurement against a published reference population using LMS z-scores from WHO, CDC, or INTERGROWTH-21st standards. This calculator computes percentiles of any dataset you paste, using rank-based statistics, and must never be used to interpret a child's growth chart.
Why can P50 differ from the “middle” value I expect?
With an even number of values there is no single middle value, so interpolation averages the two middle ones — the worked exam scores give P50 = 78, the average of the 10th (77) and 11th (79) sorted scores. Nearest-rank instead picks the upper middle value. Both are legitimate; statistics software defaults to the interpolated version.
Free tool by NRTechStudio