TapCub is live — analytics, insights and live chat, free on one platform
Analytics

Outliers in Data: How to Find Them and What to Do With Them

An outlier is a value far from the rest of the data. How to find outliers with the IQR rule, z-scores and percentiles, a worked example with 12 orders, and how to decide whether an outlier is an error to remove or a real value to report.

Su He Published Nov 4, 2026 4 min read Analytics
Sample data. $22–$52 plus one $960 bulk order.Sample data

Try it on your own data

Every report in this article is in the free plan. One snippet for web and apps, up to 10 sites.

Start free

One extreme value can make an average meaningless. This guide explains what outliers are in analytics data, compares four ways to detect them, works through 12 orders with the IQR rule and z-scores, and shows how to decide whether an outlier is an error or a real value worth reporting.

What you will learn

  • The IQR rule (1.5 × IQR beyond the quartiles) is robust; z-scores can miss outliers in small samples
  • Report the median or percentiles next to the mean whenever a few values are extreme
  • Remove errors, but keep real outliers and segment, cap or report them openly

What an outlier is

An outlier is a value that lies far from most of the other values. It may be an error (a bot, a test order, a typo, a broken timer) or a real but rare event (a bulk order, a viral day, one very active customer). The method finds candidates; deciding which kind it is takes judgment.

Common outliers in analytics data

  • Session duration: a tab left open overnight records a 9-hour session.
  • Order value: one wholesale order is 30 times the usual basket.
  • Traffic: a bot or a news mention multiplies one day's visits.
  • Events per user: a script or a power user fires thousands of events.

Averages are the first casualty: one extreme value can pull the mean far from what a typical case looks like. See mean vs median.

Detection methods

The table below compares the four common methods.

MethodHow it worksStrengthWeakness
IQR ruleFlag values beyond Q1 − 1.5 × IQR or Q3 + 1.5 × IQRRobust; not distorted by the outlierFlags many values in skewed data
Z-scoreFlag values more than 3 standard deviations from the meanSimple; good for large, roughly normal dataThe outlier inflates the standard deviation
PercentilesFlag the top or bottom 1% or 5%Easy to explain; works for skewed dataAlways flags something, even with no outliers
Business rulesFlag impossible or suspicious valuesUses domain knowledgeNeeds maintenance

Use a statistical method to find candidates and a business rule to decide.

A worked example: 12 orders

Order values for one day (sample numbers), sorted:

$22, $25, $28, $30, $31, $34, $36, $38, $41, $45, $52, $960

IQR rule:

  • Lower half: $22–$34, so Q1 = ($28 + $30) ÷ 2 = $29
  • Upper half: $36–$960, so Q3 = ($41 + $45) ÷ 2 = $43
  • IQR = $43 − $29 = $14
  • Upper fence = Q3 + 1.5 × IQR = $43 + $21 = $64; lower fence = $29 − $21 = $8
  • $960 is above $64: outlier. Every other order is inside the fences.

Z-score: the mean is $111.83 and the sample standard deviation about $267. The z-score of $960 is (960 − 111.83) ÷ 267 ≈ 3.2, only just past the usual cut-off of 3. The outlier inflates the standard deviation it is measured against, so in small samples z-scores often miss outliers. With 12 values, no z-score can exceed about 3.2 at all.

Effect on summaries:

  • Mean with the outlier: $111.83
  • Mean without it: $34.73
  • Median (either way): $35

The median barely notices the $960 order; the mean triples.

app.tapcub.com/analytics/behavior

Mean

$111.83

with the $960 order

Median

$35

either way

Mean without outlier

$34.73

11 orders

Order values · one day · 12 orders

Sample
MethodThresholdFlags $960?
IQR ruleAbove Q3 + 1.5 × IQR = $64Yes
Z-score > 3z ≈ 3.2Just
Above 95th percentileTop 5% of valuesYes (top value)
Business ruleOrders over $500 reviewedYes

Q1 $29, Q3 $43, IQR $14.

Sample data
Sample data. $22–$52 plus one $960 bulk order.

Error or real?

Ask, in this order:

  1. Is it possible? A negative price or a 30-hour session in a 24-hour day is an error. Fix or remove it.
  2. Is it a known artefact? Bots, tests, duplicates, open tabs. Remove it during cleaning; see data cleaning techniques.
  3. Is it real? Check the source: the $960 order is a café ordering supplies in bulk. It is real.
  4. What question are you answering? For "typical basket size", report the median, or the mean without wholesale orders. For "revenue", the $960 counts in full.

Options for real outliers:

  • Keep and report the median or percentiles alongside the mean.
  • Segment: report wholesale and retail separately.
  • Cap (winsorise): replace values above a percentile with that percentile; see winsorization.
  • Remove only with a written rule, applied the same way every time.

Seeing distributions in TapCub

In All-platform analytics › Behavior › Behavior analysis, numeric measures can be aggregated as average, median or 90th percentile, so you can put the median next to the mean for order value or session length; the distribution model shows how values spread across buckets. For outliers over time, a monitor with the anomaly condition alerts when a metric moves far outside its usual range. Related: standard deviation vs standard error, percentile and anomaly detection.

See also: Interquartile range (IQR), Scatter plot.

Filed underAnalyticsMetrics

Was this article helpful?

We use your answers to fix and expand this page.

Su He

Data Analyst

Explores traffic sources, conversion funnels, and retention, using clear metric definitions and concrete examples to explain what the numbers mean.

Put the median next to the mean

Average, median and 90th percentile for any numeric measure, plus anomaly alerts.

See your data clearly. Find your growth.

Every click, backed by data. Install one line of code and see your first numbers in a minute.

No credit card · Free plans for analytics and chat · Cookieless analytics