Quartile Formula - Q1, Q2, Q3 with Examples

#Formula
TL;DR
The quartile formula locates Q1Q_1 at the 0.25(N+1)0.25(N+1)th ordered value and Q3Q_3 at the 0.75(N+1)0.75(N+1)th. This article gives five worked examples and the convention warning.
BT
Bhanzu TeamLast updated on November 4, 20266 min read

Key Points

  • The quartile formula locates quartiles by position in the ordered data, with Q1Q_1 at the 0.25(N+1)0.25(N+1)th value and Q3Q_3 at the 0.75(N+1)0.75(N+1)th.

  • The NIST e-Handbook of Statistical Methods uses these positions and interpolates between neighbouring values when the position is not a whole number.

  • Q2Q_2 is the median, so the three quartiles split an ordered data set into four groups of equal count.

  • The data must be sorted before any quartile position means anything, because quartiles are defined by rank rather than by value.

  • More than one quartile convention is in use, so two defensible methods can give different quartiles for the same small data set.

What Is the Quartile Formula?

The quartile formula finds the three values that cut an ordered data set into four equal-sized groups. The NIST/SEMATECH e-Handbook of Statistical Methods places them at these positions:

Q1 at the 0.25(N+1)th ordered value,Q3 at the 0.75(N+1)thQ_1 \text{ at the } 0.25(N+1)\text{th ordered value}, \qquad Q_3 \text{ at the } 0.75(N+1)\text{th}

Q2Q_2 sits at the 0.5(N+1)0.5(N+1)th position, the median. Where a position falls between two ranks, interpolate.

The Full Definition

A quartile is a cut point, not a count. Q1Q_1 has a quarter of the data at or below it, Q2Q_2 has half, and Q3Q_3 has three quarters. Because the definition is positional, the formula returns a rank first and a value second, which is why sorting is part of the method rather than a preliminary to it.

Variable Key

Symbol

Meaning

Unit or type

Notes

Q1Q_1

first or lower quartile

same units as the data

the 25th percentile

Q2Q_2

second quartile

same units as the data

the median

Q3Q_3

third or upper quartile

same units as the data

the 75th percentile

NN

number of observations

count

sets every quartile position

kk

quartile index

1, 2 or 3

position is k4(N+1)\frac{k}{4}(N+1)

Examples of the Quartile Formula

Example 1

Find the quartiles of 2, 4, 5, 7, 8, 11, 12, 15, 18, 19, 27.

Here N=11N = 11, so N+1=12N+1 = 12 and the positions are 0.25(12)=30.25(12) = 3, 0.5(12)=60.5(12) = 6 and 0.75(12)=90.75(12) = 9:

Q1=5,Q2=11,Q3=18Q_1 = 5, \qquad Q_2 = 11, \qquad Q_3 = 18

Final answer: Q1=5Q_1 = 5, Q2=11Q_2 = 11, Q3=18Q_3 = 18

Example 2

Find Q1Q_1 of 10, 20, 30, 40, 50, 60, 70, 80, 90, 100 by taking a quarter of the way along the values.

The data runs from 10 to 100, so a quarter of that span looks like the natural cut: 10+0.25(90)=32.510 + 0.25(90) = 32.5.

That is wrong, and the reason matters. The figure 32.5 is a quarter of the way through the range of values, but a quartile is a quarter of the way through the count of observations, and the two agree only when the data is evenly spaced.

Using positions instead, N+1=11N+1 = 11, so Q1Q_1 sits at 0.25(11)=2.750.25(11) = 2.75. Interpolate 75 per cent of the way from the 2nd value to the 3rd:

Q1=20+0.75(30−20)=27.5Q_1 = 20 + 0.75(30 - 20) = 27.5

Final answer: Q1=27.5Q_1 = 27.5

Example 3

Find Q3Q_3 of the same ten values.

The position is 0.75(11)=8.250.75(11) = 8.25, so interpolate a quarter of the way from the 8th value to the 9th:

Q3=80+0.25(90−80)=82.5Q_3 = 80 + 0.25(90 - 80) = 82.5

Final answer: Q3=82.5Q_3 = 82.5

Example 4

Find the quartiles of 3, 9, 4, 15, 7 and then the interquartile range.

Sort first: 3, 4, 7, 9, 15. With N=5N = 5, positions are 0.25(6)=1.50.25(6) = 1.5, 0.5(6)=30.5(6) = 3 and 0.75(6)=4.50.75(6) = 4.5:

Q1=3+42=3.5,Q2=7,Q3=9+152=12Q_1 = \frac{3+4}{2} = 3.5, \qquad Q_2 = 7, \qquad Q_3 = \frac{9+15}{2} = 12 IQR=12−3.5=8.5\text{IQR} = 12 - 3.5 = 8.5

