QUARTILE.EXC vs QUARTILE.INC: Which One Should You Use?

Learn how to use QUARTILE.INC and QUARTILE.EXC Function in Excel with this tutorial blogpost by ExcelGuru
You run a quartile formula on your data and share the report. A colleague checks the same numbers in R and gets different results. Another uses a TI-84 calculator and gets a third set. All three are correct — they just use different methods. Excel exposes both major approaches through two functions. QUARTILE.INC uses the inclusive method, matching R, Python, and the legacy QUARTILE function. QUARTILE.EXC uses the exclusive method, matching academic textbooks and TI calculators. Choosing the wrong one doesn’t break your spreadsheet, but it produces numbers that don’t match your team’s expectation. This guide covers the full syntax, the quart 0–4 support table (including why QUARTILE.EXC returns #NUM! for quart = 0 and 4), and eight practical examples: side-by-side comparison on the same dataset, IQR calculation, outlier detection with the 1.5×IQR fence rule, the five-number summary, salary band classification, box-and-whisker chart preparation, academic grade analysis, and the relationship between QUARTILE and PERCENTILE functions.

You run a quartile formula on the same dataset in two different tools and get different answers. Both are correct — they use different methods. Excel offers two quartile functions precisely because two legitimate statistical conventions exist: QUARTILE.INC uses percentile positions from 0 to 1 inclusive. QUARTILE.EXC uses positions from 0 to 1 exclusive, treating the endpoints as outside the percentile scale.

The difference matters when your results must match a specific tool, textbook, or reporting standard. R and Python default to the inclusive method. TI-84 calculators default to the exclusive method. Choosing the wrong function means your Excel quartiles will not match your colleagues’ analysis — even on the same raw dataset. This guide explains both functions fully and shows when to use each one.

Availability: Both functions were introduced in Excel 2010 and work in all later versions including Microsoft 365, Excel 2024, 2021, 2019, and 2016. They also work in Google Sheets. The legacy QUARTILE function (available since Excel 2000) returns the same result as QUARTILE.INC but is a compatibility function — avoid it in new workbooks.

What Are Quartiles?

Quartiles divide an ordered dataset into four equal parts. Q1 marks the 25th percentile — 25% of values fall below it. Q2 is the median at the 50th percentile, and Q3 marks the 75th percentile. Together, Q1 and Q3 define the interquartile range (IQR), which measures the spread of the middle 50% of the data.

Where Q1 and Q3 fall depends on whether the median is included or excluded when splitting the data into halves. This is the only difference between the two functions. For datasets with an even number of values, both methods often agree. For datasets with an odd number of values, the results frequently differ.

What Is the Syntax for Each Function?

Both functions share the same two-argument structure.

=QUARTILE.INC(array, quart) =QUARTILE.EXC(array, quart)
ArgumentRequired?What it does
arrayRequiredThe range or array of numeric values to analyse. Text, logical values, and empty cells are ignored. At least one numeric value is required.
quartRequiredAn integer indicating which quartile to return. QUARTILE.INC accepts 0 through 4. QUARTILE.EXC accepts only 1 through 3.

How Does the Quart Argument Differ Between the Two Functions?

The quart argument is where the two functions diverge most visibly. QUARTILE.INC accepts quart values from 0 to 4 — including the minimum (0) and maximum (4). QUARTILE.EXC only accepts quart values from 1 to 3. Consequently, it cannot return the minimum or maximum because those are the excluded endpoints.

quartReturnsQUARTILE.INCQUARTILE.EXC
0Minimum✓ Returns MIN✗ #NUM! error
1Q1 — 25th percentile✓ Valid✓ Valid
2Q2 — Median= MEDIAN()= MEDIAN()
3Q3 — 75th percentile✓ Valid✓ Valid
4Maximum✓ Returns MAX✗ #NUM! error
QUARTILE.EXC with quart 0 or 4 always returns #NUM!: The exclusive method treats 0% and 100% as outside the valid percentile range. Use MIN() and MAX() for those values instead. Consequently, only QUARTILE.INC can produce a complete five-number summary (Min, Q1, Median, Q3, Max) using a single function with quart 0 through 4.

How Do the Results Compare on the Same Dataset?

Consider the nine values {1, 3, 5, 7, 9, 11, 13, 15, 17}. The median is 9. QUARTILE.INC includes 9 when calculating Q1 and Q3. QUARTILE.EXC excludes it. The table below shows the difference.

Quartile
QUARTILE.INC
QUARTILE.EXC
Difference
Q1 (quart=1)
4
3.5
INC is higher
Q2 / Median (quart=2)
9
9
Always identical
Q3 (quart=3)
14
14.5
EXC is higher
IQR (Q3 − Q1)
10
11
EXC wider IQR

The pattern is consistent: QUARTILE.EXC produces a lower Q1 and a higher Q3 than QUARTILE.INC. Consequently, the exclusive method always yields a wider interquartile range. A wider IQR means the outlier fences are set further out — so fewer values are flagged as outliers.

Examples 1–4: Core Quartile Calculations

1
Basic Q1, Q2, and Q3 — running both functions side by side

The starting point for any quartile analysis is calculating Q1 and Q3. Running both functions in adjacent columns makes the difference immediately visible. This lets you choose the appropriate result before the analysis goes further.

Data in A2:A20. Calculate Q1, Q2, and Q3 with both methods. QUARTILE.INC — matches R, Python, legacy QUARTILE(): =QUARTILE.INC(A2:A20, 1) → Q1 (inclusive 25th percentile) =QUARTILE.INC(A2:A20, 2) → Median (same as =MEDIAN(A2:A20)) =QUARTILE.INC(A2:A20, 3) → Q3 (inclusive 75th percentile) QUARTILE.EXC — matches TI-84 calculators: =QUARTILE.EXC(A2:A20, 1) → Q1 (exclusive 25th percentile) =QUARTILE.EXC(A2:A20, 2) → Median (always identical to INC) =QUARTILE.EXC(A2:A20, 3) → Q3 (exclusive 75th percentile) Five-number summary — QUARTILE.INC only (quart 0–4): QUARTILE.EXC cannot return quart=0 or quart=4. =QUARTILE.INC(A2:A20, 0) → Minimum =QUARTILE.INC(A2:A20, 4) → Maximum
2
Interquartile range — measuring the spread of the middle 50%

The IQR is Q3 minus Q1. It measures the spread of the central half of the dataset, unaffected by extreme values. Both functions produce a valid IQR — however, they produce different values from each other. The exclusive method produces a wider IQR. Pick one method and use it consistently throughout the analysis.

IQR using QUARTILE.INC — matches R, Python, legacy QUARTILE(): =QUARTILE.INC(A2:A100, 3) - =QUARTILE.INC(A2:A100, 1) IQR using QUARTILE.EXC — matches TI-84 calculators: =QUARTILE.EXC(A2:A100, 3) - =QUARTILE.EXC(A2:A100, 1) Named range — cleaner when the range is used repeatedly: Define "Scores" as the named range A2:A100. =QUARTILE.INC(Scores, 3) - =QUARTILE.INC(Scores, 1)

Outlier Detection and Five-Number Summary

3
Outlier detection — the 1.5 × IQR fence method

The standard Tukey fence method defines outlier boundaries at Q1 − 1.5×IQR and Q3 + 1.5×IQR. Both functions work for this purpose. The exclusive method produces wider fences, so it flags fewer values as outliers. Always document which function you used so readers can verify the fence boundaries.

Store Q1 and Q3 in helper cells first (C1 and D1) for clarity. C1: =QUARTILE.INC(A2:A100, 1) D1: =QUARTILE.INC(A2:A100, 3) Lower fence formula: =C1 - 1.5 * (D1 - C1) Upper fence formula: =D1 + 1.5 * (D1 - C1) Flag each value in column B — TRUE = outside the fence: =OR(B2 < C1-1.5*(D1-C1), B2 > D1+1.5*(D1-C1)) → TRUE = potential outlier
Which function for outlier detection? QUARTILE.INC is the conventional default in most data science contexts. If your audience uses TI-84 calculators or a style guide specifies the exclusive method, use QUARTILE.EXC consistently. Document which method you used so readers can reproduce the results.
4
Five-number summary — the foundation of a box plot

A five-number summary shows the minimum, Q1, median, Q3, and maximum. This is the data that drives a box plot. Only QUARTILE.INC can produce all five values from one function. QUARTILE.EXC cannot return the minimum (quart 0) or maximum (quart 4).

Full five-number summary using QUARTILE.INC (quart 0 through 4): =QUARTILE.INC(A2:A100, 0) → Minimum =QUARTILE.INC(A2:A100, 1) → Q1 =QUARTILE.INC(A2:A100, 2) → Median =QUARTILE.INC(A2:A100, 3) → Q3 =QUARTILE.INC(A2:A100, 4) → Maximum Alternatively, use EXC Q1/Q3 with explicit MIN and MAX: Use this when you specifically need the exclusive Q1 and Q3. =MIN(A2:A100) → Minimum =QUARTILE.EXC(A2:A100, 1) → Q1 (exclusive) =MEDIAN(A2:A100) → Median =QUARTILE.EXC(A2:A100, 3) → Q3 (exclusive) =MAX(A2:A100) → Maximum

Examples 5–8: Real-World Scenarios

Matching Tools, Classifying Data, and the Decision Framework

5
Matching R and Python results — use QUARTILE.INC

R’s quantile() and Python’s numpy.quantile() both default to the inclusive interpolation method — the same method as QUARTILE.INC. Consequently, if your Excel analysis must match output from either language, QUARTILE.INC is the correct choice.

R: quantile(x, 0.25) → matches QUARTILE.INC(array, 1) Python: np.quantile(x, 0.25) → matches QUARTILE.INC(array, 1) TI-84 1-Var Stats Q1 → matches QUARTILE.EXC(array, 1) Excel legacy QUARTILE() → matches QUARTILE.INC(array, 1) Excel formula to match R and Python defaults: =QUARTILE.INC(A2:A100, 1) → Q1 — matches R and Python =QUARTILE.INC(A2:A100, 3) → Q3 — matches R and Python Excel formula to match TI-84: =QUARTILE.EXC(A2:A100, 1) → Q1 — matches TI-84 =QUARTILE.EXC(A2:A100, 3) → Q3 — matches TI-84
Default rule: use QUARTILE.INC to match R, Python, Excel’s legacy QUARTILE, and most textbooks. Use QUARTILE.EXC specifically to match TI-84 calculators or when your reporting standard explicitly requires the exclusive method.
6
Classify values into quartile bands — Q1 / Q2 / Q3 / Q4 labels

A common business task is labelling each data row with its quartile band — “Bottom 25%”, “Lower mid”, “Upper mid”, or “Top 25%”. Nested IF formulas using quartile thresholds achieve this. The same pattern works with either function — just store the thresholds in helper cells first.

Store thresholds in helper cells: C1: =QUARTILE.INC(A2:A100, 1) D1: =QUARTILE.INC(A2:A100, 2) E1: =QUARTILE.INC(A2:A100, 3) Classify each value in column B: =IF(B2<=C1, "Q1 — Bottom 25%", IF(B2<=D1, "Q2 — Lower mid", IF(B2<=E1, "Q3 — Upper mid", "Q4 — Top 25%"))) Count values per band using COUNTIFS: =COUNTIFS(B2:B100, "<="&C1) → Q1 count =COUNTIFS(B2:B100,">"&C1,B2:B100,"<="&D1) → Q2 count
7
Dynamic quart argument — cell reference controls the quartile shown

The quart argument accepts a cell reference. This makes the formula dynamic — a dropdown or input cell controls which quartile displays without editing any formula. This pattern is specifically useful for dashboards where users select which statistic to view.

B1 holds the quart value (0–4 for INC, 1–3 for EXC). Change B1 and the result updates — no formula edit needed. =QUARTILE.INC(A2:A100, $B$1) Add IFERROR to handle out-of-range quart values gracefully: =IFERROR(=QUARTILE.INC(A2:A100, $B$1), "Enter 0–4 in B1") Combined label — B1=1 produces "Q1: 42.5": =CHOOSE($B$1+1,"Min","Q1","Q2","Q3","Max") & ": " & =QUARTILE.INC(A2:A100, $B$1)
8
Decision framework — which function should you use?

Most users should default to QUARTILE.INC. It matches the most common statistical tools and textbooks. Use QUARTILE.EXC only when a specific tool or standard requires it. Never mix both functions in the same analysis — inconsistency in the method will produce IQR values that cannot be compared.

USE QUARTILE.INC when: ✓ Results must match R (quantile() default) ✓ Results must match Python (np.quantile() default) ✓ You need Min (quart=0) or Max (quart=4) ✓ You follow most statistics textbooks ✓ You are replacing the legacy QUARTILE() function ✓ You are unsure — INC is the safer default USE QUARTILE.EXC when: ✓ Results must match a TI-84 calculator ✓ A reporting standard specifically requires it NEVER: ✗ Mix both functions in the same analysis ✗ Use the legacy QUARTILE() in new workbooks ✗ Use QUARTILE.EXC with quart=0 or quart=4

Common QUARTILE Issues and How to Fix Them

#NUM! error from QUARTILE.EXC

QUARTILE.EXC returns #NUM! for two reasons: the quart argument is 0 or 4 (use MIN or MAX instead), or the array is empty. Additionally, if the array has only two values, QUARTILE.EXC(array, 1) returns #NUM! because the exclusive method requires at least three values to calculate Q1. Switch to QUARTILE.INC or add more data.

Results do not match R or Python

R and Python both default to the inclusive method — but each supports multiple alternative interpolation types. If your code specified a non-default method (for example, numpy’s method=‘hazen’ or type=5 in R), the result may not match either Excel function directly. Confirm which specific method your code uses before choosing between the two functions.

IQR differs from a colleague’s result on the same data

Two analysts using the same dataset but different functions will get different IQR values. This is expected and not an error in either analysis. The fix is to agree on one method before the analysis begins and document it in the report. For most business contexts, QUARTILE.INC is the conventional choice.

Do not use the legacy QUARTILE function in new workbooks: QUARTILE is a compatibility function. Microsoft warns it may not be available in future Excel versions. It returns identical values to QUARTILE.INC, so replacing it is a direct swap: =QUARTILE(A2:A100, 1) becomes =QUARTILE.INC(A2:A100, 1) with no change to results.

Frequently Asked Questions

  • What is the difference between QUARTILE.INC and QUARTILE.EXC?+
    Both functions calculate quartiles but use different percentile conventions. QUARTILE.INC uses a range of 0 to 1 inclusive — the minimum and maximum are included. It accepts quart values from 0 to 4. QUARTILE.EXC uses a range of 0 to 1 exclusive — the endpoints are outside the scale. It only accepts quart values from 1 to 3. On the same dataset, QUARTILE.EXC produces a lower Q1 and higher Q3 than QUARTILE.INC, yielding a wider IQR. Both methods are statistically valid — the choice depends on which tool or standard you need to match.
  • Which quartile function should I use as my default?+
    Use QUARTILE.INC as your default. It matches the most widely used statistical tools — R’s quantile(), Python’s numpy.quantile(), and the legacy Excel QUARTILE function. Use QUARTILE.EXC only when your results need to match a TI-84 calculator, or when a specific reporting standard requires the exclusive method. The most important rule is consistency: use one method throughout a single analysis and document which one you chose.
  • Why does QUARTILE.EXC return #NUM! for quart 0 or 4?+
    The exclusive method defines the percentile range as strictly between 0 and 1 — the 0th percentile (minimum) and 100th percentile (maximum) are outside this range. Consequently, QUARTILE.EXC cannot calculate them by design. To get the minimum, use =MIN(array). To get the maximum, use =MAX(array). If you need all five values of a five-number summary from one function, use QUARTILE.INC with quart values 0 through 4.

More Questions About QUARTILE

  • Do QUARTILE.INC and QUARTILE.EXC always give different results?+
    Not always. Both functions always return the same Q2 (median). For Q1 and Q3, they often differ — but for some datasets the interpolation produces identical values. The difference is most noticeable on small datasets with an odd number of values. For large datasets (n > 50), the practical difference is usually very small. You should still choose one method deliberately rather than assuming the results will match.
  • Does QUARTILE.INC match the legacy QUARTILE function?+
    Yes, exactly. QUARTILE.INC and the legacy QUARTILE function use identical calculations and return identical results for every quart value. Microsoft introduced QUARTILE.INC to make the inclusive method explicit by name. Replace any QUARTILE with QUARTILE.INC in new workbooks — it is a direct swap with no change to results. Microsoft may remove QUARTILE from future Excel versions.
  • Can I use QUARTILE functions in Google Sheets?+
    Yes. Google Sheets supports both QUARTILE.INC and QUARTILE.EXC with identical syntax and identical calculation methods. Results match perfectly between the two platforms. Google Sheets also supports the legacy QUARTILE function. As in Excel, QUARTILE.INC is the recommended function for new sheets.