In Excel: compute the lower and upper 1.5×IQR fences in two cells, then flag every value that falls outside them with a simple IF.
On this page7
In two helper cells compute Q1 and Q3 with QUARTILE.INC, and the width between them.
Put the lower fence in E2 as Q1 minus 1.5 times that width, and the upper fence in E3 as Q3 plus 1.5 times it.
Fill the flag formula down beside the data, locking the fence references with $.
Highlight them visually with Home ▸ Conditional Formatting ▸ New Rule ▸ Use a formula, referring to the same fences.
For the alternative rule, flag where =ABS((A2-AVERAGE($A$2:$A$101))/STDEV.S($A$2:$A$101))>3.
Need it as an auditable file?
Ships inside the linked template — formula-driven, unlocked, audit-ready.
What this does
Excel has no outlier function, so flagging is a rule you choose and apply. The fence method marks anything more than 1.5 quartile-widths beyond the first or third quartile, and holds up on skewed data. The z-score method marks anything more than three standard deviations from the mean, and is easier to explain but weakens precisely when extreme values are present, because those values inflate the very standard deviation being used to judge them. 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. Treat “outlier calculation in 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 cells 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
With quartiles 12 and 27 the fences sit at 12 - 1.5×15 = -10.5 and 27 + 1.5×15 = 49.5. Put those in E2 and E3 and fill =IF(OR(A2<$E$2,A2>$E$3),"outlier","") down the column: the single 62 is flagged and everything else is left blank. One mistyped figure moves an average enough to change a decision, and a stated rule for flagging is what separates cleaning the data from choosing the answer. One habit worth forming early: name the cells that hold your inputs, so the formula reads in plain language instead of a string of cell addresses. A reviewer — or you in three months — can then follow the logic without decoding what B7 and D2 were supposed to mean, which is most of what makes a sheet maintainable.
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. Nothing on this page is behind a login or a download: the exact answer is at the top, and the detail below it is there for when you need it. That is the whole promise here — the answer first, and just enough context to make it stick. Treat “outlier calculation in excel” as a small building block rather than a chore. Once the inputs sit in their own cells and the formula reads from them, the same setup answers a dozen related questions with a tweak, and Excel keeps every dependent figure current as the data changes. The tool above is there so you can rehearse and verify before committing anything to a real workbook; the steps and worked example are there so the logic sticks. Get it right once and it stops costing you time — it starts saving it, every time the question comes back around.
Common mistakes
- Deleting flagged rows without recording which and why, which makes the analysis impossible to reproduce.
- Applying the three-sigma rule to skewed data, where it flags almost nothing at one end and too much at the other.
- Treating an outlier as an error: a genuine extreme observation is often the most informative row in the table.
- Recomputing the fences from data that already had outliers removed, and then removing more.
Frequently asked questions
What counts as an outlier?
It depends on the rule you state. The two common ones are beyond 1.5 quartile-widths past the quartiles, or more than three standard deviations from the mean.
Does Excel flag them automatically?
A Box and Whisker chart does: it draws points beyond the same fences as individual dots.
Should I remove them?
Only with a documented reason such as a known instrument fault. Otherwise report the analysis both with and without them.
How do I highlight them in colour?
Conditional Formatting ▸ New Rule ▸ Use a formula, entering the same comparison against the fence cells.