Statistics Calculator — Box Plot, Quartiles, IQR & Outlier Detector
Comprehensive descriptive statistics calculator with a dynamic box-and-whisker plot. Computes the five-number summary, quartiles, IQR, standard deviation.
See it worked out
Example — Data Set 12, 15, 22, 24, 25, 30, 33, 38, 45, 52:
Count (n)
10
Mean
29.6
Std Deviation (s)
12.712199
Variance (s²)
161.6
Minimum
12
Q1 (First Quartile)
22
Q2 (Median)
27.5
Q3 (Third Quartile)
38
Maximum
52
IQR (Interquartile Range)
16
Range
40
Outliers
None detected
Outlier Count
0
Fences (Lower, Upper)
[-2, 62]
The formula
Q1 = median of lower half | Q3 = median of upper half | IQR = Q3 − Q1 | Outliers = x < Q1−1.5×IQR or x > Q3+1.5×IQR
- Q1
- First Quartile (25th percentile)
- Q2
- Median (50th percentile)
- Q3
- Third Quartile (75th percentile)
- IQR
- Interquartile Range
- σ/s
- Standard Deviation
Worked example — Data Set 12, 15, 22, 24, 25, 30, 33, 38, 45, 52
Mean = 29.6
How Statistics Works
Q1 = median of lower half | Q3 = median of upper half | IQR = Q3 − Q1 | Outliers = x < Q1−1.5×IQR or x > Q3+1.5×IQR
A box-and-whisker plot (Tukey box plot) visualizes the spread of data through five key numbers: minimum, Q1 (first quartile), median (Q2), Q3 (third quartile), and maximum. The interquartile range (IQR) measures the spread of the middle 50% of data. Data points beyond 1.5xIQR from the quartiles are considered mathematical outliers.
- Q1
- First Quartile (25th percentile) — The median of the lower half of the data. 25% of values fall below Q1. Also called the lower quartile.
- Q2
- Median (50th percentile) — The middle value of the sorted data set. Same as Q2 in the five-number summary.
- Q3
- Third Quartile (75th percentile) — The median of the upper half of the data. 75% of values fall below Q3. Also called the upper quartile.
- IQR
- Interquartile Range — The range of the middle 50% of data: Q3 - Q1. Resistant to outliers, unlike the full range.
- σ/s
- Standard Deviation — A measure of data spread. sigma is used for population, s for sample (uses n-1 for unbiased estimate).
How to Use
- Enter your data set as numbers separated by commas, spaces, or semicolons.
- Select whether the data represents a sample (most common) or the full population.
- View the comprehensive summary statistics including quartiles, IQR, minimum, maximum, mean, and standard deviation.
- The box-and-whisker plot visually shows the data distribution with the median, quartiles, and any highlighted outliers.
- Outliers beyond 1.5xIQR from the quartiles are flagged for investigation.
Quick Reference
| Five-number summary | Min, Q1, Median, Q3, Max |
| IQR | Q3 - Q1 (spread of middle 50%) |
| Lower fence | Q1 - 1.5 x IQR |
| Upper fence | Q3 + 1.5 x IQR |
| Sample SD | Divides by n-1 (Bessel correction) |
| Population SD | Divides by n (exact parameter) |
| Mild outlier | 1.5 to 3 x IQR beyond fences |
| Extreme outlier | More than 3 x IQR beyond fences |
Common Uses
- •Quality control in manufacturing: monitoring part dimensions with box plots to detect production drift before defects occur
- •Finance: analyzing stock return distributions to identify unusual trading days and assess portfolio risk through the interquartile range
- •Education: comparing test score distributions across classrooms or schools to identify achievement gaps and outliers
- •Healthcare: analyzing patient wait times and lab results to identify facilities with unusually long delays or abnormal readings
- •Environmental science: comparing pollution measurements across monitoring stations to detect sources of contamination spikes
Understanding the Result
Descriptive statistics summarize and organize data so it can be easily understood. The five-number summary (minimum, Q1, median, Q3, maximum) provides a complete picture of data spread with just five values. The box plot was invented by John Tukey in 1970 and has become the standard way to visualize statistical distributions. Outliers -- data points more than 1.5xIQR from the quartiles -- are flagged because they may represent measurement errors, data entry mistakes, or genuinely unusual values that warrant investigation. The difference between sample and population standard deviation is critical: sample standard deviation uses n-1 (Bessel's correction) to provide an unbiased estimate of the population parameter. Without this correction, the sample standard deviation would tend to underestimate the true population value, especially for small samples. The IQR is a robust measure of spread because it ignores the extreme 25% of values on each side, making it resistant to outliers. A small IQR relative to the range indicates that most data is concentrated in the middle, while a large IQR indicates wide dispersion in the central portion of the data.
Worked Examples
Dr. Patel, a quality control engineer, is monitoring the fill weight of 500mL bottled beverages. She samples 10 bottles from today's production run and gets: 498, 501, 503, 497, 502, 500, 499, 504, 496, 502 mL. She needs to check if any fills are statistical outliers and report the IQR.
data = 498, 501, 503, 497, 502, 500, 499, 504, 496, 502 · type = sample
Q1=498, Median=500.5, Q3=502, IQR=4; Fences [492, 508]; 0 outliers detected
Sorted: 496, 497, 498, 499, 500, 501, 502, 502, 503, 504. Q1=498, Median=500.5, Q3=502, IQR=4. The fences are 492 and 508. All fills fall within the fences, so there are no outliers. The tight IQR of 4mL indicates excellent process control. Dr. Patel can report that fill variation is well within acceptable limits.
Marcus, a real estate analyst, is evaluating sale prices in a neighborhood. Last month's sales were: $285,000, $310,000, $295,000, $305,000, $1,200,000, $290,000, $300,000, $315,000. The $1.2M sale was a commercial property that was accidentally included. Marcus wants to confirm it is a statistical outlier.
data = 285000, 310000, 295000, 305000, 1200000, 290000, 300000, 315000 · type = sample
Q1=$293,750, Q3=$310,000, IQR=$16,250; Upper fence $334,375; 1 outlier detected: $1,200,000
The $1.2M sale is well beyond the upper fence and is flagged as an outlier. Marcus should remove it from the residential analysis. After removal, the remaining 7 sales have a mean of about $300,000 with an IQR of $17,500, giving a much more accurate picture of the residential market.
Lisa, a biology teacher, has her students measure the growth of bean plants over 30 days. The results (in cm) are: 12.5, 14.2, 11.8, 13.9, 3.2, 15.1, 13.4, 12.9, 14.6, 13.1. One student's plant barely grew. Lisa wants to check if it is a statistical outlier before discussing experimental errors with the class.
data = 12.5, 14.2, 11.8, 13.9, 3.2, 15.1, 13.4, 12.9, 14.6, 13.1 · type = sample
Q1=12.275, Q3=14.275, IQR=2.0; Lower fence 9.275; 1 outlier detected: 3.2 cm
Q1=12.275, Q3=14.275, IQR=2.0. Lower fence = 12.275 - 3.0 = 9.275. The 3.2cm value is well below the lower fence and is flagged as an outlier. Lisa can use this to discuss possible causes: the student may have overwatered, used poor soil, or measured incorrectly.
Frequently Asked Questions
- How do you identify outliers?
- Outliers are identified using the 1.5xIQR rule. Calculate IQR = Q3 - Q1. The lower fence is Q1 - 1.5xIQR and the upper fence is Q3 + 1.5xIQR. Any data point below the lower fence or above the upper fence is flagged. This rule, proposed by John Tukey, is calibrated so that for normally-distributed data, only about 0.7% of values would be flagged as outliers by chance alone.
- What is the difference between sample and population?
- A population includes every member of a group. A sample is a subset used to estimate population parameters. Sample standard deviation divides by n-1 instead of n (Bessel's correction) to give an unbiased estimate. If you have data for everyone in your group (e.g., all students in a class), use "population." If you have a sample drawn from a larger group (e.g., a survey of 100 people), use "sample."
- What does the IQR tell me?
- The IQR measures the spread of the middle 50% of your data. A small IQR means the middle half of your data is tightly clustered. A large IQR means it is spread out. Unlike the range, the IQR is not affected by outliers -- it is a robust measure of spread. For skewed data (income, house prices), the IQR is a far more reliable measure of dispersion than standard deviation.
- Why are there multiple methods for computing quartiles?
- Different software packages and textbooks use slightly different algorithms for quartile calculation. The Tukey method (used here) computes Q1 as the median of the lower half and Q3 as the median of the upper half, excluding the overall median when n is odd. Excel uses a different interpolation method (QUARTILE.INC). R has 9 different quantile algorithms (types 1-9). For large datasets, the differences are negligible. For small datasets (n < 20), you may see small variations between tools.
- Should I always remove outliers from my data?
- No. Outliers flagged by the 1.5xIQR rule are mathematical flags -- not automatic grounds for removal. Investigate each outlier first: is it a data entry error, a measurement mistake, or a genuine extreme value? Genuine extreme values (like the wealth of billionaires in income data, or an earthquake of magnitude 9.0 in seismic data) contain important information and should typically be kept. Removing them without justification constitutes data manipulation and can bias your results.
- How do I know if my data is normally distributed?
- A quick visual check: if your data is normally distributed, the box plot will have roughly symmetric whiskers and the median will sit near the center of the box. The distance from Q1 to Median should be approximately equal to the distance from Median to Q3. For a formal test, use a normality test like Shapiro-Wilk or the Kolmogorov-Smirnov test, or create a Q-Q plot. The 68-95-99.7 rule (empirical rule) only applies when data is approximately normal.
- What is the difference between range, IQR, and standard deviation?
- Range = Max - Min: uses only the two most extreme values, highly sensitive to outliers, gives a quick sense of total spread. IQR = Q3 - Q1: uses the middle 50%, robust to outliers, tells you the spread of the typical data. Standard Deviation: uses every data point, measured in the original units, tells you the average distance from the mean. Use range for a quick sense, IQR when outliers are present, and SD when data is symmetric and you need to apply the empirical rule.
- Can I use the box plot to detect skewness?
- Yes. In a symmetric distribution, the median sits near the center of the box, and the whiskers are roughly equal in length. In a right-skewed distribution, the upper whisker is longer than the lower whisker, and the median is closer to Q1. In a left-skewed distribution, the lower whisker is longer, and the median is closer to Q3. Skewness visible in the box plot is a sign that you should use the median (not the mean) for your central tendency reporting.
Pro Tips
- →Use the IQR instead of standard deviation when your data has extreme outliers or is heavily skewed. The IQR is computed from only the middle 50% of data, so a single wild value cannot inflate it the way it inflates variance.
- →When comparing two or more groups, overlay their box plots side by side rather than comparing means alone. Box plots reveal differences in spread, skewness, and outliers that a single number like the mean completely obscures.
- →Always investigate outliers flagged by the 1.5xIQR rule before deciding to exclude them. Many of the most important scientific discoveries (ozone hole, gravitational waves) started as data points that looked like "outliers" but turned out to be the signal.
- →The five-number summary (Min, Q1, Median, Q3, Max) gives you everything you need for a box plot: draw the box from Q1 to Q3, draw the median line inside the box, and draw whiskers to the min and max. It takes 30 seconds on paper.
- →For small datasets (n < 10), be cautious about outlier detection. With very few data points, the quartile boundaries are coarsely estimated and may flag legitimate values as outliers.
Limitations to Know
- •Do not use this calculator for data with fewer than 3 values -- quartiles require at least 3 points to be meaningful.
- •The 1.5xIQR outlier rule assumes roughly symmetric data; for heavily skewed distributions (exponential, lognormal), consider using Grubbs test or the modified Z-score method instead.
- •Do not use this tool to make causal inferences -- correlation analysis requires a different calculator. Outlier detection is a descriptive tool, not a test of causation.
- •Do not use IQR-based outlier detection on time series data where outliers may be events rather than errors. Seasonal spikes, regime changes, and structural breaks are not "outliers" to be removed.
- •This calculator uses the Tukey method for computing quartiles; some textbooks and software packages (SAS, Minitab) use different quartile algorithms that may give slightly different Q1 and Q3 values for small datasets (n < 20).
Cite this calculator
TheCalcUniverse. "Statistics Calculator — Box Plot, Quartiles, IQR & Outlier Detector." TheCalcUniverse, 2026, https://thecalcuniverse.com/math/statistics-calculator/. Accessed July 24, 2026.
Embed this calculator on your site
You may also like
-
Average Calculator
Find mean, median, min, max, and sum from any data set. Smart parser strips dollar signs, commas, and percent …
-
Mean Median Mode
Calculate the mean, median, mode, sum, and range from any data set with step-by-step median breakdown for even…
-
Standard Deviation
Compute standard deviation, variance, mean, median, range, and coefficient of variation from any dataset. Free…
-
Z-Score Calculator — Free Online Ca
Calculate the Z-score from a raw score, population mean, and standard deviation. Visualizes the result on a st…