Homeโ€บCalculatorsโ€บStatisticsโ€บInterquartile Range (IQR) Calculator

Interquartile Range (IQR) Calculator

Statistics

Calculate Q1, Q3, and the interquartile range (IQR) for any dataset instantly. Enter your numbers to find the spread of the middle 50% of your data and outlier fences.

Dataset

Separate numbers with commas, spaces, semicolons, or new lines

Interquartile Range

0

Q1 (25th)

0

Q3 (75th)

0

Outlier fences (1.5 ร— IQR rule)

Values below 0 or above 0 are commonly flagged as outliers, based on 0 data points.

What is a IQR?

The Interquartile Range Calculator measures the spread of the middle 50% of your dataset by computing Q1 (the 25th percentile), Q3 (the 75th percentile), and the IQR itself (Q3 โˆ’ Q1). Enter your list of numbers, and the calculator instantly returns all three values, along with the median and the standard 1.5 ร— IQR outlier fences.

IQR is one of the most robust measures of spread in statistics because it isn't distorted by extreme values the way range or standard deviation can be. By focusing only on the middle half of sorted data, IQR gives you a stable picture of "typical" variability โ€” exactly the statistic that defines the box in a box plot.

For a complementary view of variability, pair this calculator with the Standard Deviation Calculator, or use the Percentile Rank Calculator to see where one specific value stands within the same dataset.

How to use this IQR calculator

  1. Enter your dataset โ€” paste or type your list of numbers into the dataset field, separated by commas, spaces, semicolons, or new lines.

  2. Read the IQR โ€” the large highlighted number shows the interquartile range, the spread of the middle 50% of your sorted data.

  3. Check Q1 and Q3 โ€” shown alongside the IQR, these define exactly where the middle 50% of your data begins and ends.

  4. Review the outlier fences โ€” the panel below shows the lower and upper bounds beyond which values are conventionally flagged as potential outliers.

  5. Adjust your dataset โ€” add, remove, or edit values to see instantly how the quartiles, IQR, and outlier fences respond.

  6. Check the step-by-step breakdown โ€” expand the calculation steps to see exactly how the median, Q1, and Q3 were derived from your sorted data.

Formula & Methodology

Interquartile range formula:
IQR = Q3 โˆ’ Q1

Outlier fences (1.5 ร— IQR rule):
- Lower fence = Q1 โˆ’ 1.5 ร— IQR
- Upper fence = Q3 + 1.5 ร— IQR

Quartile method used: Tukey's exclusive median method โ€” sort the data, find the median, then compute Q1 and Q3 as the medians of the lower and upper halves respectively (excluding the overall median itself when the dataset size is odd).

Worked example:

Dataset: 7, 15, 36, 39, 40, 41, 42, 43, 47, 49 (n = 10, already sorted, even count).

Step 1 โ€” Median: average of the 5th and 6th values = (40 + 41) / 2 = 40.5

Step 2 โ€” Lower half (first 5 values): 7, 15, 36, 39, 40 โ†’ Q1 = median = 36

Step 3 โ€” Upper half (last 5 values): 41, 42, 43, 47, 49 โ†’ Q3 = median = 43

Step 4 โ€” IQR = Q3 โˆ’ Q1 = 43 โˆ’ 36 = 7

Step 5 โ€” Outlier fences: Lower = 36 โˆ’ 1.5ร—7 = 25.5, Upper = 43 + 1.5ร—7 = 53.5

Any value below 25.5 or above 53.5 in this dataset (like 7 and 15) would be flagged as a potential outlier under the 1.5 ร— IQR rule.

Note: Different statistical software (Excel, R, Python's various libraries) may use different quartile interpolation methods, producing Q1/Q3 values that differ slightly from this calculator's Tukey-method result. The difference is usually small and doesn't change the overall interpretation of spread.

Frequently Asked Questions

The interquartile range (IQR) measures the spread of the middle 50% of a dataset, calculated as Q3 (the 75th percentile) minus Q1 (the 25th percentile). It matters because it describes variability without being distorted by extreme outliers the way range or standard deviation can be, making it one of the most robust measures of spread in descriptive statistics.
This calculator uses Tukey's method: sort the dataset, find the median, then split the data into a lower half and upper half (excluding the median itself if the dataset has an odd number of values). Q1 is the median of the lower half, and Q3 is the median of the upper half. Different textbooks use slightly different quartile methods, so results can vary by a small amount between calculators and software.
Range is calculated from only the minimum and maximum values, so a single extreme outlier can massively distort it. Standard deviation is influenced by every data point, including outliers, through the squared deviation term. IQR, by contrast, only looks at the middle 50% of the data, so a handful of extreme values at either end has little to no effect on the result.
The outlier fences use the standard 1.5 ร— IQR rule: the lower fence is Q1 โˆ’ 1.5 ร— IQR, and the upper fence is Q3 + 1.5 ร— IQR. Any data point falling outside these fences is conventionally flagged as a potential outlier โ€” a widely used, simple heuristic in exploratory data analysis and box plot construction.
It's a widely used convention, not a strict statistical law. The 1.5 multiplier works reasonably well for roughly symmetric, moderately-sized datasets, but for heavily skewed distributions or very small samples, it can flag legitimate data points as outliers or miss genuine ones. Always combine this rule with visual inspection (like a box plot or scatter plot) rather than relying on it alone.
A box plot's central box spans exactly from Q1 to Q3, meaning its width visually represents the IQR. The whiskers typically extend to the most extreme data points within the 1.5 ร— IQR fences, and any points beyond those fences are plotted individually as potential outliers โ€” making IQR the core statistic that defines a box plot's shape.
Standard deviation measures spread using every data point's squared distance from the mean, making it sensitive to outliers and best suited to roughly normal distributions. IQR only considers the middle 50% of sorted data, making it more robust to skewed distributions and extreme values. Use the [Standard Deviation Calculator](/standard-deviation-calculator/) for normally-distributed data, and IQR when your data may be skewed or contain outliers.
Yes โ€” if the middle 50% of your dataset contains identical or nearly identical values (common in datasets with heavy repetition or very small sample sizes), Q1 and Q3 can be equal or very close, producing an IQR near zero. This signals that the central portion of your data has very little variability, even if extreme values exist elsewhere in the dataset.
Yes, this is a well-known quirk of quartile calculations โ€” there are at least half a dozen recognized methods (including linear interpolation methods used by Excel and various statistical packages) that can each produce slightly different Q1 and Q3 values for the same dataset. This calculator uses Tukey's exclusive median method, one of the most commonly taught approaches, but always check which method a comparison tool uses if the numbers don't match exactly.
Mathematically, IQR can be computed from as few as 3โ€“4 values, but a meaningful measure of typical spread generally benefits from at least 10 or more data points. With very small datasets, Q1 and Q3 can be heavily influenced by just one or two values, making the resulting IQR less representative of underlying variability.
IQR is widely used in real-world data cleaning to automatically flag potential outliers in datasets before analysis, in salary and compensation benchmarking to describe the 'typical' middle range of pay for a role, and in process monitoring to track whether the core spread of measurements is staying stable over time โ€” all without needing to assume a normal distribution.
IQR describes the spread of the entire dataset using two fixed percentiles (25th and 75th), while percentile rank pinpoints exactly where one specific value falls within the dataset. Use the [Percentile Rank Calculator](/percentile-rank-calculator/) if you want to know where a single value stands, rather than the overall spread of the middle half of your data.
Also known as
IQR calculatorinterquartile range formulaquartile calculatorQ1 Q3 calculatoroutlier fence calculator