Third Quartile Calculator: Q3, IQR, and Five-Number Summary
Paste or type any list of numbers to find the third quartile (Q3), first quartile (Q1), median, interquartile range (IQR), and the complete five-number summary. Choose from three standard quartile methods used in textbooks and spreadsheet software. The step-by-step panel shows exactly how the result is reached, and outliers are flagged automatically.
Formula
Worked example
Dataset: 4, 7, 10, 12, 15, 18, 20, 23, 27, 30 (n=10, already sorted). Median (Q2) = (15+18)/2 = 16.5. Lower half: 4,7,10,12,15 - Q1 = 10. Upper half: 18,20,23,27,30 - Q3 = 23. IQR = 23 - 10 = 13. Mild outlier fences: 10 - 1.5*13 = -9.5 and 23 + 1.5*13 = 42.5. No outliers in this dataset.
What is the third quartile (Q3)?
The third quartile, also called the upper quartile or Q3, is the value that separates the top 25% of a sorted dataset from the bottom 75%. Put another way, it is the 75th percentile: 75% of the data points lie at or below Q3 and 25% lie above it. Together with Q1 (the 25th percentile) and Q2 (the median, or 50th percentile), Q3 forms part of the five-number summary used in descriptive statistics and box plots. The five-number summary is: minimum, Q1, median, Q3, maximum.
How to calculate Q3 step by step
- Sort the data in ascending order from smallest to largest.
- Find the median (Q2): if n is odd, the median is the middle value; if n is even, it is the average of the two middle values.
- Split the data into two halves: the lower half is all values below the median position and the upper half is all values above it. (The exact split depends on which method you choose - see below.)
- Q3 is the median of the upper half: apply the same median rule to the upper half.
- IQR = Q3 - Q1: subtract the first quartile from the third.
Three quartile methods and when they differ
There is no single universal formula for quartiles. Three methods appear most often in practice:
Exclusive (Tukey / most introductory textbooks): When n is odd, the median element is excluded from both halves before computing Q1 and Q3. This is the method used by R's default quantile() function and most high-school and college statistics courses.
Inclusive (Moore-McCabe / Excel QUARTILE or QUARTILE.INC): When n is odd, the median element is included in both halves. This is the method Microsoft Excel uses by default and it tends to give slightly different results for small datasets.
Nearest rank / linear interpolation (Excel QUARTILE.EXC): Q1 is found at position (n+1)/4 and Q3 at position 3(n+1)/4 in the sorted list, with linear interpolation when the position falls between two data points. This is the method used by Excel's QUARTILE.EXC function and some statistical software.
For large datasets (n > 30), the three methods produce nearly identical results. Differences are most visible when n is small. Always state which method you used when reporting quartiles.
Interquartile range (IQR) and outlier detection
The interquartile range (IQR = Q3 - Q1) measures the spread of the central half of a distribution. It is more robust than the full range because it is not affected by extreme values. John Tukey's box-plot method uses the IQR to flag outliers:
- Mild outliers: values below Q1 - 1.5*IQR or above Q3 + 1.5*IQR.
- Extreme outliers: values below Q1 - 3*IQR or above Q3 + 3*IQR.
Five-number summary and IQR at a glance
| Statistic | Symbol | What it means |
|---|---|---|
| Minimum | Min | Smallest value in the dataset |
| First Quartile | Q1 | 25% of data falls below this value |
| Median | Q2 | 50% of data falls below this value (middle value) |
| Third Quartile | Q3 | 75% of data falls below this value |
| Maximum | Max | Largest value in the dataset |
| Interquartile Range | IQR | Q3 - Q1: spread of the middle 50% |
| Mild outlier fence | 1.5 x IQR | Values beyond Q1 - 1.5*IQR or Q3 + 1.5*IQR |
| Extreme outlier fence | 3 x IQR | Values beyond Q1 - 3*IQR or Q3 + 3*IQR |
Standard descriptive statistics produced from your dataset.
Frequently asked questions
What does Q3 mean in statistics?
Q3, the third quartile, is the value at the 75th percentile of a sorted dataset. Exactly 75% of data points fall at or below Q3 and 25% fall above it. It marks the right edge of the box in a box-and-whisker plot.
How is Q3 different from the mean or median?
The median (Q2) splits data exactly in half, and the mean is the arithmetic average of all values. Q3 specifically marks the 75% point. In a symmetric, bell-shaped distribution the median and mean are close together, and Q3 sits roughly 0.67 standard deviations above the mean. In a skewed distribution these measures can differ substantially.
Why does my textbook give a different Q3 than Excel?
Different quartile methods give different answers for the same dataset. Excel's QUARTILE and QUARTILE.INC functions use the inclusive method, QUARTILE.EXC uses interpolation, and most statistics textbooks use the exclusive (Tukey) method. For small datasets these methods can produce noticeably different values. This calculator lets you choose the method to match your software or textbook.
What is the interquartile range (IQR) used for?
The IQR (Q3 - Q1) measures the spread of the middle 50% of data. It is used to detect outliers (any value more than 1.5 times the IQR above Q3 or below Q1 is considered a potential outlier), to compare variability across datasets without being affected by extreme values, and as a building block for robust statistics like the median absolute deviation.
What is the five-number summary?
The five-number summary is a compact description of a dataset consisting of: the minimum, the first quartile (Q1), the median (Q2), the third quartile (Q3), and the maximum. These five numbers define the box-and-whisker plot. This calculator reports all five values along with the range and IQR.
How do I find Q3 for an odd number of data points?
With an odd number of data points (say n = 9), find the median - it is the single middle value. For the exclusive method, exclude that middle value and take the median of the four values to its right; that is Q3. For the inclusive method, include the median in the upper half (giving five values) and take their median. The two methods can give different results.
Can Q3 equal the maximum value?
Yes. If the top 25% of a dataset is dominated by a single repeated value (for example, a dataset where the top quarter of observations all equal 100), Q3 and the maximum can both equal that value. This often signals a ceiling effect or a heavily right-skewed distribution.