Skip to content

Percentile Calculator from a Data Set

A percentile calculator from data set values: paste your numbers to find any percentile, the quartiles and IQR, or the percentile rank of one value.

Calculation

Separate numbers with commas, spaces or new lines. Don't use thousands separators: write 1000, not 1,000.

From 0 to 100. For example, 90 finds the 90th percentile.

90th percentile

39.5Linear interpolation, the same as Excel PERCENTILE.INC.
Q1 (25th percentile)
19.5
Median (50th)
25
Q3 (75th percentile)
31.25
Interquartile range (IQR)
11.75
Count
12
Minimum
12
Maximum
45

Formula: h = (12 − 1) × 90 ÷ 100 = 9.9 → 35 + 0.9 × (40 − 35) = 39.5

How to use the Percentile Calculator

  1. Paste or type your data set, with numbers separated by commas, spaces or new lines.
  2. Choose “Find a percentile” to get the value at a given percentile, or “Percentile rank of a value” to see where one number stands.
  3. Enter the percentile P (0 to 100) or the value you want to rank.
  4. Read the result, the interpolation step under it and, in find mode, the quartiles Q1, median and Q3 with the interquartile range.

Formula

h = (n − 1) × P ÷ 100 Pth percentile = x⌊h⌋ + (h − ⌊h⌋) × (x⌊h⌋+1 − x⌊h⌋)

Where:

n
How many numbers are in the data set
P
The percentile you want, from 0 to 100 (25 for Q1, 50 for the median, 75 for Q3)
x₀ … xₙ₋₁
The data sorted from smallest to largest, numbered from 0, so x₀ is the minimum and xₙ₋₁ the maximum
h
The position of the percentile in the sorted list, counted from 0; it can fall between two values
⌊h⌋
h rounded down to a whole number: the value just below the position
Percentile rank
(B + ½E) ÷ n × 100, where B is how many values are below the number and E how many equal it

This is linear interpolation between closest ranks (Hyndman & Fan definition 7), used by Excel PERCENTILE.INC, Google Sheets PERCENTILE, NumPy and R by default. Other methods, such as PERCENTILE.EXC or nearest rank, can give slightly different answers on small data sets.

Worked example

A freelancer's last ten project fees were $450, $600, $750, $800, $900, $1,000, $1,200, $1,500, $2,000 and $3,500. What is the 75th percentile fee, and what is the interquartile range?

  1. The fees are already sorted, and n = 10.
  2. Position of the 75th percentile: h = (10 − 1) × 75 ÷ 100 = 6.75.
  3. Counting from 0, x₆ = $1,200 and x₇ = $1,500, so the percentile lies 0.75 of the way between them.
  4. 75th percentile = 1,200 + 0.75 × (1,500 − 1,200) = $1,425.
  5. Q1: h = 9 × 0.25 = 2.25, so Q1 = 750 + 0.25 × (800 − 750) = $762.50. IQR = 1,425 − 762.50 = $662.50.

The 75th percentile fee is $1,425, the first quartile is $762.50, and the middle half of the fees spans an interquartile range of $662.50.

How to find a percentile of a data set

A percentile describes position, not size: the 90th percentile is the value that about 90% of the data falls at or below. Twelve students scored 55, 62, 68, 70, 74, 74, 79, 81, 85, 88, 91 and 96 on a quiz. To find the 90th percentile by hand:

  1. Sort the numbers from smallest to largest (the tool does this for you).
  2. Find the position h = (n − 1) × P ÷ 100, counting the first value as position 0. Here h = 11 × 0.9 = 9.9.
  3. Interpolate. Positions 9 and 10 hold 88 and 91, so the answer is 88 + 0.9 × (91 − 88) = 90.7.

The same three steps give any other percentile:

PercentilePosition hValue
10th1.162.6
25th (Q1)2.7569.5
50th (median)5.576.5
75th (Q3)8.2585.75
90th9.990.7
95th10.4593.25

Find a percentile mode returns one requested percentile at a time with the interpolation line under it, plus the quartiles, count, minimum and maximum. It does not print a table of several percentiles, so change P to build one.

Percentile rank: where a value stands

The second mode reverses the question and works as a percentile rank calculator: enter one value and see what share of the data lies below it. For the student who scored 79, six scores are lower and one equals it. Counting the tie as half, the rank is (6 + 0.5) ÷ 12 × 100 = 54.17%. The result also shows the strictly-below share, 6 ÷ 12 = 50%, and the at-or-below share, 7 ÷ 12 = 58.33%, because some textbooks use those definitions.

Quartiles and the interquartile range (IQR)

