Find Q1 and Q3:
sort, rank, interpolate
A sort-and-count method for the first and third quartiles, three worked data sets, and the reason your answer can differ from a classroom method.
Calcylator Editorial Team
Updated · 5 min read
How to find Q1 and Q3 from a list of numbers
Q1 is the value below which a quarter of your data falls, and Q3 is the value below which three quarters fall. To find Q1, sort the numbers from smallest to largest, then locate the 25th percentile. Q3 is found the same way at the 75th percentile.
Quartiles split a sorted list into four parts with roughly equal counts. Q1 is the lower quartile, Q2 is the median, and Q3 is the upper quartile. They are popular because they ignore extreme values, so one huge number does not drag them around the way it drags the mean.
Quartiles show up in everyday reporting: a school comparing exam marks, an HR team describing a salary band, or a courier firm checking its slowest quarter of deliveries. Each is asking for the same thing, a cut-off that splits the sorted data at a quarter.
The Q1 formula and rank position
- p:
- 25 for Q1, 75 for Q3
- n:
- how many values are in the sorted list
- rank:
- position counted from 0, so the first value is at rank 0
The Calcylator Q1 calculator computes percentile(values, 25), which is this linear-interpolation rule. It matches the inclusive percentile method used by spreadsheet functions such as PERCENTILE.INC and QUARTILE.INC.
Sorted data
4, 7, 9, 12, 15, 18, 21, 25, 30
n
9
Rank for Q1
0.25 × 8 = 2
Q1
9
The rank 2 is a whole number, so Q1 is the value at position 2, which is 9. For Q3 the rank is 0.75 × 8 = 6, giving 21.
Q1 and Q3 when the rank is a fraction
Take 8 values: 3, 5, 8, 10, 14, 17, 20, 26. The Q1 rank is 0.25 × 7 = 1.75, so Q1 sits three quarters of the way from 5 to 8. That is 5 + 0.75 × (8 − 5) = 7.25.
The Q3 rank is 0.75 × 7 = 5.25, a quarter of the way from 17 to 20, which gives 17.75. Neither answer has to be a value that appears in your data, and that is normal.
| Method | Q1 | Q3 |
|---|---|---|
| Linear interpolation (this calculator) | 7.25 | 17.75 |
| Median of each half (many textbooks) | 6.5 | 18.5 |
Both are legitimate. Agree with your teacher, software or report on one method before you compare answers.
Using Q1 and Q3: the interquartile range and outliers
Subtract to get the interquartile range, IQR = Q3 − Q1. It measures the spread of the middle half of your data. For 6, 12, 15, 15, 18, 22, 25, 31, 40, 95, Q1 is 15 and Q3 is 29.5, so the IQR is 14.5.
A common rule flags a value as a possible outlier if it lies more than 1.5 × IQR beyond a quartile. Here 1.5 × 14.5 = 21.75, so the upper fence is 51.25. The value 95 is above it, while the mean of this list would be pulled up sharply by that single number.
- Exam marks: Q1 shows the score that a quarter of students stayed below.
- Salaries or house prices: quartiles describe typical ranges better than the mean.
- Delivery times: Q3 tells you how long the slower quarter of orders take.
Common mistakes when finding Q1 and Q3
- Forgetting to sort first. Quartiles only make sense on ordered data.
- Using n instead of n − 1 in the rank formula, which shifts every answer by one position.
- Counting positions from 1 and from 0 inconsistently. The rank formula above counts from 0.
- Comparing answers from different methods and assuming one of them is wrong.
- Typing percentages or text into the list. The calculator needs plain numbers.
Common questions
How do I find Q1 and Q3?
Sort the data, then compute rank = 0.25 × (n − 1) for Q1 and 0.75 × (n − 1) for Q3, counting from 0. If the rank is a fraction, interpolate between the two neighbouring values. Q1 is the 25th percentile, Q3 the 75th.
What is the formula for Q1?
Q1 is the 25th percentile. With n sorted values, find the position 0.25 × (n − 1) counting from zero, then read the value there, interpolating between neighbours if the position is not a whole number.
Why does my textbook give a different Q1?
Several valid quartile methods exist. Some textbooks take the median of the lower half of the data, while spreadsheets and this calculator interpolate. For the data 3, 5, 8, 10, 14, 17, 20, 26 they give 6.5 and 7.25 respectively.
What is the difference between Q1 and Q3?
Q1 is the lower quartile, below which 25 percent of the data falls. Q3 is the upper quartile, below which 75 percent falls. Their difference, Q3 minus Q1, is the interquartile range, which measures the spread of the middle half.
Was this guide helpful?
Continue reading
View all blogsPercentile rank estimate: formula and worked example
Estimate a percentile rank as the share of a group scoring below a value, with a 37-of-50 example, a sensitivity table and how ties are handled.
4 min read
Median absolute deviation: formula and worked example
Compute the median absolute deviation for five values with a median of 4, and see why one outlier barely moves it compared with the standard deviation.
5 min read
Margin of error for proportion: formula and worked example
Calculate a survey proportion's margin of error at 95% confidence, with a 50% result from 400 people, a sensitivity table and the sample-size trade-off.
4 min read




