Interquartile Range Calculator

A free tool by DeepRit, a Google Ads agency that does PPC and nothing else. We build and run Google Ads accounts so every click is accounted for. Book a free audit call

Free interquartile range calculator. Find Q1, the median, Q3, the IQR and outlier fences, by the median-of-halves method or Excel's QUARTILE.INC.

Q1
0
Median
0
Q3
0
Outlier fences
0
Outliers
0
Five-number summary
0

Free, no sign-up. Runs in your browser: nothing you type is uploaded or saved.

How to use the interquartile range calculator

  1. Paste or type at least four numbers, separated by commas, spaces or new lines.
  2. Choose the method. "Median of halves" is the method taught in most schools and textbooks. "Inclusive" matches Excel's QUARTILE.INC and Google Sheets' QUARTILE function.
  3. Read the results: Q1, the median, Q3, the interquartile range (IQR), the outlier fences, any outliers, and the five-number summary.

The interquartile range calculator sorts the numbers for you and runs entirely in your browser.

What the interquartile range is

Quartiles split sorted data into four equal parts:

  • Q1 (first quartile): a quarter of the values are below it.
  • Q2 (the median): half are below it.
  • Q3 (third quartile): three quarters are below it.

The interquartile range is the distance between Q3 and Q1:

IQR = Q3 − Q1

It measures the spread of the middle 50% of the data. Because it ignores the lowest and highest quarters, extreme values don't affect it, which makes it a robust alternative to the range and standard deviation.

Two ways to calculate quartiles

Surprisingly, there's no single agreed way to calculate quartiles, and different textbooks, calculators and software give slightly different answers. The interquartile range calculator offers the two you're most likely to need.

