Outlier Calculator (Z-Score, IQR, Grubbs and Mahalanobis)
Screen your data for outliers before analysis. Each variable is checked with |z| > 3.29, Tukey’s 1.5 × IQR rule and Grubbs’ test, and every case gets a Mahalanobis distance with a chi-square p-value for multivariate outliers.
Updated · By Bibin XavierData 90 × 12
| IDtext · 90 levels | Grouptext · 3 levels | Gendertext · 2 levels | Agenumeric | Hours_Studynumeric | Anxietynumeric | Motivationnumeric | Pre_Scorenumeric | Post_Scorenumeric | Exam_Scorenumeric | Passednumeric · coded | Satisfactionnumeric · coded |
|---|---|---|---|---|---|---|---|---|---|---|---|
| S001 | Control | Male | 23 | 11.2 | 29 | 4.6 | 60 | 62 | 67 | 1 | 2 |
| S002 | Workshop | Female | 23 | 3.9 | 28 | 3.5 | 54 | 70 | 54 | 0 | 2 |
| S003 | Online | Female | 18 | 10.1 | 32 | 4 | 55 | 57 | 66 | 0 | 3 |
| S004 | Control | Male | 26 | 13.6 | 41 | 3.5 | 52 | 55 | 59 | 0 | 3 |
| S005 | Workshop | Female | 22 | 9.7 | 27 | 3.6 | 56 | 63 | 65 | 0 | 4 |
| S006 | Online | Female | 20 | 7.9 | 32 | 3.8 | 65 | 82 | 65 | 0 | 2 |
| S007 | Control | Female | 20 | 6.3 | 28 | 3 | 72 | 83 | 61 | 0 | 3 |
| S008 | Workshop | Male | 22 | 8 | 29 | 3.1 | 64 | 72 | 62 | 1 | 3 |
Variables and options
Results
90 rows · example dataUnivariate outliers
| Variable | M | SD | IQR fences | |z| > 3.29 | IQR outliers | Grubbs G | p | Most extreme value |
|---|---|---|---|---|---|---|---|---|
| Pre_Score | 60.18 | 8.75 | 34.50 to 86.50 | 0 | 0 | 2.266 | 1.000 | 80.00 (case 46) |
| Post_Score | 65.09 | 11.05 | 31.50 to 99.50 | 0 | 0 | 2.361 | 1.000 | 39.00 (case 33) |
| Exam_Score | 62.28 | 9.32 | 38.38 to 85.38 | 0 | 0 | 2.437 | 1.000 | 85.00 (case 11) |
Note. Grubbs’ test (two-sided) checks whether the single most extreme value is an outlier, assuming normality. IQR fences: Q1 − 1.5 × IQR and Q3 + 1.5 × IQR (Tukey).
Multivariate outliers (Mahalanobis distance)
| Case | D² | p | Pre_Score | Post_Score | Exam_Score |
|---|
Note. Critical χ²(3) = 16.266 at p < .001. 0 of 90 cases exceed it. No multivariate outliers.
Mahalanobis distance by case
Interpretation
No univariate outliers were found. No case is a multivariate outlier by Mahalanobis distance. Check flagged cases for data-entry errors first; remove or winsorize genuine outliers only with a stated rule, and report how many were affected.
How to cite this tool
Using these results in a thesis, journal article, report or class assignment? Please cite this free tool so others can find it. It keeps the site free.
APA 7
Xavier, B. (2026). Outlier Calculator (Z-Score, IQR, Grubbs and Mahalanobis) [Web application]. FreeStatisticalTools.com. https://freestatisticaltools.com/outlier-calculator/
BibTeX
@software{xavier_outlierdetection_2026,
author = {Xavier, Bibin},
title = {Outlier Calculator (Z-Score, IQR, Grubbs and Mahalanobis)},
publisher = {FreeStatisticalTools.com},
year = {2026},
url = {https://freestatisticaltools.com/outlier-calculator/},
note = {Web application}
}Suggested sentence for your methods section: “The analysis was carried out with the free Outlier Calculator (Z-Score, IQR, Grubbs and Mahalanobis) tool on FreeStatisticalTools.com (Xavier, 2026).”
What is outlier detection?
An outlier is a value far from the rest of the data. Univariate outliers are extreme on one variable; multivariate outliers have an unusual combination of values even if each value looks normal. This calculator checks every variable with |z| > 3.29, Tukey’s 1.5 × IQR fences and Grubbs’ test, and gives every case a Mahalanobis distance with a chi-square p-value.
When to use outlier detection
Use it during data screening, before t-tests, ANOVA, regression, factor analysis or SEM, because a few extreme values can change means, correlations and coefficients.
Assumptions
- z-scores and Grubbs’ test assume roughly normal data; the IQR rule does not.
- Mahalanobis distance assumes multivariate normality and is itself affected by outliers.
How to set up your data
One column per numeric variable, one row per case. Optionally choose an ID column to label flagged cases.
How to use this tool
- Enter your data. Paste columns from Excel, Google Sheets or SPSS with variable names in the first row, or upload a CSV or Excel file. The example data shows the expected layout.
- Choose the variables. Select the variables and case label (optional).
- Set the options. Fill in z-score cut-off and mahalanobis significance level.
- Read the results. Results update automatically. Read the plain-English interpretation, then use Copy table to paste APA-style tables into Word and Copy for the results sentence.
How to report outlier detection in APA style
“Using Mahalanobis distance (p < .001), three multivariate outliers were identified and removed, leaving N = 297.”
Frequently asked questions
How do you detect outliers?
For one variable, flag values more than 1.5 × IQR beyond the quartiles or with |z| above 3.29. For several variables at once, compute the Mahalanobis distance of each case and compare it with a chi-square distribution.
What is Mahalanobis distance?
The distance of a case from the multivariate mean, scaled by the covariance of the variables. Under multivariate normality D² follows a chi-square distribution with as many degrees of freedom as variables, so cases with p < .001 are usually treated as multivariate outliers.
What does Grubbs’ test tell me?
Whether the single most extreme value in a normally distributed variable is a significant outlier. Apply it one value at a time.
Should I remove outliers?
First check for data-entry errors. Remove or winsorize genuine values only with a rule decided in advance, report how many cases were affected, and consider robust methods instead.
What z-score is an outlier?
Common cut-offs are |z| > 3 or |z| > 3.29 (p < .001, two-tailed); in small samples, |z| > 2.5 is sometimes used.
Related tools
Browse all categories
Data cleaning and preparation · Describe and explore · Compare means · Nonparametric tests · Correlation and regression · Bayesian statistics · Categorical data · Reliability and agreement · Multivariate analysis · Structural equation modeling · Econometrics and time series · Panel data and causal inference · Marketing and decision research · Survival, clinical and meta-analysis · Study planning and calculators · PLS-SEM