Math

Outlier Calculator

Detect outliers with IQR fences or z-score thresholds

Outlier Calculator

An outlier is a data point that differs markedly from the rest of the dataset — either far above or far below the typical range. Detecting outliers matters in every field: a sensor reading may be a faulty measurement, a transaction may be fraud, or a patient value may indicate a medical emergency. Proper outlier detection prevents these extreme values from distorting your analysis.

This calculator detects outliers using two standard methods — the IQR fences method and the z-score method — and clearly shows which values fall outside the normal range.

How to Use This Calculator

  1. Enter your dataset — comma-separated or newline-separated numbers.
  2. Select detection method — IQR (default) or z-score.
  3. Adjust the threshold — for IQR, the multiplier (default 1.5); for z-score, the threshold (default 3.0).
  4. The calculator reports the outlier count, total values, outlier percentage, and lists each outlier value.

IQR Method (Tukey's Fences)

The IQR method defines outlier boundaries using quartiles:
Lower fence = Q1 - multiplier × IQR
Upper fence = Q3 + multiplier × IQR
Any value outside these fences is an outlier.

With the default multiplier of 1.5, about 0.7% of a normal distribution falls outside the fences. Using a multiplier of 3.0 detects only "extreme" outliers — this is the basis for the box-plot whiskers you see in most statistics software.

Z-Score Method

The z-score measures how many standard deviations a value is from the mean:
z = (x - μ) / σ
Values with |z| greater than the threshold (commonly 2.5, 3.0, or 3.5) are flagged as outliers. The z-score method is sensitive to extreme values themselves (since they inflate σ), so it is more appropriate for roughly symmetric, unimodal distributions.

Real-World Examples

Sensor data: A temperature sensor dataset shows values between 18–25°C, but one reading is 99°C. The IQR method immediately flags it with a large positive z-score.

Exam scores: Most students score between 60–90, but three students scored 5 (possibly did not attempt). IQR detection labels them outliers and separates them for investigation.

Sales data: A store's daily revenue is normally $2,000–$4,000, but one day shows $50,000. Rather than corrupt the monthly average, outlier detection triggers a manual review.

Frequently Asked Questions

What is an outlier in statistics?
An outlier is a data point that lies substantially outside the typical range of a dataset. No single universal definition exists — what counts as an outlier depends on the detection method and the threshold chosen.
Should I always remove outliers?
No. First investigate why the outlier exists. It may be a data entry error (remove it), a valid but rare extreme event (keep it), or the most important observation (keep it!). Blindly removing outliers can bias results.
When should I use IQR vs. z-score detection?
Use IQR when your data may be skewed or non-normal — it is based on medians and quartiles, not means, so extreme values do not corrupt the fence calculation. Use z-score when your data is approximately normally distributed and you want to rank by standardized distance from the mean.
Why is the IQR multiplier 1.5?
John Tukey chose 1.5 for box plot whiskers because it catches approximately 0.7% of normally distributed data beyond the fences. A multiplier of 3.0 catches approximately 0.01% — only the most extreme values. Both are conventions, not laws.
What z-score threshold should I use?
Common choices: 2.5 (stricter, flags more outliers), 3.0 (standard rule of thumb — flags ~0.3% of normal data), 3.5 (conservative). For small samples, 2.5 is often recommended; for large samples, 3.0 to 3.5.
Can outliers affect the IQR method?
Less so than z-scores. Since IQR uses Q1 and Q3 (the 25th and 75th percentiles), a single extreme outlier does not shift the fences. This robustness is the main advantage of IQR over z-scores for skewed data.
What is the difference between an outlier and an extreme outlier?
Using Tukey's notation: mild outliers fall beyond 1.5 × IQR from the quartiles; extreme outliers fall beyond 3.0 × IQR. In box plots, extreme outliers are sometimes shown as a different symbol.
Does the outlier calculator work for small datasets?
Yes, though caution is warranted. With fewer than 10 data points, the sample standard deviation is unreliable for z-score detection, and the IQR may span most of the data. With 5 points, every "outlier" designation should be taken with a grain of salt.