Calculating Interquartile Range (IQR) in Excel: A Step-by-Step Guide
Interquartile range (IQR) is a statistical measure that calculates the difference between the 75th percentile (Q3) and the 25th percentile (Q1) of a dataset. It's a useful metric for understanding the spread of data, especially when dealing with skewed distributions. In this article, we'll explore how to find the interquartile range in Excel, using a combination of built-in functions and manual calculations.
Understanding the Basics of Interquartile Range
Before diving into the calculations, let's quickly review what the IQR represents. Imagine you have a dataset of exam scores, and you want to understand how spread out they are. The IQR will give you the range of scores between the 25th percentile (Q1) and the 75th percentile (Q3). This range indicates the middle 50% of the data, where 25% of the scores are below Q1 and 25% are above Q3.
Method 1: Using the IQR Function in Excel
Excel offers a built-in function for calculating the IQR: IQR(). To use it, follow these steps:

- Select a cell to display the result.
- Type =IQR(A1:A100) (assuming your data is in cells A1:A100).
- Press Enter to get the IQR value.
Note that this function assumes your data is sorted in ascending order. If it's not, you'll need to sort it first using the Data > Sort & Filter > Sort option.
Method 2: Using Percentiles to Calculate IQR
Alternatively, you can use the PERCENTILE.INC function to calculate Q1 and Q3, and then subtract Q1 from Q3 to get the IQR. Here's how:
- Select a cell to display Q1.
- Type =PERCENTILE.INC(A1:A100,0.25) (assuming your data is in cells A1:A100).
- Press Enter to get the Q1 value.
- Repeat steps 1-3 to get Q3 using =PERCENTILE.INC(A1:A100,0.75).
- Subtract Q1 from Q3 to get the IQR: =Q3 - Q1.
Manual Calculation of IQR
While the IQR function and percentile-based methods are convenient, you may want to understand how to calculate IQR manually. This involves sorting your data, finding the median (Q2), and then calculating the interquartile range.

| Step | Description |
|---|---|
| 1 | Sort your data in ascending order. |
| 2 | Find the median (Q2) by averaging the middle two values (if there's an even number of values) or the middle value (if there's an odd number of values). |
| 3 | Split your data into two groups: values below Q2 (Q1) and values above Q2 (Q3). |
| 4 | Find the median of the lower half (Q1) and the upper half (Q3). |
| 5 | Subtract Q1 from Q3 to get the IQR. |
Tips and Variations
Here are some additional tips and variations to keep in mind:
- To calculate the IQR for multiple datasets, you can use the IQR function with an array of cell ranges (e.g., =IQR(A1:A100;B1:B100;C1:C100)).
- For smaller datasets (less than 10 values), you can calculate the IQR manually using the steps outlined above.
- To get the IQR for a specific subset of data, apply a filter to the original data range and then calculate the IQR using the filtered data.
By mastering the interquartile range in Excel, you'll be better equipped to analyze and understand the spread of your data. Whether you prefer the IQR function, percentile-based calculations, or manual methods, the key is to find the approach that works best for your specific use case.