# How to calculate quartiles in Excel

Use =QUARTILE.INC(range, 1) for Q1, =QUARTILE.INC(range, 2) for the median and =QUARTILE.INC(range, 3) for Q3. The last argument picks the quartile, 0 to 4.

**Excel:** `=QUARTILE.INC(B2:B11,1)` (Excel 2010 and later)

**Google Sheets:** the same formula works.

## Example

Sample data (row 1 is the header):

| A | B | C | D | E |
| --- | --- | --- | --- | --- |
| Order | Minutes |  | Statistic | Value |
| #1 | 34 |  |  |  |
| #2 | 38 |  |  |  |
| #3 | 41 |  |  |  |
| #4 | 29 |  |  |  |
| #5 | 36 |  |  |  |
| #6 | 44 |  |  |  |
| #7 | 39 |  |  |  |
| #8 | 31 |  |  |  |
| #9 | 95 |  |  |  |
| #10 | 35 |  |  |  |

Formula in G2: `=QUARTILE.INC(B2:B11,1)`

Result: 34.25

## How it works

Quartiles cut sorted data into four equal parts. Q1 is the value a quarter of the way up the sorted list, Q3 is three quarters of the way, and quartile 2 is the median.

`QUARTILE.INC` interpolates between values when the position falls between two of them. `QUARTILE.EXC` uses a different method that excludes the endpoints, so the two can disagree on small data sets.

## Other ways

- `=PERCENTILE.INC(B2:B11,0.25)`: The same answer written as a percentile: 25% is Q1.
- `=QUARTILE(B2:B11,1)`: The older name, kept for compatibility. It matches QUARTILE.INC.

## Common mistakes

- The quartile argument runs from 0 (minimum) to 4 (maximum). Passing 5 returns #NUM!.
- Blank cells and text in the range are ignored, but zeros are counted.

## Questions

**What is the difference between QUARTILE.INC and QUARTILE.EXC?**

INC includes the minimum and maximum when interpolating; EXC excludes them. For most reports use INC, which matches the older QUARTILE function.

**How do I get the interquartile range?**

Subtract: `=QUARTILE.INC(B2:B11,3)-QUARTILE.INC(B2:B11,1)`.

Every formula and result on this page was checked by running it in the Spreadsheet Practice formula engine on 2026-11-20.

Source: https://spreadsheetpractice.com/formulas/calculate-quartiles
