The IQR method in Excel means calculating quartiles with the QUARTILE.INC or QUARTILE.EXC function, subtracting Q1 from Q3 to get the interquartile range, then using the 1.5 × IQR rule to flag outliers below Q1 − 1.5×IQR or above Q3 + 1.5×IQR. Excel has no single "IQR" button, so you build it from a handful of cells. This walkthrough gives you the exact formulas, a worked example, and the way to make the flags update automatically as your data changes.
Because there is no built-in outlier tool, doing it manually in helper cells is usually better than anything else: you can see each number, change the multiplier, and keep the original data intact. The whole thing takes about five minutes the first time and about thirty seconds afterwards.
What You'll Need
- A column of numeric data in Excel for desktop (Microsoft 365, Excel 2021, 2019 or 2016) or Excel for the web. The QUARTILE functions do not exist in older Excel 2007 files unless you use the legacy QUARTILE form.
- No blank cells or text inside the data range. Blanks are ignored by the functions but they silently shrink your count, and text cells can make one function behave differently depending on version.
- At least four data points. Quartiles are undefined below that, and you will get #NUM! errors.
- A free column beside the data for the IQR figures and a second one for the outlier flags.
Step-by-Step
- Lay out your data. Put your numbers in a single column with a header, for example A1 as "Value" and A2:A51 as the 50 values. Sort order does not matter. Leave column B and column C empty for the calculations.
- Enter the first quartile. In B2 type
=QUARTILE.INC(A2:A51,1)and press Enter. The1asks for the 25th percentile. This returns the value below which roughly a quarter of your data sits. - Enter the third quartile. In B3 type
=QUARTILE.INC(A2:A51,3). The3asks for the 75th percentile. You now have the two numbers the whole method depends on. - Calculate the IQR. In B4 type
=B3-B2. This is the interquartile range: the width of the middle half of your data. A small IQR means your values cluster tightly; a large one means they are spread out. - Set the lower fence. In B5 type
=B2-1.5*B4. Anything below this number is a mild low outlier. - Set the upper fence. In B6 type
=B3+1.5*B4. Anything above this is a mild high outlier. If you want to catch only extreme outliers, replace 1.5 with 3 in both formulas. - Flag the outliers in one formula. Beside your first data value, in C2, type
=IF(OR(A2<B5,A2>B6),"Outlier","")and press Enter. This prints the word Outlier for any value outside the fences and leaves normal values blank. - Copy the flag down. Select C2, then drag the fill handle down to the last row of your data. Double-clicking the fill handle bottom-right corner is faster and stops at the last populated row in the adjacent column.
- Count them. In any empty cell put
=COUNTIF(C2:C51,"Outlier")to see how many rows were flagged. This is useful before you decide whether to exclude anything. - Useful extras. To see the median in the same block, use
=QUARTILE.INC(A2:A51,2). To show the fences neatly, format B4 to B6 as Number with two decimals so the thresholds are readable. - Review flagged rows before you act. Click each row now marked Outlier and decide case by case whether it is a genuine odd reading, a data-entry error or a valid extreme value. The rule is a flag, not an automatic deletion edit.
Common Mistakes
- Mixing QUARTILE.INC and QUARTILE.EXC. The two use different percentile definitions and will give slightly different Q1 and Q3, so the fences shift. Pick one and use it for all three quartile calls. For most general work, INC is the common choice.
- Selecting the wrong range. Typing A1:A51 when row 1 is a text header is fine because text is ignored, but typing only part of the data gives wrong quartiles. Always check the highlighted range in the formula bar.
- Deleting outliers too eagerly. Removing every flagged value can hide real problems and change your conclusions. Investigate first; outliers often mean something important.
- Assuming the fences are fixed thresholds. They are recalculated from your data, so adding new values shifts both fences and can turn a previously normal row into an outlier.
- Hard-coding results instead of formulas. Copying and pasting values over B2:B6 means weekly updates no longer flow through. Keep the formulas and paste new raw data into column A instead.
- Forgetting absolute references when sorting. If you sort column A alone, C2:C51 will no longer line up with its values. Sort the whole block, or keep the flags in the same row as the data.
Tips
- Name your data range. Select A2:A51, then use Formulas > Name Manager > New and call it Values. Write
=QUARTILE.INC(Values,1)and every formula becomes readable at a glance. - Turn the data into a Table (Insert > Table). New rows added at the bottom automatically recalculate quartiles and flags, because table references expand.
- Replace 1.5 with a named cell, such as E1, and write
=B2-E1*B4. You can then test the 3× rule without editing formulas. - Group your quartiles in one small block labelled Q1, Q3, IQR, Lower fence, Upper fence. Future you will thank you, and anyone auditing the sheet can follow the logic.
- For a visual check that complements the numbers, select your data and use Insert > Insert Statistic Chart > Box and Whisker. Excel draws the box plot and marks outliers as dots, which is a quick sanity check against your flags.
- Use conditional formatting on the flag column (Home > Conditional Formatting > Highlight Cells Rules) to colour the word Outlier red so the list is scannable.
Troubleshooting
You see #NUM!. This usually means the range has fewer than four values or one of the quartile arguments is wrong. Check that the second argument is a whole number from 0 to 4, and that the range really contains at least four numeric entries.
The result is #NAME?. The QUARTILE.INC function was introduced in a later version of Excel. If you are opening an older file, use the legacy =QUARTILE(A2:A51,1), which does the same job in most cases. If your version of Excel is very old, the dotted names simply will not exist and the plain function is the alternative.
The IQR comes out as zero. Your values may all be identical, or most of the data sits in one narrow band. Confirm by checking MIN and MAX in the same range. If MIN equals MAX, there is nothing to spread.
Nothing gets flagged. Check that the fence cells are numbers, not text. A common cause is typing =B2-1.5*B4 into a cell formatted as Text, or typing a quote mark before the equals sign. Also confirm the flag formula points at the right data cell for each row.
Excel unexpectedly flags dozens of rows. This happens when one value is a leftover large entry, such as a date stored as a serial number, or a stray text code turned into a number. Scan the sorted column for something that does not belong.
Formulas point at the wrong cells after sorting. Undo the sort (Ctrl+Z), then sort the whole block including the flag column, or convert the range to a Table first. Tables keep rows intact and expand correctly.
If none of that helps, rebuild the block in a fresh sheet with a small, known range to confirm the formulas work, then paste your real data back into column A. This isolates a formula problem from a data problem.
Frequently Asked Questions
Is there a single IQR function in Excel?
No. You calculate the interquartile range as Q3 minus Q1 using =QUARTILE.INC(range,3)-QUARTILE.INC(range,1), or in a helper cell as a simple subtraction of the two.
Should I use QUARTILE.INC or QUARTILE.EXC?
INC includes the endpoints in its percentile calculation and is the easier choice for everyday analysis. EXC uses a stricter definition and matches some statistical software. The important rule is to use the same one for both Q1 and Q3.
Why does Excel mark values I thought were normal?
The 1.5 multiplier is a convention, not a law. Tightly clustered data can make ordinary values look far from the middle. Switching to 3 for the multiplier flags only extreme cases, which is often the right move for messy real-world data.
Should I delete outliers after finding them?
Only after looking at them. Deleting a valid extreme value distorts your summary. Record why each one is excluded, or keep them and note their presence separately.
Can I do this in Excel for the web?
Yes. QUARTILE.INC, IF, OR and COUNTIF all work in Excel for the web and in the mobile apps, though typing long formulas is easier on desktop. The box and whisker chart may be simpler to add on desktop.
Does the order of the data matter?
No. QUARTILE functions sort internally, so unsorted data works fine. The only thing that matters is that every formula and its flag stay on the same row as the value they describe.