The interquartile range (IQR) is the spread of the middle 50% of your data: IQR = Q3 − Q1. In Excel terms it is the third quartile of your range minus the first, and you can get it in one cell with =QUARTILE.INC(A2:A101,3)-QUARTILE.INC(A2:A101,1). This guide shows that formula, the alternative QUARTILE.EXC version, the older QUARTILE function, and how to use the result to flag outliers. You do not need the Analysis ToolPak or any add-in; everything runs on built-in functions.

What You'll Need

  • Excel on Windows, Mac, or Excel for the web. The functions below are standard, though exact menu and tab names can differ slightly by version and platform.
  • A single column of numeric data with no blanks or text mixed in, so the range is clean.
  • Your data sorted or unsorted - sorting is not required for quartile functions, but it helps you sanity-check the results.

Step-by-Step

  1. Lay out your data in one column. Put your first value in A2 and continue down, for example A2:A101 for 100 values. Leave A1 for a header such as "Score". Empty cells and text inside the range are ignored by Excel's quartile functions, which can quietly shrink your sample - so confirm the column is fully populated before you trust the output.
  2. Pick a free cell for Q1. Click an empty cell, say D2, and type =QUARTILE.INC(A2:A101,1) then press Enter. The 1 asks for the first quartile (the 25th percentile). Replace A2:A101 with your actual range. If you use a whole-column reference like A:A, header text is ignored but any numbers elsewhere in the column will be counted, so a fixed range is safer.
  3. Add Q3 in the next cell. In D3 type =QUARTILE.INC(A2:A101,3) and press Enter. That returns the 75th percentile. Keep the same range reference; mismatched ranges are the most common cause of wrong results.
  4. Subtract Q1 from Q3 for the IQR. In D4 type =D3-D2 and press Enter. This is the interquartile range: the width of the middle half of the data. Or skip the helper cells and put the whole calculation in one cell: =QUARTILE.INC(A2:A101,3)-QUARTILE.INC(A2:A101,1).
  5. Choose the right function flavour. Excel offers three quartile functions and they return different numbers. QUARTILE.INC includes 0 and 1 as valid quartile arguments (it is the inclusive, percentile-based method). QUARTILE.EXC excludes the endpoints and requires the quartile argument to be between 0 and 1 exclusive, so =QUARTILE.EXC(A2:A101,1) and =QUARTILE.EXC(A2:A101,3) work but 0 or 4 return an error. The legacy QUARTILE behaves like QUARTILE.INC. Statistical software such as R's default quantile() uses a type-7 method close to QUARTILE.INC, so pick QUARTILE.INC if you need to match common reports, and QUARTILE.EXC if your textbook or course specifies the exclusive method.
  6. Build the outlier fences. By the standard Tukey rule, values below Q1 − 1.5×IQR or above Q3 + 1.5×IQR are often treated as outliers. In D5 type =D2-1.5*D4 for the lower fence and in D6 type =D3+1.5*D4 for the upper fence. Use 3 instead of 1.5 for "extreme" outliers if that is what your analysis requires.
  7. Flag the outliers with a formula. In a helper column beside your data, for the first value in row 2, enter =IF(OR(A2<$D$5,A2>$D$6),"Outlier","") and fill down. The dollar signs lock the fence cells so they do not shift as you drag.
  8. Read and label the result. Format D4 to a sensible number of decimals and add a label in C4, for example "IQR". A small IQR means values cluster tightly around the median; a large one means they are widely spread - which is exactly why IQR is preferred over range for skewed data, since one extreme value does not blow it up.

Common Mistakes

  • Mixing quartile arguments. =QUARTILE.INC(A2:A101,4) returns the maximum (the 100th percentile), not Q3. Q1 is 1, Q2/median is 2, Q3 is 3.
  • Using QUARTILE.EXC with 0 or 4. It throws a #NUM! error because those endpoints are excluded by definition.
  • Text-formatted numbers. Numbers stored as text are skipped, so Q1 and Q3 come out of a smaller sample. Check that the column is genuinely numeric.
  • Different ranges in the Q1 and Q3 cells. If one formula covers A2:A101 and the other A2:A151, the subtraction is meaningless. Copy the formula across and change only the quartile argument.
  • Assuming IQR handles missing data gracefully. Blank cells inside the range reduce the count silently; gaps outside the range do not.
  • Treating the outlier fence as proof. The 1.5×IQR rule flags unusual values, not errors. Always inspect a flagged point before deleting it.

Tips

  • Convert your range to an Excel Table (Insert > Table) and use structured references such as [Score] so the formulas expand automatically as you add rows.
  • Put Q1, Q3, IQR and the fences in labelled cells once; then reuse them in conditional formatting rules via Formulas > New Rule to highlight outliers in color.
  • Combine IQR with MEDIAN (=MEDIAN(A2:A101)) in a small summary block so readers see the centre and the spread together.
  • Use MIN and MAX alongside IQR to show how much the full range is driven by extremes; the difference between the two tells a story.
  • For a visual check, a box plot (Insert > Box and Whisker chart) draws the IQR as the box and flags points beyond the fences.

Troubleshooting

If you see #VALUE!, the range almost certainly contains text or an error value that Excel cannot measure - find the offending cell and remove or correct it, or point the formula at a clean numeric range. If you see #NUM!, check the quartile argument: with QUARTILE.EXC it must be strictly between 0 and 1 exclusive. If the result is a strange date or decimal, the cell is probably formatted as a date or percentage - apply Home > Number > General or a plain number format. If the IQR is zero, every value between Q1 and Q3 is the same; that is correct for very clustered data, not an error. If a formula returns a value far smaller than expected, verify the range did not accidentally exclude rows, and recheck that both quartile formulas use the identical reference. If your result disagrees with an online IQR calculator, it is almost always a method mismatch: try QUARTILE.EXC instead of QUARTILE.INC and compare again.

Frequently Asked Questions

Is there a built-in IQR function in Excel?

No. There is no =IQR() function; you calculate it as Q3 minus Q1 using the quartile functions, either in separate cells or in one combined formula.

Should I use QUARTILE.INC or QUARTILE.EXC?

Use QUARTILE.INC to match common spreadsheet and reporting conventions, and QUARTILE.EXC when your method calls for the exclusive (percentile-excluded) definition. The two give slightly different results, especially on small samples.

Can I calculate IQR ignoring blanks?

Yes - the functions ignore empty cells and text automatically, but that means the sample shrinks. If blanks should not exist, remove them first so the count is what you expect.

How do I find outliers with IQR in Excel?

Compute the lower fence (Q1 − 1.5×IQR) and upper fence (Q3 + 1.5×IQR), then use an IF formula or conditional formatting to flag any value outside those bounds.

Does IQR work on dates?

Yes, because Excel stores dates as serial numbers. Format the Q1 and Q3 cells as dates if you want the output to read as a date rather than a number.

Why does my IQR differ from a stats program?

Different quartile methods produce different Q1 and Q3 values, so the IQR shifts slightly. Confirm which method your reference uses and switch between QUARTILE.INC and QUARTILE.EXC to see which matches.