Quartile Calculator
Find the first, second, and third quartiles (Q1, Q2, Q3) of any dataset, with the full method shown step by step. Choose between the exclusive, inclusive, and interpolation methods to match your textbook or software — plus get the IQR, five-number summary, outliers, and a box plot.
Textbook-accurate · Reviewed July 2026 · Three selectable methods (Tukey, Moore-McCabe, and Excel/R type-7) per standard quartile conventions
Enter Your Data
Works with commas, spaces, tabs, or line breaks. Decimals and negatives are fine. You need at least 4 values.
Your Quartiles
Box Plot (Five-Number Summary)
| Statistic | Value |
|---|
What Are Quartiles?
Quartiles are three values that split an ordered dataset into four equal parts, each holding roughly a quarter of the data. The first quartile (Q1) marks the 25th percentile — a quarter of the values fall below it. The second quartile (Q2) is the median, the exact middle of the data. The third quartile (Q3) marks the 75th percentile, with three-quarters of the values below it. Together with the minimum and maximum, these form the five-number summary that describes the center, spread, and shape of a distribution at a glance.
Because quartiles are based on rank order rather than raw values, they’re resistant to outliers — a single extreme value can’t drag them around the way it distorts the mean. That robustness is exactly why quartiles power the box plot, one of the most useful visual tools in all of statistics, shown for your data in the results above.
How to Calculate Quartiles Step by Step
The general approach is the same regardless of method:
- Sort the data from smallest to largest.
- Find Q2 (the median) — the middle value, or the average of the two middle values.
- Find Q1 — the median of the lower half of the data.
- Find Q3 — the median of the upper half of the data.
The one thing that varies between methods is how the halves are defined when the dataset has an odd number of values — specifically, whether the median itself is included in the halves. That single choice is the source of nearly every “why don’t my quartiles match?” question, and it’s why this calculator lets you pick the method that fits your context.
Quartile Methods: Why Calculators Disagree
There isn’t one universally “correct” way to compute quartiles — there are several accepted conventions, and they can give slightly different answers for the same data, especially with small datasets. This calculator offers the three most common:
| Method | How it works | Used by |
|---|---|---|
| Exclusive (Tukey) | Splits at the median; excludes the median from both halves when n is odd | TI-83/84, box plots, many stats courses |
| Inclusive (Moore & McCabe) | Includes the median in both halves when n is odd | Many high-school and intro textbooks |
| Interpolation (type-7) | Linear interpolation between data points at rank (n−1)p + 1 | Excel QUARTILE.INC, R, Python (default) |
For datasets with an even number of values, the exclusive and inclusive methods usually agree — the difference only appears with an odd count, where the two disagree on what to do with the middle value. The interpolation method can differ from both because it estimates a value between data points rather than always landing on one. If your homework or software gives a different answer, switching the method above will almost always reconcile it.
Which quartile method should I use?
Use whichever method matches your context. If you’re checking homework done on a TI-84 or drawing a box plot, choose Exclusive. If your textbook is Moore & McCabe or another intro-stats text that includes the median, choose Inclusive. If you’re verifying a result from Excel or R, choose Interpolation. None is more “right” than the others — they’re just different conventions, and their differences shrink as your dataset grows.
The Interquartile Range (IQR) and Outliers
The interquartile range is the distance between the first and third quartiles:
IQR = Q3 − Q1
It captures the spread of the middle 50% of your data and is a robust measure of variability, unaffected by extreme values. The IQR also defines the standard rule for spotting outliers, using what are called Tukey’s fences: any value below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR is flagged as a potential outlier. The calculator computes both fences and marks any outliers on the box plot. To explore the IQR and outlier detection on their own, see our Interquartile Range Calculator.
Quartiles, Percentiles, and the Five-Number Summary
Quartiles are really just three specific percentiles: Q1 is the 25th percentile, Q2 the 50th, and Q3 the 75th. If you need a different cut point — say the 90th percentile — use our Percentile Calculator. The five-number summary (minimum, Q1, median, Q3, maximum) that this calculator produces is the foundation of the box plot and a compact way to describe any distribution. For a complete statistical breakdown including the mean, standard deviation, and shape, try the Descriptive Statistics Calculator.
Where Quartiles Are Used
- Education: analyzing test-score distributions and identifying students above Q3 or below Q1.
- Finance: describing the spread of returns and ranking fund performance by quartile.
- Healthcare: growth charts and reference ranges are built on percentiles and quartiles.
- Business: segmenting customers, salaries, or sales into quartile tiers.
- Research: reporting medians and IQRs for skewed data instead of means and standard deviations.
Frequently Asked Questions
Q1, Q2, and Q3 are the three quartiles that divide an ordered dataset into four equal parts. Q1 (the first quartile) is the 25th percentile, meaning 25% of values fall below it. Q2 (the second quartile) is the median, or 50th percentile. Q3 (the third quartile) is the 75th percentile, with 75% of values below it. Together with the minimum and maximum, they make up the five-number summary.
Sort the data from smallest to largest and find the median (Q2). Then split the data into a lower half and an upper half at the median. Q1 is the median of the lower half, and Q3 is the median of the upper half. The only decision is whether to include the median in the halves when there’s an odd number of values — the exclusive method excludes it, the inclusive method includes it. This calculator shows every step for whichever method you choose.
Because there are several accepted methods for calculating quartiles, and they can disagree, especially for small datasets with an odd number of values. The exclusive (Tukey) method excludes the median from the halves, the inclusive (Moore-McCabe) method includes it, and interpolation methods like Excel’s QUARTILE.INC estimate a value between data points. None is wrong — they’re different conventions. Switching the method in this calculator will usually reconcile any mismatch.
The difference only matters when the dataset has an odd number of values. The exclusive method (used by TI-84 calculators and for box plots) leaves the median out of both halves before finding Q1 and Q3. The inclusive method (common in Moore & McCabe textbooks) keeps the median in both halves. For an even number of values, the two methods produce the same quartiles because the data splits cleanly down the middle.
You need at least four values for quartiles to be meaningful, since the data is being divided into four parts. With fewer than four numbers, the quartiles either collapse onto the same points or aren’t well defined. This calculator requires a minimum of four values. In practice, quartiles become more stable and informative as the dataset grows larger.
Quartiles define the interquartile range (IQR = Q3 − Q1), which is used in Tukey’s fence rule to detect outliers. Any value below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR is flagged as a potential outlier. This method is robust because it relies on quartiles rather than the mean, so a few extreme values don’t distort the boundaries. This calculator computes both fences and marks outliers on the box plot.
Methodology & formulas used
This calculator computes quartiles using three selectable conventions, reviewed July 2026. All computation runs locally in your browser; your data is never uploaded.
- Exclusive (Tukey / TI-84): Q2 is the median; the data is split into halves at the median, excluding the median itself when n is odd. Q1 and Q3 are the medians of the lower and upper halves.
- Inclusive (Moore & McCabe): same as exclusive but the median is included in both halves when n is odd.
- Interpolation (Excel QUARTILE.INC / R type-7): the quartile lies at rank (n − 1)p + 1 (1-indexed); when the rank is fractional, the value is linearly interpolated between adjacent data points. Here p is 0.25, 0.5, or 0.75.
- Interquartile range: IQR = Q3 − Q1
- Outlier fences (Tukey): lower = Q1 − 1.5 × IQR, upper = Q3 + 1.5 × IQR
For even-sized datasets the exclusive and inclusive methods agree; differences arise for odd n. The interpolation method may return values between data points. Results are rounded for display but computed at full precision.
References
- Wikipedia. Quartile — methods, definitions, and examples. en.wikipedia.org
- Hyndman, R.J. & Fan, Y. (1996). Sample Quantiles in Statistical Packages (type-7 method). Quantile methods overview
- NIST/SEMATECH. Quantiles and the Five-Number Summary. itl.nist.gov/div898/handbook
