STATISTICSDescriptive StatisticsStatistics Calculator
📊

IQR Calculator (Interquartile Range)

Free IQR calculator. Compute Q1, Q2, Q3, IQR, Semi-IQR. Inner and outer fences. Mild and extreme out

Run CalculatorExplore data analysis and statistical calculations

Why This Statistical Analysis Matters

Why: Statistical calculator for analysis.

How: Enter inputs and compute results.

IQR
STATISTICSDescriptive Statistics

IQR Calculator — Quartiles, Fences, Outlier Detection

Compute Q1, Q2, Q3, IQR, Semi-IQR. Identify mild and extreme outliers with 1.5×IQR and 3×IQR rules. Box plot with fences.

Real-World Scenarios — Click to Load

Data Input

iqr_results.sh
CALCULATED
$ iqr --n=15 --method="inclusive"
Q1
73.5000
Q2 (Median)
82.0000
Q3
91.0000
IQR
17.5000
Semi-IQR
8.7500
Inner Fences
[47.25, 117.25]
Outer Fences
[21.00, 143.50]
Mild Outliers
None
Extreme Outliers
None
Share:
IQR Result
IQR, Fences, Outlier Detection
IQR = 17.500
Mild: 0Extreme: 0Inner: [47.3, 117.3]Outer: [21.0, 143.5]
numbervibe.com/calculators/statistics/iqr-calculator

Box Plot with Fences

Inner LInner UOuter LOuter U

Rose dashed = inner fences (1.5×IQR); Red dotted = outer fences (3×IQR). Rose points = mild outliers; Red = extreme.

Quartiles & Fences Comparison

Data with Outliers Highlighted

Blue = normal; Rose = mild outlier; Red = extreme outlier.

Calculation Breakdown

QUARTILES
Q1 (25th percentile)
73.5000
Method: inclusive
Q2 (Median)
82.0000
50th ext{percentile}
IQR & FENCES
Q3 (75th percentile)
91.0000
Method: inclusive
IQR
17.5000
Q3 − Q1 = 91.00 − 73.50
Semi-IQR
8.7500
IQR/2 = 17.50/2
Lower inner fence
47.2500
Q1 − 1.5×IQR = 73.50 − 26.25
Upper inner fence
117.2500
Q3 + 1.5×IQR = 91.00 + 26.25
Lower outer fence
21.0000
Q1 − 3×IQR
OUTLIERS
Upper outer fence
143.5000
Q3 + 3×IQR
Mild outliers
None
Extreme outliers
None

For educational and informational purposes only. Verify with a qualified professional.

Key Takeaways

  • IQR = Q3 − Q1 measures the spread of the middle 50% of the data
  • Lower inner fence = Q1 − 1.5×IQR; Upper inner fence = Q3 + 1.5×IQR — mild outliers outside these
  • Lower outer fence = Q1 − 3×IQR; Upper outer fence = Q3 + 3×IQR — extreme outliers beyond these
  • Semi-IQR (Quartile Deviation) = IQR/2 — a robust measure of spread
  • Mild outliers: between inner and outer fences; Extreme outliers: beyond outer fences
  • • IQR is robust to outliers — unlike range or standard deviation

Did You Know?

📊John Tukey introduced the 1.5×IQR rule in his 1977 book "Exploratory Data Analysis".Source: Tukey, 1977
📐IQR is robust: it resists the influence of extreme values better than range or standard deviation.Source: NIST Handbook
🔍The Semi-IQR (Quartile Deviation) is half the IQR and is used in some statistical tests.Source: Wolfram MathWorld
📈Different quartile methods (inclusive, exclusive, interpolation) can yield slightly different IQR values.Source: Wikipedia
🧪Mild outliers may be genuine; extreme outliers often warrant investigation for data errors.Source: Khan Academy
📉IQR is the basis of the box in a box plot — the box spans from Q1 to Q3.Source: Tukey EDA

How It Works

1. Sort the Data

Arrange all values in ascending order. Quartiles are computed from the sorted data.

2. Compute Q1, Q2, Q3

Q1 = 25th percentile, Q2 = median (50th), Q3 = 75th percentile. Choose inclusive, exclusive, or interpolation method.

3. Calculate IQR and Semi-IQR

IQR = Q3 − Q1. Semi-IQR (Quartile Deviation) = IQR/2.

4. Inner and Outer Fences

Inner: Q1 ± 1.5×IQR. Outer: Q1 ± 3×IQR. Values between inner and outer = mild outliers; beyond outer = extreme.

5. Classify Outliers

Mild outliers fall between inner and outer fences. Extreme outliers fall beyond the outer fences.

Expert Tips

Quartile Method

Inclusive matches Excel; Exclusive matches R type 7; Interpolation uses linear (n+1) method.

Outlier Handling

Don't remove outliers blindly. Investigate whether they are data errors or genuine extremes.

Semi-IQR

Quartile Deviation = IQR/2. Used in coefficient of quartile variation and some robust statistics.

1.5× vs 3× Rule

1.5×IQR flags mild outliers; 3×IQR flags extreme. Adjust for very skewed or small samples if needed.

Why Use This Calculator vs Other Tools?

FeatureThis CalculatorExcelRPython
Q1, Q2, Q3, IQR⚠️ Multiple functions
Inner + outer fences⚠️ Manual⚠️ Manual
Mild vs extreme outliers⚠️⚠️
Semi-IQR (Quartile Dev)⚠️⚠️
Box plot with fences
Educational content
Copy & share results
AI-powered interpretation

Frequently Asked Questions

What is the 1.5×IQR rule?

Tukey's rule: values outside [Q1−1.5×IQR, Q3+1.5×IQR] are mild outliers. Values outside 3×IQR are extreme outliers.

What is Semi-IQR?

Semi-IQR (Quartile Deviation) = IQR/2. It measures half the spread of the middle 50% of data.

Inclusive vs exclusive vs interpolation?

Different formulas for percentile rank. Inclusive matches Excel; Exclusive matches R; Interpolation uses (n+1) linear method.

When to use IQR vs standard deviation?

Use IQR for skewed data or when you want robustness to outliers. SD is better for symmetric, roughly normal data.

What are mild vs extreme outliers?

Mild: between inner (1.5×IQR) and outer (3×IQR) fences. Extreme: beyond outer fences.

How do I read the box plot with fences?

Rose dashed lines = inner fences; Red dotted lines = outer fences. Rose points = mild outliers; Red = extreme.

What is the Quartile Deviation Coefficient?

IQR/(Q3+Q1). A dimensionless relative spread measure, useful for comparing across different scales.

How many data points do I need?

At least 2. For meaningful IQR and outlier detection, n ≥ 5 is recommended.

IQR by the Numbers

50%
Data in IQR
1.5×
Mild Outlier Rule
Extreme Outlier Rule
½
Semi-IQR

Formulas Reference

IQR = Q3 − Q1

Semi-IQR (Quartile Deviation) = IQR / 2

Lower inner fence = Q1 − 1.5×IQR

Upper inner fence = Q3 + 1.5×IQR

Lower outer fence = Q1 − 3×IQR

Upper outer fence = Q3 + 3×IQR

Disclaimer: Quartile methods can yield different Q1/Q3 values. For publication, state which method you used.

👈 START HERE
⬅️Jump in and explore the concept!
AI

Related Calculators