Introduction
The IQR Calculator finds the interquartile range of any data set you enter. The IQR is the difference between the third quartile (Q3) and the first quartile (Q1) of your data. It tells you how spread out the middle 50% of your values are. This is one of the best ways to measure spread because it ignores extreme values, also called outliers. Scientists, students, and analysts use the IQR every day to better understand their data. Simply enter your numbers into the calculator above, and it will give you Q1, Q3, and the IQR right away.
How to use our IQR Calculator
Enter a set of numbers and this calculator will find the interquartile range (IQR), quartiles (Q1, Q2, Q3), five-number summary, outliers, and a box plot for your data.
Enter Your Data: Type or paste your numbers into the text box. You can separate values with commas, spaces, semicolons, or newlines. Fractions like 1/2 or 3/4 also work. You need at least 4 numbers for the calculator to find the quartiles.
Quartile Method: Pick how you want the quartiles calculated. "Inclusive (Type-7)" is the standard method used in most statistics classes. "Exclusive" matches Excel's QUARTILE.EXC function. "Tukey's Hinges" splits the data at the median and finds the median of each half.
Decimal Places: Choose how many decimal places to show in your results, from 0 to 6. The default is 2.
Outlier Detection: Select which outlier fences to use. "1.5×IQR" finds mild outliers, "3×IQR" finds extreme outliers, and "Show Both" displays both types at the same time.
Box Plot: Choose "Show" to display a box-and-whisker plot of your data, or "Hide" to turn it off.
Click Calculate IQR to see your results, including the five-number summary, IQR value, outlier fences, detected outliers, a box plot, sorted data with color-coded highlights, and a step-by-step breakdown of how each value was calculated. Click Reset to return all settings and data to their defaults.
What Is the Interquartile Range (IQR)?
The interquartile range (IQR) is a measure of how spread out the middle 50% of a data set is. You find it by subtracting the first quartile (Q1) from the third quartile (Q3). In simple terms, it tells you the range of values where the central half of your data falls. Because the IQR ignores the highest and lowest extremes, it gives a more reliable picture of spread than the full range, especially when your data contains outliers.
How to Calculate the IQR
To calculate the interquartile range by hand, follow these steps:
- Sort your data from smallest to largest.
- Find Q1 (the 25th percentile). This is the median of the lower half of your data.
- Find Q3 (the 75th percentile). This is the median of the upper half of your data.
- Subtract: IQR = Q3 − Q1.
For example, with the data set 7, 15, 36, 39, 40, 41, 42, 43, 47, 49, 55, 70, 92, Q1 is 39 and Q3 is 49. So the IQR is 49 − 39 = 10. This means the middle half of the values spans a width of 10 units.
Quartile Methods
There is more than one way to calculate quartiles, and different methods can give slightly different results. The three most common methods are:
- Inclusive (Type-7): The standard method used in most statistics textbooks. It uses the formula h = 1 + (n − 1) × p and interpolates between data points when needed.
- Exclusive (QUARTILE.EXC): The method used by Excel's
QUARTILE.EXCfunction. It uses h = (n + 1) × p, which positions the quartiles slightly differently. - Tukey's Hinges: This method splits the sorted data at the median, then finds the median of each half. It is commonly used when drawing box-and-whisker plots.
All three methods produce the same IQR for many data sets, but they can differ when the number of data points is small or when values don't divide evenly.
Using the IQR to Detect Outliers
One of the most useful things about the IQR is that it helps you find outliers—values that are unusually far from the rest of your data. You do this by calculating fences:
- Mild outlier fences (1.5 × IQR): Lower fence = Q1 − 1.5 × IQR, Upper fence = Q3 + 1.5 × IQR. Any value outside these fences is considered a mild outlier.
- Extreme outlier fences (3 × IQR): Lower fence = Q1 − 3 × IQR, Upper fence = Q3 + 3 × IQR. Values beyond these fences are considered extreme outliers.
This fence method, sometimes called Tukey's rule, is the standard approach for outlier detection in box plots and many real-world data analyses.
Why the IQR Matters
The IQR is widely used in statistics because it is resistant to outliers. Unlike the standard deviation or full range, a single extreme value does not heavily change the IQR. This makes it especially helpful when working with skewed data or data sets that contain errors. You will see the IQR used in box plots, data cleaning, quality control, and research across fields like science, business, and education. When analyzing your results, you may also want to look at related measures such as percent change to understand how values shift over time, or use a percent error calculator to compare observed values against expected ones. For a quick check on basic proportions in your data, our percentage calculator is another handy tool, while the rate of change calculator can help you examine trends across data points.