Final answer: Q1=3.5Q_1 = 3.5, Q2=7Q_2 = 7, Q3=12Q_3 = 12, IQR=8.5\text{IQR} = 8.5

Example 5

A data set has Q1=20Q_1 = 20, Q2=24Q_2 = 24 and Q3=36Q_3 = 36. Find its Galton skewness.

The NIST e-Handbook gives Galton skewness as Q1+Q3−2Q2Q3−Q1\frac{Q_1 + Q_3 - 2Q_2}{Q_3 - Q_1}:

20+36−4836−20=816=0.5\frac{20 + 36 - 48}{36 - 20} = \frac{8}{16} = 0.5

Final answer: 0.50.5, a positive value indicating a right-skewed distribution. Quartiles therefore describe shape as well as spread.

Don't Confuse Quartiles With Quarters or Percentiles

Term

What it means

Quartile

one of three cut points dividing data into four equal-count groups

Quarter

one of the four resulting groups, not a cut point

Percentile

the same idea on a 100-point scale, so Q1Q_1 is the 25th percentile

Quartile deviation

Q3−Q12\frac{Q_3 - Q_1}{2}, half the interquartile range

Saying a value "is in the first quartile" usually means it falls in the lowest quarter, while Q1Q_1 is the boundary value itself. Both usages are common.

The Mistakes Students Make Most Often

Mistake 1: Using N instead of N plus 1 in the position

Where it slips in: The data has NN values, so NN feels like the right multiplier.

Don't do this: Position of Q1=0.25NQ_1 = 0.25N.

The correct way: Position of Q1=0.25(N+1)Q_1 = 0.25(N+1). The N+1N+1 counts the gaps between ranks, which is why it also gives the familiar median position N+12\frac{N+1}{2}.

Students who check Q2Q_2 against the median they already know catch a wrong multiplier immediately, since Q2Q_2 must equal the median by definition.

Mistake 2: Reading quartiles off unsorted data

Where it slips in: The formula names positions, so data in collection order looks usable.

Don't do this: Take the 3rd value as Q1Q_1 without sorting.

The correct way: Sort ascending, then count ranks. A Q1Q_1 larger than Q2Q_2 is the signature of unsorted data.

Mistake 3: Assuming every method gives the same quartiles

Where it slips in: Spreadsheets, calculators and textbooks implement different conventions.

Don't do this: Compare a quartile from one method against one from another.

The correct way: Use one convention throughout and name it. On small samples the disagreement can exceed the quantity being measured.

Conclusion

  • The quartile formula gives positions, not values: QkQ_k sits at k4(N+1)\frac{k}{4}(N+1) in the ordered data.

  • Q2Q_2 is always the median, which makes it a free check on any quartile calculation.

  • Sorting is part of the method, because quartiles are defined by rank rather than by value.

  • Quartile conventions differ between tools, so any reported quartile should name the method behind it.

  • To work through data handling with a teacher, explore a 6th grade math tutor or math classes online.

Five Minutes of Practice

Find all three quartiles of 5, 8, 12, 13, 17, 20, 22, 29. Then confirm your Q2Q_2 equals the median, and compute the interquartile range.

Want a live Bhanzu trainer to walk through more statistics problems? Book a free demo class.

Read More

Was this article helpful?

Your feedback helps us write better content

Frequently Asked Questions

What is the quartile formula?
The position of QkQ_k is k4(N+1)\frac{k}{4}(N+1), so Q1Q_1 sits at 0.25(N+1)0.25(N+1) and Q3Q_3 at 0.75(N+1)0.75(N+1) in the ordered data, with interpolation where the position is not a whole number.
Is Q2 the same as the median?
Yes. Q2Q_2 sits at position 0.5(N+1)0.5(N+1), which is exactly the median position.
What does the quartile formula do when the position is a decimal?
It interpolates between the two neighbouring values. For a position of 2.75, take the 2nd value and add 75 per cent of the gap to the 3rd.
Why do different tools report different quartiles?
Because several conventions exist and none is universally standard. NIST's 0.25(N+1)0.25(N+1) rule is one defensible choice, so a tool using another rule can legitimately report a different Q1Q_1.
✍️ Written By
BT
Bhanzu Team
Content Creator and Editor
Bhanzu’s editorial team, known as Team Bhanzu, is made up of experienced educators, curriculum experts, content strategists, and fact-checkers dedicated to making math simple and engaging for learners worldwide. Every article and resource is carefully researched, thoughtfully structured, and rigorously reviewed to ensure accuracy, clarity, and real-world relevance. We understand that building strong math foundations can raise questions for students and parents alike. That’s why Team Bhanzu focuses on delivering practical insights, concept-driven explanations, and trustworthy guidance-empowering learners to develop confidence, speed, and a lifelong love for mathematics.
Related Articles
Book a FREE Demo ClassBook Now →