keencalculator
  1. Home
  2. Statistics
  3. Quartile Calculator

Quartile Calculator

Enter a data set to find its quartiles: Q1, the median and Q3. You also get the interquartile range, the minimum and maximum for a five-number summary, and any outliers flagged by the 1.5 × IQR rule.

Quick examples

Separate values with commas, spaces or new lines.

Your numbers stay in your browser. They are never uploaded.
QuartilesQ1 = 15, Q2 = 40, Q3 = 43
First quartile (Q1)
15
Median (Q2)
40
Third quartile (Q3)
43
Interquartile range (IQR)
28
Minimum
6
Maximum
49
Lower fence (Q1 − 1.5 × IQR)
-27
Upper fence (Q3 + 1.5 × IQR)
85
Outliers
None

Saved setups

Save a set of inputs you reuse — your usual rate, your loan, your room sizes — and load it back in one tap.

    Your recent calculations

    Results you calculate here are kept on this device so you can come back to them.

      Formula

      Q2 = the median of the sorted data
      Q1 = the median of the lower half; Q3 = the median of the upper half
      When the count is odd, the middle value is left out of both halves
      IQR = Q3 − Q1
      Outlier fences: Q1 − 1.5 × IQR and Q3 + 1.5 × IQR

      How to use it

      1. Type or paste at least four values, separated by commas, spaces or new lines.
      2. Read Q1, the median and Q3.
      3. Check the outlier line for values beyond the fences.

      Worked examples

      Eleven values: 6, 7, 15, 36, 39, 40, 41, 42, 43, 47, 49

      Quartiles
      Q1 = 15, Q2 = 40, Q3 = 43
      First quartile (Q1)
      15
      Median (Q2)
      40
      Third quartile (Q3)
      43
      Interquartile range (IQR)
      28
      Lower fence (Q1 − 1.5 × IQR)
      -27
      Upper fence (Q3 + 1.5 × IQR)
      85
      Outliers
      None

      Six values: 7, 15, 36, 39, 40, 41

      First quartile (Q1)
      15
      Median (Q2)
      37.5
      Third quartile (Q3)
      40
      Interquartile range (IQR)
      25
      Outliers
      None

      Ten values with one far from the rest

      First quartile (Q1)
      15
      Median (Q2)
      16.5
      Third quartile (Q3)
      19
      Interquartile range (IQR)
      4
      Upper fence (Q3 + 1.5 × IQR)
      25
      Outliers
      48

      Which quartile method this uses

      There are several accepted ways to compute quartiles, and they can give different answers on small data sets. This calculator uses the median-of-halves method that excludes the median when the count is odd — the method taught in most US textbooks (Moore and McCabe) and used by TI-83 and TI-84 calculators.

      For 6, 7, 15, 36, 39, 40, 41, 42, 43, 47, 49 it gives Q1 = 15 and Q3 = 43. Tukey’s hinges, which include the median in both halves, give 25.5 and 42.5, as does Excel’s QUARTILE.INC; Excel’s QUARTILE.EXC gives 15 and 43. None of these is wrong. The differences shrink as the data set grows.

      IQR and outliers

      The interquartile range covers the middle half of the data and is not affected by extreme values. A common rule, due to John Tukey, flags any value more than 1.5 × IQR below Q1 or above Q3 as an outlier. Those fences are where the whiskers of a box plot stop.

      Questions people ask

      What are the quartiles of 6, 7, 15, 36, 39, 40, 41, 42, 43, 47, 49?

      Q1 = 15, the median is 40 and Q3 = 43, so the interquartile range is 28.

      How do you find the interquartile range?

      Subtract the first quartile from the third: IQR = Q3 − Q1.

      Why does Excel give a different quartile?

      Excel’s QUARTILE.INC interpolates between data points instead of taking the median of each half. Both approaches are valid; they agree more closely on larger data sets.

      Related calculators