Interquartile Range Calculator — Step-by-Step Solutions
The Interquartile Range Calculator finds Q1, Q2 (median), and Q3 from your dataset, then calculates the IQR. It supports four modes: basic IQR calculation, five-number summary, outlier detection using the 1.5 x IQR rule, and box plot data generation.
Enter comma-separated values to see the quartiles, fences, and any outliers. The outlier detection mode classifies values as mild or extreme outliers, and the box plot mode includes an SVG visualisation of your data distribution.
Your calculations will appear here
How to Use the Interquartile Range Calculator
- Select a mode: IQR from Dataset, Five-Number Summary, Outlier Detection, or Box Plot Data.
- Enter your numbers as a comma-separated list in the input field. The calculator accepts any number of values (minimum 4).
- In IQR mode, the calculator finds Q1, Q2 (median), Q3, and the interquartile range Q3 minus Q1.
- In Five-Number Summary mode, you get the minimum, Q1, median, Q3, and maximum, along with IQR and range.
- In Outlier Detection mode, the 1.5 x IQR rule identifies mild outliers (beyond 1.5 x IQR) and extreme outliers (beyond 3 x IQR).
- In Box Plot Data mode, the calculator generates all values needed for a box-and-whisker plot, including an SVG visualisation.
Formula and Theory
The interquartile range (IQR) measures the spread of the middle 50% of a dataset. It is calculated as Q3 minus Q1, where Q1 is the 25th percentile and Q3 is the 75th percentile. The IQR is resistant to outliers, making it a robust measure of spread.
The five-number summary consists of the minimum, Q1, median (Q2), Q3, and maximum. It provides a concise description of the distribution of a dataset and forms the basis for box-and-whisker plots.
Outlier detection using the IQR method defines fences: lower fence = Q1 - 1.5 x IQR and upper fence = Q3 + 1.5 x IQR. Values outside these fences are considered outliers. Values beyond Q1 - 3 x IQR or Q3 + 3 x IQR are classified as extreme outliers.
Box plots (box-and-whisker diagrams) visualise the distribution of data using the five-number summary. The box spans Q1 to Q3, a line marks the median, and whiskers extend to the most extreme non-outlier values. Outliers are plotted as individual points beyond the whiskers.
Worked Examples
Example 1: Basic IQR calculation
Problem: Find the IQR of: 2, 4, 7, 8, 10, 12, 15.
Solution: Sorted: 2, 4, 7, 8, 10, 12, 15. Q1 = median of {2, 4, 7} = 4. Q3 = median of {10, 12, 15} = 12. IQR = 12 - 4 = 8.
Answer: IQR = 8
Example 2: Outlier detection
Problem: Detect outliers in: 2, 4, 7, 8, 10, 12, 15, 50.
Solution: Q1 = 5.5, Q3 = 13.5, IQR = 8. Lower fence = 5.5 - 12 = -6.5. Upper fence = 13.5 + 12 = 25.5. 50 > 25.5, so 50 is an outlier.
Answer: Outlier: 50
Example 3: Five-number summary
Problem: Find the five-number summary of: 3, 7, 8, 5, 12, 14, 21, 13, 18.
Solution: Sorted: 3, 5, 7, 8, 12, 13, 14, 18, 21. Min = 3, Q1 = 6, Median = 12, Q3 = 16, Max = 21.
Answer: {3, 6, 12, 16, 21}
Frequently Asked Questions
What is the IQR used for?
How do you calculate quartiles?
What is the 1.5 IQR rule?
How many values do I need?
Related Statistics Calculators
Probability Calculator
Calculate probability of events, complements, unions, and intersections. Free online probability calculator for statistics.
Standard Deviation Calculator
Calculate standard deviation, variance, mean, and more for any dataset. Supports population and sample statistics. Free online tool.
Z-Score Calculator
Calculate z-scores, find values from z-scores, and determine probabilities. Free online z-score calculator with bell curve visualisation.
Binomial Calculator
Calculate binomial probabilities, cumulative distributions, and expected values. Free online binomial distribution calculator with bar chart.
Normal Distribution Calculator
Calculate probabilities for normal distributions. Find areas under the bell curve, percentiles, and inverse values. Free online tool.
Correlation Calculator
Calculate Pearson correlation coefficient, R-squared, and regression line. Free online correlation calculator with scatter plot.