Quartile Calculator

This quartile calculator sorts your numbers and returns the lower quartile Q1, the median, the upper quartile Q3 and the interquartile range IQR. For 12 15 11 18 14 16 13 17 40, Q1 is 12.5 and Q3 is 17.5.

Source: Wikipedia – Quantil (Stochastik), calculation methods for quartiles. Updated: .

Separate with spaces, commas, semicolons or line breaks
My ToolboxYour inputs are saved in this browser only.

Result

Quartiles
Q1 = 12.5 · median = 15 · Q3 = 17.5 · IQR = 5
Five-number summary
StatisticValue
Minimum11
Lower quartile Q112.5
Median Q215
Upper quartile Q317.5
Maximum40
Interquartile range IQR5
Range29
Number of values9
Fences and outliers
StatisticValue
Lower fence (Q1 − 1.5 × IQR)5
Upper fence (Q3 + 1.5 × IQR)25
Lower whisker (smallest value inside the fence)11
Upper whisker (largest value inside the fence)18
Outliers40
Sorted values
11; 12; 13; 14; 15; 16; 17; 18; 40
Working
  • Sorted data (n = 9): 11; 12; 13; 14; 15; 16; 17; 18; 40
  • Median Q2 = 15
  • Lower half: 11; 12; 13; 14 → Q1 = 12.5
  • Upper half: 16; 17; 18; 40 → Q3 = 17.5
  • IQR = Q3 − Q1 = 17.5 − 12.5 = 5
  • Fences for outliers: 5 and 25

How it is calculated

Quartiles split a sorted list of numbers into four equal parts: the lower quartile Q1 cuts off the bottom quarter, the median Q2 sits in the middle, and the upper quartile Q3 cuts off the top quarter.

Four methods, four possible answers

There is no single definition of quartiles. The calculator offers the four common ones. The textbook median method removes the middle value from both halves when the count is odd, while Tukey's hinges keep it in both. Excel and R interpolate instead: QUARTILE.INC uses position (n − 1) × p + 1 and QUARTILE.EXC uses position (n + 1) × p. For small samples the results differ; for large ones they hardly do.

Interquartile range and outliers

The interquartile range IQR = Q3 − Q1 measures the spread of the middle half of the data. It gives the fences Q1 − 1.5 × IQR and Q3 + 1.5 × IQR used by Tukey's box plot: values outside them count as outliers, and the whiskers end at the smallest and largest value inside the fences.

Frequently asked questions

How do you find quartiles for an even number of values?

Split the sorted list into two equal halves. Q1 is the median of the lower half and Q3 the median of the upper half. For 1 2 3 4 5 6 7 8, Q1 = 2.5 and Q3 = 6.5.

Why does Excel give different quartiles than my textbook?

QUARTILE.INC and QUARTILE.EXC interpolate between values, while the textbook method takes medians of the halves. Pick the matching method above and the numbers agree.

What counts as an outlier in a box plot?

A value below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR. In 12 15 11 18 14 16 13 17 40 the upper fence is 25, so 40 is an outlier.

Sources and legal basis

As of: · Editorial policy

Related tools