5 Number Summary in Excel Pivot Tables: PIVOTBY, GETPIVOTDATA & QUARTILE (2026)

    By Oge Nwaozuzu7 min readUpdated: April 28, 2026

    Pivot tables are Excel's most powerful aggregation tool — but they don't expose QUARTILE as a built-in summary. If you have 10,000 rows and need a five number summary for each of 50 subgroups, you need a workaround. Here are three reliable approaches, ranked by Excel version.

    The problem

    Built-in pivot table value functions are limited to Sum, Count, Average, Max, Min, Product, StdDev, and Var. There is no quartile or median summary. So you cannot drag a numeric field into Values and select "Q1" the way you can select "Average."

    Approach 1 (best for Microsoft 365): PIVOTBY

    If you have Microsoft 365 with the PIVOTBY function (rolled out in 2024), you can pass any function — including QUARTILE.INC — as the aggregator.

    =PIVOTBY(Data[Region], , Data[Sales], LAMBDA(x, QUARTILE.INC(x, 1)))

    Wrap the entire pivot in a HSTACK or build five sheets — one for each statistic — to get the full summary per group:

    =HSTACK( PIVOTBY(Data[Region], , Data[Sales], MIN), PIVOTBY(Data[Region], , Data[Sales], LAMBDA(x, QUARTILE.INC(x, 1))), PIVOTBY(Data[Region], , Data[Sales], MEDIAN), PIVOTBY(Data[Region], , Data[Sales], LAMBDA(x, QUARTILE.INC(x, 3))), PIVOTBY(Data[Region], , Data[Sales], MAX) )

    Why PIVOTBY wins

    It scales to hundreds of thousands of rows, recalculates dynamically, accepts any LAMBDA, and produces clean spilled output that you can chart directly.

    Approach 2 (universal): array formula with QUARTILE + IF

    For older Excel versions without PIVOTBY, use QUARTILE.INC with an IF filter. In Excel 365 and Excel 2021 these are dynamic arrays; in older versions confirm with Ctrl+Shift+Enter.

    =QUARTILE.INC(IF(Data[Region]="North", Data[Sales]), 1)

    Build a small lookup table with one row per region and five columns (Min, Q1, Median, Q3, Max). Each cell uses the same pattern with the appropriate region name and quartile number.

    Performance note

    With 10,000+ rows and 50 subgroups, this becomes 250 array formulas, which can slow recalculation. Convert to values once stable, or switch to Approach 1.

    Approach 3: Power Pivot DAX measures

    If your dataset is in the data model, define DAX measures using PERCENTILE.INC:

    Q1 := PERCENTILE.INC(Data[Sales], 0.25) Median := PERCENTILE.INC(Data[Sales], 0.5) Q3 := PERCENTILE.INC(Data[Sales], 0.75)

    These measures work natively in pivot tables — drag them into Values and they respond to row filters. This is the right choice for repeating reports against millions of rows.

    Pulling values back with GETPIVOTDATA

    Once your DAX measures are in a pivot, you can reference them in other parts of your workbook with GETPIVOTDATA:

    =GETPIVOTDATA("Q1", $A$3, "Region", "North")

    Building grouped box plots

    Once you have a five-number table per group, select the group labels and the five columns, then Insert → Statistical Chart → Box and Whisker. Excel will render side-by-side box plots without you needing to feed it the precomputed quartiles — it recomputes from raw data, so feed it the original column instead of the summary table for the cleanest result.

    Method to expect

    All three approaches use the linear-interpolation convention (Excel.INC). If your reference values come from a TI-84 or Minitab, expect small differences at Q1 and Q3 — see our why-they-differ guide.

    Verifying against an external source

    Spot-check one group with our calculator by copy-pasting the filtered values. The "Percentile method" toggle matches Excel.INC exactly.

    Verify Your Calculations

    Use the free five number summary calculator to check your work.

    Open Calculator

    Written by Oge Nwaozuzu

    Statistics educator and data analyst. Creator of 5numbersummarycalculator.app.