Skip to content
Other

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.

Your details

Enter numbers separated by commas, spaces, or line breaks. Decimals are fine.
Different textbooks and software use different conventions. Exclusive is the most common in introductory statistics.
Third Quartile (Q3)Wide spread
23

75th percentile: the value below which 75% of the data falls

First Quartile (Q1)10
Median (Q2)16.5
Interquartile Range (IQR)13
Minimum4
Maximum30
Range26
Count (n)10
Q1 (25th percentile)10
Q2 Median (50th percentile)16.5
Q3 (75th percentile)23

Q3 = 23.0000 - the upper quartile of your 10-point dataset.

  • The middle 50% of your data (the interquartile range) spans from 10.0000 to 23.0000, a width of 13.0000.
  • The median sits at 16.5000, and the full range is 4.0000 to 30.0000.
  • Q1 and Q3 are roughly equidistant from the median, suggesting a fairly symmetric distribution.

Next stepUsing the Exclusive (Tukey) method. Switch the method selector if your textbook or software gives a different result - the three methods can disagree by a small amount, especially for small datasets.

Formula

IQR=Q3Q1Q1=median of lower half,  Q3=median of upper half\text{IQR} = Q_3 - Q_1 \quad\quad Q_1 = \text{median of lower half},\; Q_3 = \text{median of upper half}

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

  1. Sort the data in ascending order from smallest to largest.
  2. 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.
  3. 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.)
  4. Q3 is the median of the upper half: apply the same median rule to the upper half.
  5. IQR = Q3 - Q1: subtract the first quartile from the third.
For example, with the dataset 4, 7, 10, 12, 15, 18, 20, 23, 27, 30 (n=10): Q2 = (15+18)/2 = 16.5; the upper half is 18, 20, 23, 27, 30 and its median is 23; so Q3 = 23.

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.
For the example dataset (Q1=10, Q3=23, IQR=13), the mild fences are -9.5 and 42.5, so no values are flagged as outliers. A dataset with a value of 60 would trigger a mild-outlier flag because 60 > 42.5.

Five-number summary and IQR at a glance

StatisticSymbolWhat it means
MinimumMinSmallest value in the dataset
First QuartileQ125% of data falls below this value
MedianQ250% of data falls below this value (middle value)
Third QuartileQ375% of data falls below this value
MaximumMaxLargest value in the dataset
Interquartile RangeIQRQ3 - Q1: spread of the middle 50%
Mild outlier fence1.5 x IQRValues beyond Q1 - 1.5*IQR or Q3 + 1.5*IQR
Extreme outlier fence3 x IQRValues 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.

Sources

Written by Grace Mbeki, MSc Data Scientist & Educator · Nairobi, Kenya

Turning everyday numbers into clear, actionable answers for the decisions that matter most.

Search 3,500+ calculators

Loading search…