Quartile Calculator
Quartiles split a sorted data set into four equal quarters. Q1 marks the point a quarter of the way through, Q2 is the median — the middle — and Q3 marks three-quarters. Together with the interquartile range (IQR), they describe the shape of your data in a way that extreme values cannot distort, which is why box plots are built on them. For the mean, median and mode of a data set together, use the mean, median and mode calculator.
Paste your numbers and this calculator finds Q1, the median and Q3, the IQR, the minimum and maximum, and the 1.5×IQR outlier fences — flagging any values that fall outside them.
Quartiles (Tukey hinges)
How It Works
First the list is sorted from smallest to largest. The median (Q2) is the middle value — or the average of the two middle values when there is an even count. Then the data is split into a lower half and an upper half at the median:
- Q1 is the median of the lower half.
- Q3 is the median of the upper half.
With an even number of values, the split is clean: half the values go below, half above. With an odd number, the median sits in the middle — and the Tukey hinges method excludes it from both halves, so the halves are the values strictly below and strictly above the median. (Some other methods include the median in both halves; that is the main reason quartile calculators disagree.)
The interquartile range (IQR) is Q3 − Q1 — the spread of the middle 50% of the data. It is a robust measure of spread: unlike the range or the standard deviation, a single extreme value cannot move it. The outlier fences sit 1.5 × IQR beyond each quartile: the lower fence is Q1 − 1.5 × IQR and the upper fence is Q3 + 1.5 × IQR. Any value outside the fences is flagged as an outlier — worth a second look, not automatically wrong.
Worked Example
Take 1, 2, 3, 4, 5, 6, 7, 8 (n = 8, even). The median is the average of the two middle values, 4 and 5: Q2 = 4.5. The lower half is 1, 2, 3, 4, whose median is (2 + 3) / 2 = Q1 = 2.5. The upper half is 5, 6, 7, 8, whose median is (6 + 7) / 2 = Q3 = 6.5. The IQR is 6.5 − 2.5 = 4, the fences are 2.5 − 6 = −3.5 and 6.5 + 6 = 12.5, and there are no outliers.
Now take 1, 2, 3, 4, 5, 6, 7, 8, 9 (n = 9, odd). The median is the middle value, Q2 = 5. The median is excluded from both halves, so the lower half is 1, 2, 3, 4 with median Q1 = 2.5, and the upper half is 6, 7, 8, 9 with median Q3 = 7.5. The IQR is 7.5 − 2.5 = 5.
Assumptions
- Tukey hinges. Q1 is the median of the lower half, Q3 the median of the upper half; with an odd count the median is excluded from both halves. This is the method behind Tukey's box plots.
- Outliers use the 1.5 × IQR rule. Values below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR are flagged. The rule is a convention for spotting unusual values, not a test — an outlier can be genuine data.
- A single value gives Q1 = Q2 = Q3. With one number there is no spread: all three quartiles equal that number, the IQR is 0, and there are no outliers.
- Duplicates are kept. Repeated values count as separate positions in the sorted list, exactly as they would in the underlying data.
- Up to 10,000 values, each within ±1,000,000,000,000. Very long sorted lists are shown truncated with the total count.
Sources: No external data is used on this page — every figure is calculated from the values you enter, using the Tukey hinges method for quartiles and the 1.5 × IQR rule for outlier fences. Last reviewed: 15 November 2026.
Built and tested by SumKitTool — see how we check our numbers.
How to Use This Calculator
Paste your numbers into the box, separated by commas, spaces or new lines. The result updates as you type: the headline shows Q1, the median and Q3, and the table gives the IQR, the minimum and maximum, both outlier fences, any outliers, and the sorted list. Reset restores the worked example.
Try the worked examples: the defaults give Q1 = 2.5, median = 4.5, Q3 = 6.5 and IQR = 4. Add a 9 to the list and the median becomes 5, Q1 stays 2.5 and Q3 becomes 7.5. Then try adding an extreme value like 100 — it is flagged as an outlier, while the quartiles barely move.
Tips and Practical Advice
Quartiles are the antidote to skewed data. The mean salary in a company can be dragged up by one huge pay packet, but Q1, the median and Q3 barely notice it — which is why salary reports quote quartiles. If your data has outliers, trust the quartiles over the mean and standard deviation.
The IQR is the honest way to say "how spread out is the typical data?" The full range (max − min) is set by the two most extreme values; the IQR describes the middle half, where most of the data actually lives.
When you find an outlier, investigate it before deleting it. It may be a typo — or it may be the most interesting value in the whole data set. The 1.5 × IQR rule flags candidates; it never proves a value is wrong.
Frequently Asked Questions
What are quartiles?
Quartiles split a sorted data set into four equal quarters. Q1 is the value a quarter of the way through, Q2 is the median — the middle value — and Q3 is the value three-quarters of the way through. For 1, 2, 3, 4, 5, 6, 7, 8, the quartiles are Q1 = 2.5, median = 4.5 and Q3 = 6.5.
What is the Tukey hinges method?
Tukey hinges find Q1 as the median of the lower half of the sorted data and Q3 as the median of the upper half. When the data set has an odd number of values, the median itself is excluded from both halves. It is the method behind Tukey's box plots, and it can give slightly different answers from percentile-based quartile methods.
What is the interquartile range (IQR)?
The IQR is Q3 − Q1 — the spread of the middle 50% of the data. For 1 to 8, the IQR is 6.5 − 2.5 = 4. Unlike the full range or the standard deviation, the IQR is barely affected by extreme values, which makes it a robust way to describe how spread out typical values are.
How are outliers found with quartiles?
With the 1.5 × IQR rule: any value below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR is flagged as an outlier. For 1 to 8, the fences are −3.5 and 12.5, so nothing is an outlier — but adding 100 would flag it. An outlier is a value worth checking, not automatically a mistake.
Last updated: