Quartile & Percentile Calculator

Quartiles split sorted data into four equal parts and are the basis of box plots. Enter your data to get the quartiles, the interquartile range, the 1.5 × IQR outlier fences and any percentile you choose.

How it is calculated

Enter your data separated by commas.

Choose a percentile if you need one.

Read the quartiles, IQR and fences.

Formula

IQR: IQR = Q3 − Q1

Fences: Q1 − 1.5 × IQR and Q3 + 1.5 × IQR

What is the Quartile & Percentile Calculator?

Quartiles cut a sorted data set into four equal parts. Q1 has a quarter of the values below it, Q2 is the median, and Q3 has three quarters below it. This calculator finds all three, the interquartile range (IQR) between Q1 and Q3, the outlier fences at 1.5 × IQR beyond the quartiles, and any percentile you ask for.

Quartiles are the right summary when data is skewed or has extreme values. Salaries, house prices, commute times and exam marks with a few very high scores are all examples, because the mean and standard deviation get pulled by extremes. Box plots, the five-number summary taught in Class 11 and college statistics, and percentile ranks in entrance exams all rest on these ideas.

How to calculate it by hand

1. Sort the data from smallest to largest.

2. For a quantile q (0.25 for Q1, 0.5 for the median, 0.75 for Q3, or p ÷ 100 for the pth percentile), compute the position (n − 1) × q, counting the first value as position 0.

3. If the position is a whole number, the quantile is the value at that position.

4. If not, interpolate: take the value at the lower position and add the fractional part times the gap to the next value.

5. Interquartile range: IQR = Q3 − Q1.

6. Outlier fences: Q1 − 1.5 × IQR and Q3 + 1.5 × IQR. Values outside them are flagged as possible outliers.

Why textbooks disagree on quartiles

There is no single agreed definition of a quartile for a finite list. Some school books take the median of the lower and upper halves. Others use the position (n + 1) × q. This calculator uses linear interpolation at position (n − 1) × q, the method used by Excel's QUARTILE.INC and PERCENTILE.INC and the default in many software packages. For large data sets all methods agree closely. For small ones they can differ by a whole step, so always state which method you used and check which one your syllabus expects.

The IQR ignores the extremes on purpose

The range, maximum minus minimum, depends entirely on the two most extreme values, so a single typing error can double it. The interquartile range covers only the middle half of the data and does not move at all if the largest value becomes ten times larger. This robustness makes it the preferred spread measure for skewed data. For normally distributed data, the IQR is about 1.35 standard deviations, which gives a quick way to compare the two.

Where the 1.5 × IQR rule comes from

The fences were proposed by the statistician John Tukey for box plots. They are a rule of thumb, not a law. For normal data, points beyond the fences are rare, only about 0.7% of observations, so anything outside deserves a second look. It might be a data-entry error, a measurement fault or a real but unusual case that is worth studying. Never delete a flagged point automatically. Some analysts also use outer fences at 3 × IQR for extreme outliers.

Worked example, step by step

An HR team in Gurugram recorded the one-way commute times, in minutes, of 11 employees: 23, 29, 31, 35, 38, 41, 44, 47, 52, 58 and 95. They want the quartiles, any unusually long commutes, and the 80th percentile.

Sort the data: 23, 29, 31, 35, 38, 41, 44, 47, 52, 58, 95

Quartiles (linear interpolation at (n − 1) × q): Q1 = 33, Q2 = 41, Q3 = 49.5

Interquartile range: IQR = Q3 − Q1 = 49.5 − 33 = 16.5

Outlier fences: Q1 − 1.5 × IQR = 8.25, Q3 + 1.5 × IQR = 74.25

80th percentile: position = (11 − 1) × 0.8 = 8 → 52

Answer: Q1, Median, Q3 33, 41, 49.5; Interquartile range (IQR) 16.5; 80th percentile 52

Common mistakes to avoid

Forgetting to sort the data before finding positions.

Mixing quartile methods between the working and the answer key, then assuming one of them is wrong.

Using the range instead of the IQR to describe spread in skewed data.

Deleting points outside the fences without checking whether they are real.

Confusing a percentile of the data with a percentage score.

Where it is used

Drawing box plots and five-number summaries for reports and projects.

Describing salary bands, rents and property prices, which are usually skewed.

Screening data sets for errors and outliers before analysis.

Setting performance bands, such as top quartile or bottom quartile.

Reporting percentile values in growth charts and test score distributions.

Frequently asked questions

Why do different textbooks give slightly different quartiles?

There are several methods. This calculator uses linear interpolation, the same as Excel's QUARTILE.INC.

Is the median the same as Q2?

Yes, and it is also the 50th percentile.