Three percentiles have their own names: the 25th is the first quartile (Q1), the 50th is the median and the 75th is the third quartile (Q3). They appear with every percentile result, so the page doubles as a quartile calculator and an IQR calculator. For the quiz, Q1 = 69.5 and Q3 = 85.75, so the interquartile range is 85.75 − 69.5 = 16.25 points.

The IQR measures the spread of the middle half of the data and ignores the top and bottom quarters, so one unusual value cannot inflate it. A common rule flags values below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR as possible outliers. Those fences are not calculated for you: here they are 69.5 − 24.375 = 45.125 and 85.75 + 24.375 = 110.125, so no quiz score is flagged. There is no box plot either.

Why Excel and textbooks give different percentiles

With thousands of values every sensible method agrees. With a dozen, the answer depends on how the gaps between data points are treated, and at least nine rules have been published. The method used here is linear interpolation at position (n − 1) × P ÷ 100, the default in Excel (PERCENTILE.INC and QUARTILE.INC), Google Sheets, NumPy and R. Its 0th percentile is always the minimum, its 100th the maximum and its 50th the median.

It is the only method offered, so answers from these rules cannot be reproduced here:

  • PERCENTILE.EXC uses position (n + 1) × P ÷ 100, counted from one. On the quiz data it gives Q1 = 68.5 and Q3 = 87.25.
  • Nearest rank takes the value at position ⌈P ÷ 100 × n⌉ with no interpolation, giving Q1 = 68.
  • Tukey's hinges take the median of each half of the data, as in many hand-drawn box plots.

If a homework answer differs from yours by a small amount, a different method is almost always the reason.

Percentile, percentage and percentile rank compared

TermQuestion it answersQuiz example
PercentageWhat share of the marks did I get?79 marks out of 100 is 79%
PercentileWhich value sits at a given position?The 90th percentile is 90.7
Percentile rankWhat share of the group is below my value?A score of 79 ranks at 54.17%

Tips and common mistakes

  • The actual data is required. Only a pasted list of numbers is accepted. For a percentile from a mean and a standard deviation, which assumes a normal distribution, use the z-score page. Grouped data and frequency tables are not supported.
  • Remove thousands separators. A comma starts a new number, so 1,250 becomes 1 and 250.
  • Be wary of small samples. With ten values each one covers ten percentage points, so a 95th percentile is mostly interpolation. Report the count with it.
  • Prefer percentiles to averages for skewed data. Incomes, house prices and response times have long upper tails; the median and the 90th percentile describe them more honestly than the mean.
  • Keep the comparison group in mind. A salary ranks very differently against national data and against one company's payroll.

Frequently asked questions

How do I find the percentile of a data set?

Sort the data from smallest to largest and find the position h = (n − 1) × P ÷ 100, counting the first value as position 0. If h is a whole number, the percentile is the value at that position. Otherwise, take the value just below and move the fractional part of h toward the next value. For 10, 20, 30 and 40, the 50th percentile sits at h = 1.5, halfway between 20 and 30, so it is 25.

What is percentile rank in statistics?

Percentile rank answers the reverse question: where does one value stand? Count the values below it (B) and equal to it (E), then compute (B + ½E) ÷ n × 100. Counting ties as half keeps the rank fair when many people share a score. The calculator also shows the strictly-below and at-or-below versions, since some textbooks use those instead.

How do I find the quartiles and IQR of a data set?

Quartiles split sorted data into four equal parts. Q1 is the 25th percentile, the median is the 50th and Q3 is the 75th, each found with the same position formula. The interquartile range, Q3 − Q1, is the spread of the middle half of the data. Because it ignores the top and bottom quarters, a single extreme value barely moves it, which makes it a robust measure of spread.

How do I calculate a percentile in Excel?

Use =PERCENTILE.INC(range, 0.9) for the 90th percentile and =QUARTILE.INC(range, 1) for Q1; this calculator matches both. There are at least nine published ways to compute a sample percentile. Excel PERCENTILE.EXC uses h = (n + 1) × P ÷ 100, and some textbooks use the nearest-rank method, which never interpolates. On large data sets the methods agree closely; on ten or twenty values they can differ noticeably.

Does the top 10% mean the 90th percentile?

Yes, in practice. The 90th percentile is the value that about 90% of the data falls at or below, so values above it make up the top 10%. On a small data set the match is approximate, because the percentile is interpolated between two neighboring values and tied values share a position. In the same way, the bottom quarter lies below the 25th percentile, Q1.

What is the difference between a percentile and a percentage?

A percentage is a share of a whole, such as scoring 80% on a test. A percentile describes position within a group: being in the 80th percentile means you scored as well as or better than about 80% of the people in the data, whatever your raw score was. A score of 62% can be the 90th percentile on a hard exam.

Last updated: