FLXCode Quartile Calculator

FLXCode apps

Appearance

Quartile Calculator

Paste your numbers to get Q1, Q2 and Q3, the IQR, the outlier fences and a box plot.

Paste a column or row from Excel, Google Sheets or a CSV file, or type numbers separated by spaces, commas or new lines. A header word is ignored.

Example Quartiles

Q1 9.75, Q2 12.5, Q3 16.5 Quartiles, inclusive method

Read 12 numbers.

Box plot: Q1 9.75, median 12.5, Q3 16.5

Textbooks, calculators and Excel use different quartile methods, so Q1 and Q3 can differ slightly for the same data.

Results
Q1 (25th percentile)9.75
Q2 (median)12.5
Q3 (75th percentile)16.5
IQR (Q3 − Q1)6.75
Smallest6
Largest45
Lower fence (Q1 − 1.5 × IQR)-0.375
Upper fence (Q3 + 1.5 × IQR)26.625
Outliers45
In Excel or Sheets=QUARTILE.INC(A1:A12, 1) or =PERCENTILE.INC(A1:A12, 0.25)

The steps, with your numbers

Sorted: 6, 7, 9, …, 21, 45

Q1: Rank = p × (n − 1) + 1 = 0.25 × 11 + 1 = 3.75, value 9.75

Q2 (median): 12.5

Q3: Rank = p × (n − 1) + 1 = 0.75 × 11 + 1 = 9.25, value 16.5

IQR = Q3 − Q1 = 16.5 − 9.75 = 6.75

Fences: 9.75 − 1.5 × 6.75 = -0.375 and 16.5 + 1.5 × 6.75 = 26.625. A value outside them is an outlier

No ads. No account. Nothing you type or record is uploaded. We count page events with a daily code. Check it.

Problem or idea? Email us

Quick start

  1. Paste the list. The order does not matter.
  2. Choose inclusive or exclusive. Inclusive matches most spreadsheets.
  3. Read Q1, the median and Q3, then the IQR and any outliers. The box plot draws them.

How the quartiles are found

  1. Sort the numbers.
  2. Q2 is the median.
  3. Q1 is the 25th percentile and Q3 the 75th, found with the rank rule of the method: p × (n − 1) + 1 inclusive, p × (n + 1) exclusive.
  4. IQR is Q3 − Q1. The fences are Q1 − 1.5 × IQR and Q3 + 1.5 × IQR.

Worked examples

NumbersQ1Q2Q3IQROutliersNote
6 7 9 10 11 12 13 15 16 18 21 459.7512.516.56.751The default list. 45 is far out.
1 2 3 4 5 6 7 82.754.56.253.50Eight evenly spaced numbers.
3 5 7 8 9 11 13 15 17791360An odd count, nine values.
10 12 12 13 14 14 15 16 4012141531One high outlier.

Inclusive and exclusive

NumbersInclusive Q1, Q3Exclusive Q1, Q3
6 7 9 10 11 12 13 15 16 18 21 459.75, 16.59.25, 17.5
1 2 3 4 5 6 7 82.75, 6.252.25, 6.75
3 5 7 8 9 11 13 15 177, 136, 14
10 12 12 13 14 14 15 16 4012, 1512, 15.5

The two usually differ a little, most for small lists. Say which method you used when you report quartiles. For any other percentile, such as the 90th, use the percentile calculator. For the mean and the mode next to the median, see the mean, median and mode calculator.

Numbers this uses

Every constant the tool uses is listed here with its source. Where a number varies, you can edit it in the tool.

  • Fence multiplier is 1.5 × IQR. Tukey's rule for box plots, the default in most software.
  • Whiskers is the furthest values inside the fences. Not the minimum and maximum, unless there are no outliers.
  • Limit is 100,000 numbers. For speed in the browser.

Common mistakes

  • Leaving the numbers unsorted when working by hand.
  • Calling a value an outlier just because it is the largest. It must be beyond the fence.
  • Comparing quartiles from two programs that use different methods.

Nothing you type or paste is uploaded. We count events without cookies (details).

FAQ

What are quartiles?

Quartiles split sorted data into four parts with equal counts. Q1 is the 25th percentile, Q2 the median, Q3 the 75th. For the default list they are 9.75, 12.5 and 16.5.

What is the interquartile range?

The IQR is Q3 − Q1, the spread of the middle half of the data. The default list has an IQR of 6.75. It ignores the lowest and highest quarter, so unlike the range it is not moved by outliers.

How do I find outliers with the IQR?

The 1.5 × IQR rule: any value below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR is an outlier. For the default list the fences are -0.375 and 26.625, so 1 value (45) is flagged. The box plot draws outliers as open circles.

Why does my textbook give different quartiles?

Several methods exist. The tool offers the inclusive one (Excel QUARTILE.INC) and the exclusive one (QUARTILE.EXC). For 1 to 8 the inclusive Q1 is 2.75 and the exclusive Q1 is 2.25. Some courses split the list in halves and take the median of each half, which can match either one.

How do I read a box plot?

The box runs from Q1 to Q3 with a line at the median. The whiskers reach the furthest values still inside the fences. Circles beyond the whiskers are outliers. A median off-centre in the box, or one whisker longer than the other, shows skew.

How many numbers do I need?

The inclusive method works from one number, though quartiles of a handful of values mean little. The exclusive method needs at least 3. Below about 8 numbers, treat the quartiles as a rough guide.

What are the Excel and Google Sheets formulas?

=QUARTILE.INC(A1:A12, 1) gives Q1, with 2 for the median and 3 for Q3. =QUARTILE.EXC works the same way. Google Sheets has QUARTILE, which is the inclusive one. The tool shows the matching formula.

Is my list uploaded?

No. It stays in your browser, is not stored and is not sent. We only count which method you used.

More from FLXCode

Share Quartile Calculator