Calculate Interquartile Range (IQR) & Outliers

Enter numbers separated by commas, spaces, or lines.

Paste or type numerical dataset values.

Calculation Results

Primary Metric Output --
Metric Breakdown 1--
Metric Breakdown 2--
Metric Breakdown 3--
Metric Breakdown 4--
Metric Breakdown 5--
Mathematical Standard--

Calculated using Tukey's interquartile range & outlier fence equations: \text{IQR} = Q_3 - Q_1, \quad \text{Fence} = [Q_1 - 1.5 \cdot \text{IQR}, \, Q_3 + 1.5 \cdot \text{IQR}]

*Note: Values falling outside the 1.5 × IQR fences are classified as statistical outliers.

Quick Summary

The Interquartile Range Calculator evaluates central 50% data spread ($\text{IQR} = Q_3 - Q_1$), Tukey lower/upper outlier fences ($1.5 \times \text{IQR}$), and identifies outliers.

Formula Explanation

\text{IQR} = Q_3 - Q_1
\text{Lower Outlier Fence} = Q_1 - 1.5 \times \text{IQR}
\text{Upper Outlier Fence} = Q_3 + 1.5 \times \text{IQR}

How It Works

Interquartile range (IQR) measures the spread of the middle 50% of dataset observations. The Interquartile Range Calculator computes $Q_1$ and $Q_3$, calculates $\text{IQR} = Q_3 - Q_1$, sets $1.5 \times \text{IQR}$ Tukey outlier boundaries, and flags any values extending beyond the fences.

Step-by-Step Worked Example

Practical Problem: Calculate IQR and detect outliers for dataset: 2, 10, 12, 14, 15, 18, 20, 22, 45 ($n = 9$).

  1. Step 1: Calculate $Q_1$ (25th percentile): $Q_1 = \mathbf{12.0000}$.
  2. Step 2: Calculate $Q_3$ (75th percentile): $Q_3 = \mathbf{20.0000}$.
  3. Step 3: Calculate IQR: $\text{IQR} = 20.0 - 12.0 = \mathbf{8.0000}$.
  4. Step 4: Calculate 1.5 × IQR Outlier Fences: $\text{Lower Fence} = 12.0 - (1.5 \times 8) = \mathbf{0.0000}$; $\text{Upper Fence} = 20.0 + (1.5 \times 8) = \mathbf{32.0000}$.
  5. Step 5: Identify Outliers: Value 45 is $> 32.0$ $\rightarrow \mathbf{45\text{ is a detected upper outlier}}$.

Real-World Calculation Examples

Scenario 1: Dataset with Upper Outlier (2 to 45)

Parameters: Q1 12.0, Q3 20.0, IQR 8.0
Result: IQR 8.0000 (Outlier 45 detected above upper fence 32.0).

Scenario 2: Real Estate Home Price Spread

Parameters: Q1 $250k, Q3 $420k
Result: IQR $170,000 (Upper fence $675k).

Scenario 3: Standardized Academic Test Scores

Parameters: Q1 520, Q3 680
Result: IQR 160 points (Middle 50% score span).

Scenario 4: Extreme Outlier Boxplot Fences

Parameters: 3.0 × IQR Far Outlier rule
Result: Far Outlier Fences ($Q3 + 3.0 \times \text{IQR}$).

Key Benefits of Using This Calculator

Automatic Outlier Detection

Identifies mild ($1.5 \times \text{IQR}$) statistical outliers automatically.

Robust Middle 50% Measurement

Measures core data spread without being distorted by extreme minimums or maximums.

Lower & Upper Fence Boundaries

Displays exact numerical thresholds for lower and upper outlier fences.

100% Free & Client-Side

Executes locally in your browser with zero latency or web server transmission.

Frequently Asked Questions (FAQ)

What is Interquartile Range (IQR)?

IQR is the difference between the 75th percentile ($Q_3$) and 25th percentile ($Q_1$), representing the spread of the middle 50% of data.

What is Tukey's 1.5 × IQR rule for outliers?

John Tukey's rule defines outliers as values falling more than $1.5 \times \text{IQR}$ below $Q_1$ or above $Q_3$.

What is difference between mild and extreme outliers?

Mild outliers lie between $1.5 \times \text{IQR}$ and $3.0 \times \text{IQR}$ from quartiles; extreme outliers lie beyond $3.0 \times \text{IQR}$.

How do I calculate IQR in Excel?

Use formula =QUARTILE(range, 3) - QUARTILE(range, 1).

Why is IQR preferred over Range for skewed data?

Range depends entirely on 2 extreme numbers; IQR focuses on the central 50%, ignoring extreme tail values.

How is IQR represented in a boxplot?

In a boxplot, IQR is represented by the length of the central box between $Q_1$ and $Q_3$.

Can IQR be negative?

No — because $Q_3 \ge Q_1$, IQR is always non-negative ($\ge 0$).

What is semi-interquartile range?

Semi-IQR is half of the Interquartile Range ($\text{Semi-IQR} = \text{IQR} / 2$).

What percentage of data falls within 1 IQR of the median?

Exactly 50% of observations fall between $Q_1$ and $Q_3$.

Should outliers be deleted from a dataset?

Outliers should only be removed if they result from data entry errors or measurement equipment malfunction.