In Excel: subtract the first quartile from the third: =QUARTILE.INC(A2:A101,3)-QUARTILE.INC(A2:A101,1).
On this page7
Put the values in one numeric column; text and blanks are ignored by QUARTILE, so they only distort the count.
Compute Q1 with =QUARTILE.INC(range,1) and Q3 with =QUARTILE.INC(range,3), each in its own cell.
Subtract to get the IQR, or write it as a single formula.
Use PERCENTILE.INC(range,0.25) and PERCENTILE.INC(range,0.75) if you prefer percentile notation; they return the same numbers.
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.
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. Keep the inputs visible and clearly labelled and the whole thing stays auditable — anyone who opens the file later, including you, can see at a glance exactly what feeds the result and change one assumption without hunting through the formula. Treat “iqr formula excel” as a small repeatable workflow rather than a one-off click you hope to remember next time. Use a small test block before the live file, so any surprise in the affected formula shows up while it is still harmless. 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. That turns a calculation you can defend to a CFO or an auditor into a method you can reuse, explain, and defend when the workbook leaves your screen.
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. Check the referenced cells, argument order and result type in your workbook. Start with the worked example before changing an input, then compare the changed result with the calculation you expected. An error value or a result of a different type is a reason to inspect the inputs and arguments.
In Google Sheets
Google Sheets support for this task has not been verified. Check the function, arguments and workflow in the target product before transferring the example. Matching formula notation does not establish identical behaviour. Keep this page bookmarked for the next time the same question comes up. Better still, repeat the steps once in your own workbook — doing it yourself is what turns a copied answer into something you remember. For “iqr formula excel”, keep the input cells and the result visible while you check the formula in Excel. Follow the worked example and change one input at a time. The steps explain the workbook calculation; this page does not run a live calculator for that task.
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.