What the Quartile Calculator does and when to use it
Quartiles cut a sorted dataset into four groups that each hold roughly a quarter of the values. Q1 is the middle of the lower half, Q2 is the median, and Q3 is the middle of the upper half. Together with the minimum and maximum they describe where the bulk of your data sits and how spread out it is, without being pulled around by a single extreme value the way the mean and standard deviation are. Paste your numbers separated by commas, spaces, semicolons or new lines, click Calculate, and you get the sorted list, all three quartiles, the interquartile range (IQR), the outlier fences and any flagged outliers.
Use it when you need a quick robust summary: comparing test scores between classes, checking delivery times for unusual delays, drawing a box plot by hand, or screening a sensor log for readings that deserve a second look. Because the result depends on the quartile method used, it also helps to know exactly which method this page applies, which is explained below.
Formula and method
This calculator sorts your data, finds the median, then splits the list into a lower and an upper half. When the count n is odd, the median itself is left out of both halves. Q1 is the median of the lower half and Q3 is the median of the upper half. This is the median-of-halves approach found in many introductory textbooks. The IQR and the outlier rule follow from those quartiles:
Spreadsheet functions and statistical packages often interpolate between ranks instead, so their answers can differ slightly from this page on small samples.
- Q1 the median of the values below the overall median (25th percentile).
- Q2 the overall median; for an even count it is the mean of the two middle values.
- Q3 the median of the values above the overall median (75th percentile).
- IQR Q3 minus Q1, the spread of the middle half of the data.
- Lower fence Q1 minus 1.5 times IQR; values below it are flagged as outliers.
- Upper fence Q3 plus 1.5 times IQR; values above it are flagged as outliers.
Worked example
Take ten measurements: 2, 4, 4, 5, 7, 8, 9, 10, 11, 45. They are already in order and n = 10.
- Median (Q2): the two middle values are 7 and 8, so Q2 = 7.5.
- Lower half is 2, 4, 4, 5, 7; its middle value is 4, so Q1 = 4.
- Upper half is 8, 9, 10, 11, 45; its middle value is 10, so Q3 = 10.
- IQR = 10 − 4 = 6.
- Fences: 4 − 1.5 × 6 = −5 and 10 + 1.5 × 6 = 19.
- The value 45 is above 19, so it is flagged as the only outlier.
The calculator reports exactly these numbers for this input. For comparison, Excel's QUARTILE.INC function would return 9.75 for Q3 on the same data because it interpolates between ranks, which shows why you should state the method whenever you publish quartiles.
Common mistakes and how to interpret the result
- Comparing quartiles from different tools without checking the method. Textbook halves, Excel INC, Excel EXC and R's default can disagree on small samples, so differences of a fraction of a unit are not errors.
- Treating a flagged outlier as a mistake to delete. The 1.5 × IQR rule only marks values that are unusual relative to the middle half; the value may be a genuine observation and should be investigated first.
- Reading the IQR as the range. The range uses the minimum and maximum, while the IQR ignores the outer quarter on each side and is therefore stable against extremes.
- Using very few values. With n below about 8 the quartiles jump noticeably when one number changes, so treat them as a rough description rather than an estimate of a wider population.
Related calculators
- IQR Calculator — focus on the interquartile range alone.
- Box Plot Calculator — turn the five-number summary into a box plot.
- Outlier Calculator — explore fence-based outlier detection.
- Percentile Calculator — pick any percentile instead of fixed quartiles.