Outlier Calculator - Tukey, Z-Score, MAD Methods
Free outlier calculator that flags extreme values using Tukey fences, the 3 sigma z-score, and the modified z-score with MAD.
Outlier Calculator
Results
What Is an Outlier Calculator?
An outlier calculator is a statistics tool that flags data points sitting far away from the rest of a dataset. Outliers are values that look surprising compared with the bulk of your numbers, and they often come from measurement errors, data entry mistakes, or genuinely rare events. The tool below uses three independent rules so you can see which extreme values each rule picks and judge whether they really deserve to be removed.
- • Cleaning exam or survey data: Spot suspiciously low or high scores that may need re-checking before grading or reporting.
- • Quality control in measurements: Detect sensor readings that drift away from the expected range in a lab or production line.
- • Pre-processing for regression or ANOVA: Flag leverage points before fitting a model so a single extreme value does not distort the slope.
- • Research methods coursework: Compare Tukey fences, the 3-sigma rule, and the modified z-score on the same dataset to learn how each method behaves.
Enter a list of numbers separated by commas or spaces, pick thresholds for each method, and the result panel shows the lower and upper fences, the points flagged by each rule, and a short interpretation that points you to the most reliable method for the sample size you are working with.
To see exactly which values the 1.5 IQR fence picks in a visual layout, the Box Plot Calculator draws the same five-number summary and marks the same outliers on the whiskers.
How the Outlier Calculator Works
Three rules run on the same dataset, so you can compare how each one behaves on the same numbers. All three rules use summary statistics that the calculator computes from the cleaned input before testing each point.
- Q1, Q3, IQR: First quartile, third quartile, and interquartile range from the sorted dataset.
- k: Multiplier applied to IQR for Tukey fences. The default 1.5 marks mild outliers; 3 marks extreme outliers.
- mean, sd: Arithmetic mean and sample standard deviation used by the standard z-score method.
- median, MAD: Median and median absolute deviation, used by the modified z-score method.
- t, t_m: Absolute thresholds. Defaults: 3 for the standard z-score and 3.5 for the modified z-score.
The standard z-score assumes the data are roughly symmetric, so a single extreme value pulls the mean and inflates the standard deviation and can mask real outliers. The Tukey fence uses quartiles, so it stays stable when one tail is heavier. The modified z-score replaces the mean with the median and the standard deviation with the median absolute deviation scaled by 0.6745, which makes it robust to small samples and asymmetric distributions.
To compute the sample standard deviation that the standard z-score method uses here, the Standard Deviation Calculator returns variance and sd from the same dataset so the inputs and the formula stay in sync. See https://best-calculators.com/education-academic/standard-deviation-calculator/.
Worked Example: Class Test Scores
Dataset: 10, 12, 12, 13, 14, 14, 15, 16, 18, 22 (n = 10).
Mean = 14.6, median = 14, sd ~ 3.44, Q1 = 12.25, Q3 = 15.75, IQR = 3.5, lower fence = 7.0, upper fence = 21.0, MAD = 2.
Tukey flags 22 (the only value above the upper fence of 21). Standard z-score flags 0 points (max |z| = 2.15). Modified z-score flags 0 points (max |M| = 2.70).
For a small symmetric sample the Tukey fence catches the high extreme on its own. The standard and modified z-score methods agree there is no outlier, so the value of 22 is worth a second look but not an automatic deletion.
According to NIST/SEMATECH e-Handbook of Statistical Methods, the modified z-score uses 0.6745 times (x - median) divided by MAD and flags |M| greater than 3.5 as outliers.
To compute a standard z-score for a single value or a short list against a known mean and standard deviation, use the Z-Score Calculator and compare the result with the threshold from this calculator.
Key Outlier Concepts Explained
Before relying on the flag list, it helps to know what each method assumes about your data and what 'outlier' really means in each rule.
Tukey Fences (1.5 IQR Rule)
Tukey's exploratory data analysis defines mild outliers as values outside Q1 - 1.5*IQR or Q3 + 1.5*IQR and extreme outliers as values beyond 3 IQRs from the quartiles. The fence is robust to skew because it depends only on the middle 50% of the data.
Three-Sigma Rule
Under a normal distribution about 99.7% of values sit within three standard deviations of the mean, so a |z| above 3 is rare. The rule is intuitive but fragile when the data are skewed or contain a genuine extreme value that inflates the standard deviation.
Modified Z-Score and MAD
The modified z-score uses the median and median absolute deviation scaled by 0.6745. Iglewicz and Hoaglin recommend flagging any value whose absolute modified z exceeds 3.5 because this rule is robust to small samples and asymmetric tails.
Mild Versus Extreme Outliers
Tukey uses 1.5 IQR to mark mild outliers and 3 IQR to mark extreme outliers. A point beyond 3 IQRs is almost certainly an error or a genuinely rare event worth investigating separately.
Because the three rules depend on different summary statistics, they often disagree on the same dataset. The interpretation line in the results panel picks the rule that matches the sample size and skew of your data so you do not have to guess.
When you only need the Tukey fences without running the rest of the outlier check, the Upper and Lower Fence Calculator returns both fences directly so you can compare them with the values from this calculator. See https://best-calculators.com/education-academic/upper-lower-fence-calculator/.
For the modified z-score it helps to compute MAD on its own; the Median Absolute Deviation Calculator returns the median of |x - median| and explains when MAD is a more reliable spread measure than standard deviation.
How to Use the Outlier Calculator
Follow the steps below to detect outliers in any small or medium dataset. The defaults match the most common textbook thresholds; change them only when your course or project calls for a different rule.
- 1 Paste your dataset: Type or paste numbers separated by commas, spaces, or line breaks. Non-numeric tokens are ignored and counted separately so a stray label does not break the calculation.
- 2 Pick thresholds: Leave the IQR multiplier at 1.5, the standard z-score cutoff at 3, and the modified z-score cutoff at 3.5 unless your reference specifies otherwise.
- 3 Click Calculate: The calculator computes Q1, Q3, IQR, mean, sd, median, and MAD, then runs all three rules on each value.
- 4 Read the flags: Compare the Tukey, Z-score, and Modified Z-score counts in the right panel. The list of flagged values shows which method(s) tagged each value.
- 5 Apply the interpretation: Use the interpretation line to decide whether to keep, fix, or remove each flagged value based on the sample size and the strength of agreement between the three methods.
Try the worked example: paste 10, 12, 12, 13, 14, 14, 15, 16, 18, 22 and leave the thresholds at their defaults. The result is one Tukey flag for the value 22, matching the worked example in the How It Works section.
Benefits of Using This Outlier Calculator
Three independent rules on the same input turn a normally tedious judgment call into a transparent comparison you can show in a report.
- • Three methods in one place: Tukey, standard z-score, and modified z-score run side by side so you stop switching between spreadsheets.
- • Robust defaults: Defaults of 1.5 IQR, |z| = 3, and |M| = 3.5 match the NIST guidance and Iglewicz-Hoaglin recommendation, so you do not have to remember each rule.
- • Clear plain-language interpretation: Each result ends with a sentence that tells you which method to trust for the sample size and agreement pattern of your data.
- • Edge-case aware: Constant datasets, fewer than four numbers, and tokens that cannot be parsed are all handled explicitly rather than producing nonsense.
- • Free and offline-ready: All calculation runs in your browser; the dataset never leaves the page.
Because the outlier calculator reports summary statistics alongside the flags, you can paste the numbers directly into a methods section without re-typing quartiles, mean, or MAD.
To see where a flagged value sits in the rank distribution rather than just whether it is extreme, the Percentile Calculator converts each input into a percentile so you can decide whether it is the bottom or top 1% of the sample.
Factors That Affect Your Outlier Results
Two datasets with the same number of points can flag very different values because the rules respond to sample size, skew, and how much the extreme values pull the spread.
Sample size and the choice of rule
Standard z-scores need at least 20-30 points to be reliable; for smaller samples the modified z-score is preferred because it depends on the median instead of the mean.
Skewness and heavy tails
If your data are skewed, the mean and standard deviation follow the long tail, so the standard z-score under-flags the very points you want to catch. Tukey and the modified z-score stay stable under skew.
Threshold values
Lowering the IQR multiplier to 1.0 or the modified z cutoff to 2.5 makes the rule stricter and flags more points. Raising them to 3 IQR or |M| = 5 narrows the flag list to only the most extreme values.
Measurement units and rounding
Outliers are detected in the units you enter. If your data are rounded to integers, expect borderline points to flip between flagged and not flagged.
- • No single rule is universally correct. Always treat flagged values as prompts to investigate the underlying record, not as automatic delete decisions.
- • The standard z-score assumes a roughly normal distribution. Use the modified z-score for skewed or small samples where the normality assumption does not hold.
- • The calculator operates on a single column of numbers. Multivariate outliers require a different technique such as Mahalanobis distance.
The interpretation panel always names the most reliable rule for your sample size so you do not have to memorise the trade-offs above.
According to Omnicalculator, common outlier detection rules include the 1.5 IQR fence, the three-standard-deviation rule, and the modified z-score; no single rule is best for every dataset. See https://www.omnicalculator.com/statistics/outlier.
According to NIST/SEMATECH e-Handbook of Statistical Methods, Tukey defines mild outliers as values outside Q1 - 1.5 IQR and Q3 + 1.5 IQR and extreme outliers as values beyond 3 IQR.
Frequently Asked Questions
Q: What is an outlier in statistics?
A: An outlier is a value in a dataset that lies unusually far from the rest of the observations. It can be a measurement error, a data-entry mistake, or a genuinely rare event. Outlier detection rules like Tukey's 1.5 IQR fence, the 3-sigma z-score, and the modified z-score give formal ways to flag these points.
Q: How do you find outliers using the IQR method?
A: Sort the dataset and compute Q1 (25th percentile) and Q3 (75th percentile). Take the IQR as Q3 minus Q1, then compute the lower fence Q1 - 1.5*IQR and the upper fence Q3 + 1.5*IQR. Any value below the lower fence or above the upper fence is flagged as a mild outlier; values beyond 3 IQRs are extreme outliers.
Q: What is the difference between a z-score and a modified z-score for outliers?
A: The standard z-score uses the mean and standard deviation and flags points with |z| above the chosen threshold (usually 3). The modified z-score uses the median and median absolute deviation scaled by 0.6745, and flags points with absolute modified z above 3.5. The modified z-score is more robust when the sample is small or skewed.
Q: Should I always remove outliers from my dataset?
A: No. Remove an outlier only when you can confirm it is a data-entry error, a broken sensor, or another clear mistake. If the value is a legitimate measurement, keep it and consider a robust method that is less sensitive to extreme values. Always document the rule and threshold you used when you decide to drop a point.
Q: How many outliers can a dataset have?
A: There is no fixed upper limit. A useful rule of thumb is that fewer than 5% of observations flagged as mild outliers is usually acceptable; if more than 10% are flagged, the dataset may follow a heavy-tailed distribution and a different model such as a robust regression may be more appropriate than trimming values.
Q: What is the 1.5 IQR rule for outlier detection?
A: The 1.5 IQR rule is John Tukey's definition of a mild outlier: any value below Q1 - 1.5*IQR or above Q3 + 1.5*IQR. It depends only on the middle 50% of the data, so it stays reliable when the tails are long or the sample is small. Tukey's 3 IQR rule marks extreme outliers.