Statistics
Quartiles from five sorted values
With five ordered observations the median is x3, so each half contains two values and its midpoint is the mean of those two values.
Last updated
The Formula
Q1 = (x1 + x2) / 2, Q3 = (x4 + x5) / 2
With five ordered observations the median is x3, so each half contains two values and its midpoint is the mean of those two values.
| Symbol | Meaning | Unit | Notes |
|---|---|---|---|
| x1, x2 | Two smallest sorted values | same as data | Their average gives the lower quartile, (3 + 7) / 2 = 5 by default. |
| x4, x5 | Two largest sorted values | same as data | Their average gives the upper quartile, (12 + 20) / 2 = 16 by default. |
| x3 | Middle sorted value | same as data | The median, reported separately and equal to 8 by default. |
What Each Symbol Means
x1, x2same as data
Two smallest sorted values
Their average gives the lower quartile, (3 + 7) / 2 = 5 by default.
x4, x5same as data
Two largest sorted values
Their average gives the upper quartile, (12 + 20) / 2 = 16 by default.
x3same as data
Middle sorted value
The median, reported separately and equal to 8 by default.
See It Worked With Real Numbers
A formula on its own does not tell you which number goes where. The how to calculate the interquartile range page applies this equation to a concrete case, shows every intermediate step, and names the mistakes that produce a wrong answer even when the algebra is right.
Where This Formula Appears
This equation is the working core of How To Calculate The Interquartile Range, filed under Math. Every number the guide produces comes from substituting into this one line.
Common Questions
What is the formula for Quartiles from five sorted values?
The formula for Quartiles from five sorted values is Q1 = (x1 + x2) / 2, Q3 = (x4 + x5) / 2. With five ordered observations the median is x3, so each half contains two values and its midpoint is the mean of those two values.
What does each symbol in Quartiles from five sorted values stand for?
x1, x2 is two smallest sorted values; x4, x5 is two largest sorted values; x3 is middle sorted value.
What units should I use with Quartiles from five sorted values?
Substitute x1, x2 in same as data, x4, x5 in same as data, x3 in same as data. Convert every input to those units before you start, because the equation only returns the right answer when the units on both sides agree.
What is a common mistake when using Quartiles from five sorted values?
Assuming every source uses the same quartile convention. Including or excluding the median from each half, or interpolating at percentile ranks, can change the answer. With five observations the differences are visible. The value 11 is correct for the median-of-halves method used here, so name the convention whenever you compare results with a textbook or spreadsheet.