Skip to content

QUARTILE.INC

Returns the minimum, first quartile, median, third quartile or maximum of a data set, using the inclusive method.

Syntax

=QUARTILE.INC(, )

Statistical

Excel 2010 and later, including Excel for Microsoft 365 and Excel for the web. The older QUARTILE function works in every version.

Try it

Edit the formula in B13 or change the inputs. The sheet recalculates as you type.

B13
A
B
C
1
Request
Response (ms)
2
R1
120
3
R2
135
4
R3
150
5
R4
160
6
R5
175
7
R6
190
8
R7
205
9
R8
230
10
R9
260
11
R10
310
12
13
Q1
152.5

B13 =QUARTILE.INC(B2:B11,1) returns 152.5

How QUARTILE.INC works

QUARTILE.INC splits a sorted data set into four equal parts and returns the cut points. It is the quickest way to describe how spread out values are, and the building block of box plots and outlier checks.

The five quart values

  • 0 returns the minimum, the same as MIN.
  • 1 returns the first quartile: 25% of values fall below it.
  • 2 returns the median, the same as MEDIAN.
  • 3 returns the third quartile: 75% of values fall below it.
  • 4 returns the maximum, the same as MAX.

Any other number, including 5 or a negative number, returns #NUM!. A fraction is cut down to a whole number.

How the quartile is calculated

QUARTILE.INC is PERCENTILE.INC at 0, 0.25, 0.5, 0.75 and 1. For n values the position is 1 + k × (n − 1), and Excel interpolates when the position is not a whole number. With nine values the first quartile sits at position 1 + 0.25 × 8 = 3, which is exactly the third value, so no interpolation is needed.

The interquartile range and outliers

The distance from Q1 to Q3 is the interquartile range (IQR):

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

It describes the spread of the middle half of the data and is not distorted by extreme values, unlike the range or the standard deviation. A common rule flags a value as a possible outlier when it is more than 1.5 × IQR below Q1 or above Q3.

INC and EXC

QUARTILE.INC uses the inclusive method, where quartile 0 is the minimum and 4 is the maximum. A second function, QUARTILE.EXC, uses the exclusive method and only accepts 1, 2 and 3, and gives slightly different Q1 and Q3 values for the same data. If a standard or textbook you follow specifies exclusive quartiles, use QUARTILE.EXC. Otherwise QUARTILE.INC is the usual default.

QUARTILE and QUARTILE.INC

The older QUARTILE function returns the same results as QUARTILE.INC and is kept for compatibility. Use QUARTILE.INC in new work, so the method is clear from the name.

Arguments

array
The range or array of numbers, such as B2:B11. Text and blanks are ignored.
quart
Which quartile to return: 0 the minimum, 1 the first quartile (25th percentile), 2 the median, 3 the third quartile (75th percentile), 4 the maximum. Any other number returns #NUM!.

Examples

Each example is a live sheet. Change the inputs or the formula and watch the result.

Example 1

The first quartile

B13 =QUARTILE.INC(B2:B11,1)

Result: 152.5

The position is 1 + 0.25 × 9 = 3.25: the 3rd value (150) plus a quarter of the step to the 4th (160).

B13
A
B
C
1
Request
Response (ms)
2
R1
120
3
R2
135
4
R3
150
5
R4
160
6
R5
175
7
R6
190
8
R7
205
9
R8
230
10
R9
260
11
R10
310
12
13
Q1
152.5

B13 =QUARTILE.INC(B2:B11,1) returns 152.5

Example 2

The third quartile

B13 =QUARTILE.INC(B2:B11,3)

Result: 223.75

The position is 1 + 0.75 × 9 = 7.75: the 7th value (205) plus 75% of the step to the 8th (230).

B13
A
B
C
1
Request
Response (ms)
2
R1
120
3
R2
135
4
R3
150
5
R4
160
6
R5
175
7
R6
190
8
R7
205
9
R8
230
10
R9
260
11
R10
310
12
13
Q3
223.75

B13 =QUARTILE.INC(B2:B11,3) returns 223.75

Example 3

The interquartile range

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

Result: 71.25

Q3 is 223.75 and Q1 is 152.5, so the middle half of the data spans 71.25 ms.

B13
A
B
C
1
Request
Response (ms)
2
R1
120
3
R2
135
4
R3
150
5
R4
160
6
R5
175
7
R6
190
8
R7
205
9
R8
230
10
R9
260
11
R10
310
12
13
IQR
71.25

B13 =QUARTILE.INC(B2:B11,3)-QUARTILE.INC(B2:B11,1) returns 71.25

Example 4

An outlier fence

B13 =QUARTILE.INC(B2:B11,3)+1.5*(QUARTILE.INC(B2:B11,3)-QUARTILE.INC(B2:B11,1))

Result: 330.625

Q3 plus 1.5 times the IQR is 223.75 + 106.875. A response time above 330.625 would be flagged as a possible outlier. The slowest here, 310, is inside the fence.

B13
A
B
C
1
Request
Response (ms)
2
R1
120
3
R2
135
4
R3
150
5
R4
160
6
R5
175
7
R6
190
8
R7
205
9
R8
230
10
R9
260
11
R10
310
12
13
Upper fence
330.625

B13 =QUARTILE.INC(B2:B11,3)+1.5*(QUARTILE.INC(B2:B11,3)-QUARTILE.INC(B2:B11,1)) returns 330.625

Example 5

An invalid quart returns #NUM!

B13 =QUARTILE.INC(B2:B5,5)

Result: #NUM!

Only 0 to 4 are valid.

B13
A
B
C
1
Request
Response (ms)
2
R1
120
3
R2
135
4
R3
150
5
R4
160
6
7
8
9
10
11
12
13
Quartile 5
#NUM!

B13 =QUARTILE.INC(B2:B5,5) returns #NUM!

Your turn.

Solve it in the sheet. Every answer is checked, with hints if you need them.

Task 1 of 2

In B12, return the first quartile of the daily order counts.

Answer in B12.

B12
A
B
C
D
1
Day
Orders
2
D1
6
3
D2
8
4
D3
9
5
D4
11
6
D5
12
7
D6
14
8
D7
15
9
D8
18
10
D9
20
11
12
First quartile
13
Interquartile range

Common mistakes

  • Only 0, 1, 2, 3 and 4 are valid for quart. QUARTILE.INC(B2:B11,25) returns #NUM!, because quart is not a percentage.
  • Quartiles are interpolated, so Q1 and Q3 often are not values from your data. That is normal.
  • QUARTILE.INC and QUARTILE.EXC give different Q1 and Q3 values for the same data. Use the method that your standard or report names.
  • Zeros that mean "no data" pull the quartiles down. Clean the range, or use a filter, before calculating.
  • On very small data sets, quartiles carry little meaning. With four values, Q1 and Q3 are interpolated between just two pairs.

Questions people ask

What is the difference between QUARTILE and QUARTILE.INC?

They return the same results. QUARTILE.INC is the newer name from Excel 2010, and QUARTILE is kept for compatibility.

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

INC treats the data as a whole population and allows quart 0 to 4. EXC uses a sample method and allows only 1 to 3, and its Q1 and Q3 are usually further from the median.

How do I calculate the interquartile range?

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

Is the second quartile the median?

Yes. `=QUARTILE.INC(B2:B11,2)` equals `=MEDIAN(B2:B11)`.

Learn QUARTILE.INC in a real sheet.

QUARTILE.INC is taught in Data analysis with formulas, lesson 16: MEDIAN, PERCENTILE and QUARTILE. Each lesson is a short, graded exercise like the one above.