Calculating Iqr in Excel

“calculating iqr in excel” comes up constantly, so this page leads with the exact answer, and only then explains the detail. Everything works in Excel on Windows and Mac and maps almost one-to-one to Google Sheets. Copy the answer above and get back to work, or read on to turn a one-off fix into something you never have to look up again.

Exact answer

In Excel: subtract the first quartile from the third: =QUARTILE.INC(A2:A101,3)-QUARTILE.INC(A2:A101,1).

On this page7
Annotated stepsExcel
1

Put the values in one numeric column; text and blanks are ignored by QUARTILE, so they only distort the count.

2

Compute Q1 with =QUARTILE.INC(range,1) and Q3 with =QUARTILE.INC(range,3), each in its own cell.

3

Subtract to get the IQR, or write it as a single formula.

4

Use PERCENTILE.INC(range,0.25) and PERCENTILE.INC(range,0.75) if you prefer percentile notation; they return the same numbers.

5

Switch both to QUARTILE.EXC only if the method your field expects excludes the median from each half — and then use it for both quartiles.

=QUARTILE.INC(A2:A101,3)-QUARTILE.INC(A2:A101,1)
Ctrl+CthenCtrl+Shift+V+Cthen+Ctrl+VPaste values · WindowsMac

Need it as an auditable file?

Ships inside the linked template — formula-driven, unlocked, audit-ready.

View template

What this does

The interquartile range is the width of the middle half of the data — from the 25th percentile to the 75th. Unlike the full range or the standard deviation, it is unaffected by however extreme the smallest and largest values happen to be, which is why it is the spread measure of choice for skewed data such as salaries, response times and prices. Most people learn this as a sequence of clicks and forget it by next week; learning it as a pattern instead is what lets you apply it to the next, slightly different version of the problem without starting from scratch. That is the difference this page is trying to make. The difference between a quick fix and a sheet you can trust is the extra minute you spend validating “calculating iqr in excel”. Start on a copy or a tiny sample, keep the affected cells visible, and compare the result with the tool above before you touch the real workbook. When a formula is involved, keep the inputs labelled beside it, reference cells instead of typing values, and apply number formatting only after the result checks out. The point is a calculation you can defend to a CFO or an auditor, but the practical win is that someone else can open the file and understand what happened without asking you.

A worked example

A column of 100 response times has QUARTILE.INC(range,1) = 12 seconds and QUARTILE.INC(range,3) = 27 seconds, so the IQR is 15 seconds: half of all requests finished within a 15-second band. A single 400-second timeout in the data changes the full range enormously and leaves the IQR untouched. One extreme value destroys the mean and the standard deviation together; the middle-half width is what still describes the data honestly after it arrives. If there is any chance you will reuse this, drop it into a small template tab right now: a labelled input area on the left and the formula beside it, checked once against the tool above. Next time the same question comes up, the answer is a single paste away instead of a rebuild from memory.

In Google Sheets

Google Sheets handles this almost identically to Excel. The formula syntax above is the same, and the menu lives under a slightly different label rather than a ribbon tab. Use the platform toggle at the top of the page to switch every keyboard shortcut between Windows and Mac, and expect at most cosmetic differences in naming. The aim was to get you unstuck fast and leave you a little more capable than a copy-paste would. The answer is at the top and the detail above shows why it holds — so the next time a colleague asks, you can answer without reaching for search. If you take one thing from this page on “calculating iqr in excel”, make it the habit rather than the keystrokes: set the problem up with labelled inputs, reference those cells, and let Excel do the recomputing. Bookmark the page for the syntax, but do the example once in a blank sheet and check it against the tool above — five minutes of hands-on practice fixes the method in memory far better than re-reading, and it surfaces the small snags while they are still harmless. After that the technique is genuinely yours: faster than searching for it again, and reliable enough to drop into work that other people depend on.

Common mistakes

  • Mixing QUARTILE.INC for one quartile and QUARTILE.EXC for the other, which produces a width that corresponds to no method at all.
  • Comparing an Excel IQR against one computed by hand from the median-of-halves rule and treating the difference as an error; they are different conventions.
  • Running it over a range that includes the header or a total row.
  • Reporting the IQR as though it were the full range, which understates the spread by definition.

Frequently asked questions

Does Excel have an IQR function?

No. Subtract QUARTILE.INC(range,1) from QUARTILE.INC(range,3).

INC or EXC?

QUARTILE.INC includes the median in both halves and is the method the legacy QUARTILE function uses, so it is the safer default for an existing model. QUARTILE.EXC excludes it and returns slightly wider quartiles on small samples. Note that Excel's own Box and Whisker chart defaults to the exclusive method, so a chart and a hand-computed IQR can disagree until you match them.

How do I get Q1 and Q3 on their own?

QUARTILE.INC(range,1) and QUARTILE.INC(range,3). Quart 0 is the minimum, 2 is the median and 4 is the maximum.

What is the IQR used for?

Describing the spread of skewed data, drawing the box in a box plot, and defining the 1.5×IQR fences used to flag extreme values.