Interquartile Range (IQR) Calculator

Compute quartiles (Q1, Q2/Median, Q3), interquartile range, lower/upper fences, and identify outliers using the Tukey method. Visualize your data distribution with an interactive box‑and‑whisker plot.

Enter numeric values. Use commas, spaces, or line breaks. Negative and decimal values are supported.
? Exam Scores: 55,67,68,72,74,76,78,79,81,82,85,87,89,91,94
? Salaries (thousands): 42, 45, 48, 50, 52, 53, 55, 58, 60, 62, 65, 68, 120, 130
? Normal distribution: 2,4,5,6,7,8,9,10,11,12,13,14,15,16,18,20,22
⚠️ With outliers: 10,12,13,15,16,18,19,20,22,24,28,30,85,90,110
? Small set: 3,7,8,9,11,13,15,18
Privacy first: All calculations are performed locally in your browser. No data is uploaded or stored on our servers.

What is the Interquartile Range (IQR)?

The Interquartile Range (IQR) is a robust measure of statistical dispersion, representing the middle 50% of a dataset. It is calculated as the difference between the third quartile (Q₃, 75th percentile) and the first quartile (Q₁, 25th percentile). Unlike range or standard deviation, the IQR is not affected by extreme outliers, making it essential for analyzing skewed distributions or data containing anomalies.

Quartile calculation method (Tukey's hinges / inclusive median): Sort data, find median (Q₂). Q₁ = median of lower half (excluding overall median if n odd), Q₃ = median of upper half. Outlier fences: lower = Q₁ - 1.5×IQR, upper = Q₃ + 1.5×IQR. Points outside fences are flagged as outliers.

This method is widely accepted in exploratory data analysis (EDA), box plot construction, and many statistical software packages (R, Python pandas, SPSS). The IQR is also used to define the box‑and‑whisker plot, invented by John Tukey, which provides a concise graphical summary of a data distribution's center, spread, skewness, and potential outliers.

Why Use an IQR Calculator with Box Plot?

  • Quick outlier detection: Instantly identify values that deviate significantly from the bulk of your data – critical for data cleaning, fraud detection, and quality control.
  • Compare distributions: Use IQR to compare spread across groups without being misled by extremes.
  • Academic & research integrity: Robust statistics improve reproducibility and reduce bias caused by measurement errors.
  • Interactive visualization: The dynamic box plot helps you intuitively grasp skewness, tails, and potential data entry errors.

Step‑by‑Step Calculation & Interpretation

1. Sort data in ascending order.
2. Find median (Q₂) – the middle value.
3. Q₁ = median of lower half (values below Q₂).
4. Q₃ = median of upper half (values above Q₂).
5. IQR = Q₃ – Q₁
6. Lower fence = Q₁ – 1.5×IQR
7. Upper fence = Q₃ + 1.5×IQR
8. Outliers = points < lower fence or > upper fence
Real‑world applications:
• Finance: detecting anomalous transactions.
• Healthcare: identifying unusual patient biomarkers.
• Education: analyzing test score distributions.
• Manufacturing: quality control of product dimensions.
• Weather: spotting extreme temperature events.

Case Study: Employee Salary Analysis

A medium-sized company examines monthly salaries (in thousands). Using the example "Salaries (thousands)" preset, we found Q₁ = 50.0, Q₃ = 62.0, IQR = 12.0. Lower fence = 50.0 - 1.5×12.0 = 32.0, upper fence = 62.0 + 1.5×12.0 = 80.0. Salaries of 120 and 130 are flagged as outliers, indicating possible executive compensation or data entry errors. The IQR gives HR analysts a robust view of typical salary range without the distortion of extreme values, supporting fair compensation policies.

Frequently Asked Questions

The 1.5 multiplier is a conventional rule-of-thumb proposed by Tukey. For normally distributed data, it covers about 99.3% of observations, making extreme values highly suspicious. It balances sensitivity and false positives across many distributions.

Standard deviation is sensitive to outliers because it squares deviations; IQR is based on percentiles and robust. For symmetric, normal data both are useful, but for skewed data IQR better represents typical spread.

Yes, the calculation runs locally using efficient sorting (O(n log n)). Modern browsers handle up to 100,000 numbers without performance issues. However, very large datasets may slow down canvas rendering.

Currently this tool handles raw numeric values only. For grouped or weighted quartiles, consider advanced statistical software. Future versions may support frequency tables.

We use Tukey's inclusive method (median of halves), consistent with most introductory statistics textbooks and Python's default. Results are precise to 4 decimal places.
References: Tukey, J.W. (1977). Exploratory Data Analysis. Pearson; McGill, R., Tukey, J.W., & Larsen, W.A. (1978). "Variations of Box Plots." The American Statistician. Also see NIST/SEMATECH e-Handbook of Statistical Methods.
This tool implements widely accepted statistical methods. Our  team ensures algorithmic accuracy and pedagogical clarity. Updated May 2026.