Interquartile Range (IQR) Calculator
StatisticsCalculate Q1, Q3, and the interquartile range (IQR) for any dataset instantly, finding the spread of the middle 50% and outlier fences for free.
Reviewed by the thecalcu.com team · Last updated July 29, 2026
Separate numbers with commas, spaces, semicolons, or new lines
Interquartile Range
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.
Why Use an Interquartile Range Calculator?
Computing IQR by hand requires sorting your entire dataset, finding the median, correctly splitting the data into lower and upper halves (with different rules depending on whether n is odd or even), finding the median of each half, and finally subtracting, a multi-step process where a small mistake anywhere changes the final result.
This calculator handles all of that instantly, including the trickier edge cases around odd- versus even-sized datasets. It also computes the standard outlier fences automatically, so you get a ready-to-use threshold for flagging unusual values without a separate calculation.
Because the result updates live as you edit your dataset, you can quickly test how adding, removing, or adjusting individual data points affects the overall spread and outlier boundaries.
Who Should Use This Calculator?
Data analysts and data scientists performing exploratory data analysis and needing a quick, outlier-resistant measure of spread before deciding on further statistical tests.
Students in statistics courses learning to construct box plots and needing to verify Q1, Q3, and IQR calculations against textbook or homework problems.
Researchers cleaning datasets who want an automatic, defensible rule (the 1.5 × IQR fence) for flagging potential outliers before running further analysis.
HR and compensation analysts describing the "typical" middle range of salaries for a role or department, which is often more informative to stakeholders than a full range or standard deviation.
Quality control professionals monitoring the core spread of process measurements over time, especially for data that may be skewed or contain occasional extreme readings.
What Insights Does This Calculator Give You?
Interquartile Range (IQR), the headline result: the spread of the middle 50% of your data. A smaller IQR indicates the central portion of your data is tightly clustered; a larger IQR indicates more spread even after ignoring extreme outliers.
Q1 and Q3, the boundaries of the middle 50%. Reporting these alongside the median gives a fuller, five-number-summary style picture of your dataset's shape.
Median, the exact midpoint of your sorted dataset, useful as a robust center-point reference alongside Q1 and Q3.
Outlier Fences, the lower and upper bounds (using the 1.5 × IQR rule) beyond which data points are conventionally flagged as potential outliers, giving you an immediate, defensible threshold for further investigation.
Dataset Size (n), always check this alongside the IQR itself, since quartile calculations on very small datasets can be heavily influenced by just one or two values.
How to use this IQR calculator
Enter your dataset, paste or type your list of numbers into the dataset field, separated by commas, spaces, semicolons, or new lines.
Read the IQR, the large highlighted number shows the interquartile range, the spread of the middle 50% of your sorted data.
Check Q1 and Q3, shown alongside the IQR, these define exactly where the middle 50% of your data begins and ends.
Review the outlier fences, the panel below shows the lower and upper bounds beyond which values are conventionally flagged as potential outliers.
Adjust your dataset, add, remove, or edit values to see instantly how the quartiles, IQR, and outlier fences respond.
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.
Show formula & methodology ↓Show less ↑
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