Skip to content
Popular Calculators
Browse Statistics calculators

Interquartile Range Calculator

Find the interquartile range (IQR) of a data set with Q1, the median and Q3, the 1.5 × IQR outlier fences and any outliers.

Separate values with commas, spaces or new lines. You can paste a column from a spreadsheet.

Quartile method (optional)

About the Interquartile Range Calculator

The interquartile range, or IQR, measures the spread of the middle half of a data set: the distance between the first quartile, below which a quarter of the values lie, and the third quartile, below which three quarters lie. Because it ignores the lowest and highest quarters, it is not thrown off by a few extreme values — which makes it one of the most useful measures of spread in real-world data, and the basis of the standard rule for spotting outliers.

This interquartile range calculator finds the IQR of any list of numbers along with Q1, the median and Q3. It applies Tukey's 1.5 × IQR rule to give the outlier fences and list any values outside them, and lets you choose between the textbook median-of-halves method and the inclusive method used by spreadsheets.

How to Use the Interquartile Range Calculator

Enter your numbers, separated by commas, spaces or new lines. At least four values are needed.

Choose the quartile method: median of halves, as taught in most textbooks, or inclusive, which matches Excel's QUARTILE.INC.

The IQR appears with the quartiles, fences and any outliers.

The Formulas

  IQR          = Q3 − Q1
  lower fence  = Q1 − 1.5 × IQR
  upper fence  = Q3 + 1.5 × IQR

With the median-of-halves method, Q1 is the median of the lower half of the sorted data and Q3 the median of the upper half; when the count is odd, the middle value is left out of both halves. With the inclusive method, Q1 and Q3 sit at positions (n − 1) × 0.25 and (n − 1) × 0.75 in the sorted list, counting from zero, and are interpolated between neighbouring values.

Step-by-Step Example

The values 1, 3, 4, 7, 8, 10, 12, 15, 18.

  Median:       the 5th of 9 values = 8
  Lower half:   1, 3, 4, 7    → Q1 = (3 + 4) ÷ 2 = 3.5
  Upper half:   10, 12, 15, 18 → Q3 = (12 + 15) ÷ 2 = 13.5
  IQR:          13.5 − 3.5 = 10
  Fences:       3.5 − 15 = −11.5  and  13.5 + 15 = 28.5

The IQR is 10, and no value lies outside the fences. With the inclusive method, Q1 = 4 and Q3 = 12, giving an IQR of 8 — a reminder that the method matters for small data sets.

Finding an outlier: 2, 3, 5, 7, 9, 120.

  Q1 = 3, Q3 = 9, IQR = 6
  Upper fence = 9 + 1.5 × 6 = 18

The value 120 lies far beyond the upper fence and is flagged as an outlier. The range of this data is 118, but the IQR of 6 shows that the bulk of the values are close together.

Why the IQR Is Robust

The range, standard deviation and variance all react strongly to extreme values. The IQR does not: you could change 120 to 1,200 in the example above and the IQR would still be 6. This makes it the natural partner of the median when describing skewed data such as incomes, house prices, hospital stays or response times, where a few very large values are normal. Reporting "median 78, IQR 65 to 89" gives a clear, honest picture of a typical value and its spread.

Tukey's Outlier Rule

The statistician John Tukey proposed the 1.5 × IQR rule as a simple way to flag values worth a closer look. It is used to draw the whiskers of box plots and in many data-cleaning checks. Values beyond 3 × IQR from the box are sometimes called far outliers. Being outside a fence does not prove a value is wrong: it may be a data entry mistake, a measurement error, or a genuine but unusual observation — and genuine extremes are often the most interesting part of the data.

Choosing a Quartile Method

There is no single universally agreed way to compute quartiles; statisticians have described at least nine. For large data sets the differences are negligible, but for a handful of values they can change the answer noticeably. Use the method your course, exam board or software expects: the median of halves is standard in most school mathematics and on many calculators, while Excel, Google Sheets and many statistics packages use the inclusive method by default.

Box Plots

A box plot draws the IQR as a box from Q1 to Q3 with a line at the median. The whiskers reach out to the most extreme values that are still inside the fences, and any outliers are plotted as separate points. Reading a box plot is largely reading the IQR: a long box means a wide spread in the middle of the data, and a median off-centre in the box indicates skew.

Understanding Your Result

The headline is the interquartile range.

The quartiles line gives Q1, the median and Q3.

The outlier fences line gives the 1.5 × IQR limits.

The outliers line lists any values beyond the fences.

The middle half line compares the IQR with the full range.

The method line explains how the quartiles were calculated.

When Should You Use This Calculator?

Use it for homework and exams on quartiles, box plots and spread.

Use it to describe skewed data such as incomes, prices and waiting times.

Use it to screen data for outliers before further analysis.

Use it to compare the spread of groups without letting extremes dominate.

Common Mistakes

Forgetting to sort the data. Quartiles are positions in the sorted list.

Mixing quartile methods. Stick to the method your course or software uses.

Including the median in the halves. With an odd count, the textbook method leaves it out.

Treating every flagged value as an error. Investigate before removing anything.

Comparing an IQR with a standard deviation directly. They measure spread differently.

Frequently Asked Questions

How do I find the interquartile range of 1, 3, 4, 7, 8, 10, 12, 15, 18?

The median is 8. The lower half, 1, 3, 4, 7, has a median of 3.5, which is Q1, and the upper half, 10, 12, 15, 18, has a median of 13.5, which is Q3. The IQR is 13.5 − 3.5 = 10.

Why do different calculators give different IQRs?

There are several ways to find quartiles. The textbook median-of-halves method gives an IQR of 10 for the example data, while the inclusive method used by Excel's QUARTILE.INC interpolates and gives Q1 = 4 and Q3 = 12, an IQR of 8.

How is the IQR used to find outliers?

Tukey's rule marks as possible outliers any values below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR. For 2, 3, 5, 7, 9, 120 the quartiles are 3 and 9, the IQR is 6, and the upper fence is 18, so 120 is an outlier.

Why use the IQR instead of the range?

The range depends only on the two most extreme values, so a single outlier can make it huge. The IQR covers the middle half of the data and ignores the top and bottom quarters, so it is much more resistant to unusual values.

What does the interquartile range tell me?

It gives the width of the middle 50 percent of the data. A small IQR means the central values are bunched together; a large one means they are spread out. It pairs naturally with the median as a robust summary.

What is the IQR used for in box plots?

The box in a box plot runs from Q1 to Q3, so its length is the IQR, with a line at the median. The whiskers usually extend to the most extreme values within 1.5 × IQR of the box, and points beyond are drawn separately.

Last reviewed September 28, 2026 by the CalculatorPeak editorial team.