Math · Statistics

Quartile calculator.

Paste your numbers to get Q1, the median, Q3, the interquartile range, a box plot and any outliers. Your data stays in this browser.

For the ten values 2, 4, 4, 5, 5, 6, 7, 8, 9, 30 the quartiles are Q1 = 4, median = 5.5 and Q3 = 8, so the IQR is 4. The outlier fences are 4 − 1.5 × 4 = −2 and 8 + 1.5 × 4 = 14, so 30 is flagged as an outlier.

IQR = Q3 − Q1Fences = Q1 − 1.5 IQR, Q3 + 1.5 IQROpened sources 8 October 2026

How it works

Sort the data. The median splits it in two, Q1 is the middle of the lower half and Q3 the middle of the upper half, so the box between Q1 and Q3 holds the middle 50% of the data. The interquartile range is IQR = Q3 − Q1. For a box plot with fences, the lower fence is Q1 − 1.5 × IQR and the upper fence is Q3 + 1.5 × IQR. The whisker runs to the most extreme data point still inside the fence, and points beyond a fence are drawn separately as outliers.

Worked example

OpenStax uses the data set 1, 1, 2, 2, 4, 6, 6.8, 7.2, 8, 8.3, 9, 10, 10, 11.5 and reports Q1 = 2, median = 7 and Q3 = 9. With the median-of-halves method this calculator gives the same three values, an IQR of 7 and fences at −8.5 and 19.5, so there are no outliers. The other two methods interpolate between sorted values: inclusive gives Q1 = 2.5 and Q3 = 8.825, and exclusive gives Q1 = 2 and Q3 = 9.25. Same data, three defensible answers, so use the method your course or software specifies.

For the default data 2, 4, 4, 5, 5, 6, 7, 8, 9, 30: the lower half is 2, 4, 4, 5, 5 (median 4), the upper half is 6, 7, 8, 9, 30 (median 8) and the median is (5 + 6) / 2 = 5.5. The IQR is 4, the upper fence is 14, and 30 lies beyond it.

Limits

An outlier flag is a prompt to look at a value, not proof that it is an error. The 1.5 multiplier is the one NIST and Wikipedia describe for fences. Quartiles of very small samples are rough, and the box plot says nothing about how the data are shaped between the quartiles.

Sources, opened 8 October 2026: NIST/SEMATECH e-Handbook, 1.3.3.7 Box Plot (box between the quartiles holds the middle 50%, fences at Q1 − 1.5 IQ and Q3 + 1.5 IQ, whiskers to the most extreme points inside the fences); Wikipedia, Interquartile range (outliers are observations below Q1 − 1.5 IQR or above Q3 + 1.5 IQR); OpenStax Introductory Statistics 2e, 2.4 Box Plots (Q1 = 2, median = 7, Q3 = 9 for the example data).

Frequently asked questions

How do you find the quartiles of a data set?

Sort the values. The median is the middle value (or the mean of the two middle values). Q1 is the median of the lower half and Q3 is the median of the upper half. For 2, 4, 4, 5, 5, 6, 7, 8, 9, 30 that gives Q1 = 4, median = 5.5 and Q3 = 8.

How do you calculate the interquartile range?

Subtract Q1 from Q3. For Q1 = 4 and Q3 = 8 the IQR is 4. It measures the spread of the middle half of the data and is not affected by extreme values the way the range is.

How do you find outliers with the 1.5 x IQR rule?

Compute the fences Q1 - 1.5 x IQR and Q3 + 1.5 x IQR. Any value below the lower fence or above the upper fence is flagged. With Q1 = 4, Q3 = 8 and IQR = 4 the fences are -2 and 14, so 30 is an outlier.

Why does another calculator give a different Q1 or Q3?

Methods differ. Median of halves leaves out the middle value when n is odd, while the inclusive and exclusive methods interpolate between sorted values. On the OpenStax data above they give Q1 = 2, 2.5 and 2, and Q3 = 9, 8.825 and 9.25.

Do box plot whiskers always reach the minimum and maximum?

No. In a box plot with fences, a whisker stops at the most extreme data point inside the fence, and points beyond the fence are drawn as separate outliers. If nothing is outside the fences, the whiskers do reach the minimum and maximum.

Can I use this for grouped data?

This tool needs the raw values. If you only have a frequency table, use the grouped data calculator, which estimates the mean, median and mode from class intervals.

Learning aid, not for decisions

Educational calculator. Results assume the conditions listed on this page, which real data often only roughly meet. Do not use it for clinical, regulatory, legal or financial decisions.

Advertisement
Advertisement