Median of halves (textbook, Tukey's method). Find the median. Split the data into a lower half and an upper half; if there's an odd number of values, leave the median out of both halves. Q1 is the median of the lower half, and Q3 is the median of the upper half.

Inclusive (Excel QUARTILE.INC). Place the quartiles at positions (n − 1) × 0.25 and (n − 1) × 0.75 in the sorted list (counting from 0), and interpolate between neighbouring values when the position isn't a whole number.

For the data 6, 7, 15, 36, 39, 40, 41, 42, 43, 47, 49 (11 values):

  • Median of halves: Q1 = 15, Q3 = 43, IQR = 28.
  • Inclusive: Q1 = 25.5, Q3 = 42.5, IQR = 17.

Both are legitimate. Use whichever your teacher, textbook or organisation uses, and say which method you used when you report results. If your homework answer differs from a classmate's spreadsheet, the method is usually why.

Finding outliers with the IQR

The most widely used rule for outliers, from the statistician John Tukey, flags any value that is:

  • below Q1 − 1.5 × IQR, or
  • above Q3 + 1.5 × IQR.

These limits are called the fences. In the example, using the median-of-halves method, the fences are 15 − 42 = −27 and 43 + 42 = 85, so there are no outliers. For 2, 4, 4, 5, 6, 7, 8 and 30, the value 30 lies above the upper fence and is flagged.

An outlier isn't automatically an error: it might be a data-entry mistake, a genuine unusual event, or the most interesting point in your data. Investigate before removing it.

The five-number summary and box plots

The calculator also shows the five-number summary: minimum, Q1, median, Q3 and maximum. It's the basis of a box plot (box-and-whisker diagram), where the box runs from Q1 to Q3 with a line at the median, and the whiskers extend to the most extreme values within the fences. Outliers are drawn as separate points.

Box plots are a quick way to compare distributions, such as delivery times for different couriers or test scores for different classes.

IQR versus standard deviation

  • IQR describes the middle half and isn't affected by outliers. It pairs naturally with the median.
  • Standard deviation uses every value and is affected by outliers. It pairs with the mean and is central to many statistical tests. The standard deviation calculator works it out.

For skewed data, such as incomes, house prices or response times, report the median and IQR. For roughly symmetric data, the mean and standard deviation are standard. The mean median mode calculator gives the centre measures.

Quartiles in spreadsheets

  • Excel: =QUARTILE.INC(A1:A20, 1) for Q1 and =QUARTILE.INC(A1:A20, 3) for Q3, matching the inclusive method. QUARTILE.EXC uses yet another method.
  • Google Sheets: =QUARTILE(A1:A20, 1) uses the inclusive method.
  • Statistics software such as R and Python's NumPy offer several methods; check the default.

Interquartile range in everyday reporting

The IQR is especially useful when data has outliers or a long tail:

  • Delivery or response times: a few very slow cases shouldn't distort the picture of typical performance.
  • Salaries: published pay data often gives the median and the range from the 25th to the 75th percentile.
  • House prices: the middle 50% of prices in an area gives a realistic price band.
  • Test scores: the IQR shows how tightly grouped the middle of the class is.

Saying "half of our orders arrive within 2 to 4 days" (Q1 to Q3) is often more useful to customers than a mean that's pulled up by a few delayed parcels.

Percentiles and quartiles

Quartiles are special percentiles: Q1 is the 25th percentile, the median is the 50th, and Q3 is the 75th. You may also see the 10th and 90th percentiles used to describe a wider range. Like quartiles, percentiles can be calculated in several ways, so results from different tools can differ slightly. The interquartile range calculator's inclusive method matches Excel's PERCENTILE.INC and QUARTILE.INC functions.

Comparing groups with the IQR

To compare two groups, such as two couriers or two classes, calculate the median and IQR for each with the interquartile range calculator. A group with a lower median and a smaller IQR is both faster and more consistent. Box plots are a good way to show the comparison visually, with each box spanning Q1 to Q3.

IQR in quality control

Manufacturers and service teams use the IQR to monitor consistency. If the IQR of product weights, delivery times or call handling times starts to widen, the process is becoming less consistent, even if the median hasn't changed. Running the interquartile range calculator on each week's data and tracking the IQR over time is a simple way to spot process problems early.

Quick tips

  • Sort isn't needed: the calculator sorts the data for you.
  • State the method (median of halves or inclusive) when you report quartiles.
  • Report the median with the IQR for skewed data.
  • Investigate outliers before removing them.

These habits make results from the interquartile range calculator easy for others to understand and check.

Who uses an interquartile range calculator

Students use it for statistics coursework and exams. Analysts use it to describe the spread of salaries, prices or response times without being misled by a few extreme values. Quality managers use it to monitor how consistent a process is, and researchers use it to prepare box plots and spot outliers before running further tests. Because quartile methods differ, being able to switch between the textbook method and the spreadsheet method is especially useful.

A worked example

A support manager wants to understand how long customers wait for a reply. Eleven tickets last week took 6, 7, 15, 36, 39, 40, 41, 42, 43, 47 and 49 minutes. She pastes them into the interquartile range calculator with the median-of-halves method:

  • Q1: 15 minutes. Median: 40. Q3: 43.
  • IQR: 28 minutes.
  • Fences: −27 to 85, so no outliers.
  • Five-number summary: 6, 15, 40, 43, 49.

The middle half of tickets were answered within a 28-minute spread, and the median wait was 40 minutes. When she checks with her team's spreadsheet, it shows Q1 = 25.5 and Q3 = 42.5: switching the calculator to "Inclusive" gives the same, confirming the difference is just the method.

Need more customers from Google?

This tool is free and runs in your browser. If your business also needs more leads or sales, Google Ads is where people search with their wallet out. That is the whole job of DeepRit: a PPC-only agency that sets up and runs Google Ads accounts so every click is accounted for. You keep full ownership of your account, get a written report every week, and can stop at any time. See our pricing or ask for a free audit.

Sources and further reading

Frequently asked questions

How do you calculate the interquartile range?

Find Q1 and Q3, then subtract: IQR = Q3 − Q1. The interquartile range calculator finds the quartiles by either common method.

Why do calculators give different quartiles?

There are several accepted methods. The median-of-halves method and Excel's inclusive method often give different answers for the same data.

How do you find outliers using the IQR?

Values below Q1 − 1.5 × IQR or above Q3 + 1.5 × IQR are outliers.

What does the interquartile range tell you?

How spread out the middle 50% of the data is, without being affected by extreme values.

How many numbers do I need?

At least four. With very small data sets, quartiles aren't very meaningful.

Is the interquartile range calculator free?

Yes. It's free, needs no sign-up, and works in your browser.

Free PPC audit

See where your ad budget leaks.

We look at your Google Ads account before the call, then walk you through what we'd fix first, in dollars. No obligation, no hard sell.

Book a free audit call 30-minute call · Free · The audit is yours to keep