Statistics

Box Plot Calculator

Enter a list of data to find the five-number summary — minimum, lower quartile, median, upper quartile and maximum — plus the interquartile range and any outliers. The box and whisker plot is drawn for you, with step-by-step working.

Five-number summary

Minimum

3

Lower quartile

6

Median

9

Upper quartile

14

Maximum

40

IQR

8

510152025303540

Outliers (marked ×): 40

How it works

  1. Put the data in order

    3, 5, 7, 8, 9, 11, 13, 15, 40 (n = 9).

    Result:Min 3, max 40
  2. Find the median

    n+12=102=5\tfrac{n + 1}{2} = \tfrac{10}{2} = 5

    The median is the 5th value: 9.

    Result:Median = 9
  3. Find the quartiles

    Q1:n+14=2.5Q3:3(n+1)4=7.5Q_1: \tfrac{n + 1}{4} = 2.5 \qquad Q_3: \tfrac{3(n + 1)}{4} = 7.5

    The lower quartile is between the 2nd and 3rd values: 6. The upper quartile is between the 7th and 8th values: 14.

    Result:LQ = 6, UQ = 14
  4. Interquartile range

    IQR=14−6=8IQR = 14 - 6 = 8

    The IQR is the width of the box — the spread of the middle half of the data.

    Result:IQR = 8
  5. Check for outliers

    6−1.5×8=−614+1.5×8=266 - 1.5 \times 8 = -6 \qquad 14 + 1.5 \times 8 = 26

    40 is an outlier (outside -6 to 26). Mark it with a cross and stop the whisker at the last value inside.

Quartiles and outliers

LQ=n+14th value,median=n+12th,UQ=3(n+1)4th,IQR=UQ−LQLQ = \tfrac{n+1}{4}\text{th value}, \quad \text{median} = \tfrac{n+1}{2}\text{th}, \quad UQ = \tfrac{3(n+1)}{4}\text{th}, \quad IQR = UQ - LQ
nnNumber of data values (put them in order first)
IQRInterquartile range — the width of the box
OutlierBelow LQ − 1.5 × IQR or above UQ + 1.5 × IQR

Example substitution

3,5,7,8,9,11,13,15,40:  LQ=6,  median=9,  UQ=14,  IQR=83, 5, 7, 8, 9, 11, 13, 15, 40: \; LQ = 6, \; \text{median} = 9, \; UQ = 14, \; IQR = 8

Upper fence = 14 + 1.5 × 8 = 26, so 40 is an outlier.

Worked examples

Find the quartiles and outliers for 3, 5, 7, 8, 9, 11, 13, 15, 40.

  1. 1
    n = 9, median at 5th value: 9
  2. 2
    LQ at 2.5th value: between 5 and 7 = 6
  3. 3
    UQ at 7.5th value: between 13 and 15 = 14
  4. 4
    IQR and upper fence: 14 − 6 = 8; 14 + 1.5 × 8 = 26
Answer: LQ 6, median 9, UQ 14, IQR 8 — 40 is an outlier

Find the quartiles for 2, 4, 4, 5, 7, 8, 9, 12.

  1. 1
    n = 8, LQ at 2.25th value: 4
  2. 2
    Median at 4.5th value: between 5 and 7 = 6
  3. 3
    UQ at 6.75th value: 8 + 0.75 × (9 − 8) = 8.75
Answer: LQ 4, median 6, UQ 8.75, IQR 4.75

Frequently asked questions

What does a box plot show?+

The five-number summary: minimum, lower quartile, median, upper quartile and maximum. The box covers the middle half of the data and the whiskers show the full spread.

How do you find the quartiles?+

Put the data in order. With n values, the lower quartile is the (n + 1)/4th value, the median is the (n + 1)/2th value and the upper quartile is the 3(n + 1)/4th value. If a position is between two values, go halfway between them.

What is the interquartile range?+

IQR = upper quartile − lower quartile. It is the width of the box and measures the spread of the middle 50% of the data, ignoring extreme values.

How do you find outliers?+

A value is an outlier if it is more than 1.5 × IQR below the lower quartile or above the upper quartile. Outliers are marked with a cross and the whisker stops at the last value that is not an outlier.

How do you compare two box plots?+

Compare the medians (which is higher on average) and the IQRs (which is more consistent). Always write your comparison in the context of the question.

Related calculators