Share of Total with PERCENTOF

Excel Formulas › Dynamic Arrays

365 (2024+)PERCENTOF

PERCENTOF computes what fraction a subset is of a total — and pairs perfectly with GROUPBY/PIVOTBY to add a “% of total” column to a grouped summary without extra math.


Quick formula: each value as a share of the whole range:
=PERCENTOF(B2, B2:B10)
Divides the subset (B2) by the total of the range — the same as B2/SUM(B2:B10), but clearer inside grouped aggregations.

Functions used (tap for the full reference guide):

The example

Each region’s share of total sales.

AB
1Region% of total
2East32%
3West29%

The formula

Subset over total:

=PERCENTOF(B2, B2:B10) // = B2 / SUM(B2:B10)

How it works

PERCENTOF expresses a part as a share:

  1. First argument: the subset (a value or range). Second: the total range.
  2. It returns subset-sum ÷ total-sum — the share of the whole.
  3. Its real power is as a GROUPBY/PIVOTBY aggregation: pass PERCENTOF to get each group’s % of total automatically.
  4. On its own it’s equivalent to value / SUM(range), just more readable in array contexts.

Grouped % of total in one shot: =GROUPBY(Region, Sales, PERCENTOF) spills each region with its share of the grand total — the kind of thing that used to need a pivot’s “Show Values As.”

Try it: interactive demo

Live demo

Values → each as % of total.

Variations

In GROUPBY

Grouped share of total:

=GROUPBY(Region, Sales, PERCENTOF)

Plain equivalent

Without PERCENTOF:

=B2 / SUM(B2:B10)

Subset of a subtotal

Share within a group total.

Pitfalls & errors

365 (2024+) only. PERCENTOF is recent; use value/SUM(range) elsewhere.

Zero total. A total of zero divides by zero — guard if the range can sum to 0.

Format as percent. The result is a ratio; apply a percentage format.

Practice workbook

📊
Download the free Share of Total with PERCENTOF practice workbook
PERCENTOF examples (formula text + result) with GROUPBY and plain-ratio variants, plus 4 challenges with answers. No sign-up required.

Frequently asked questions

What does PERCENTOF do in Excel?
PERCENTOF returns a subset as a share of a total: =PERCENTOF(subset, total). It's equivalent to value/SUM(range) but shines as a GROUPBY/PIVOTBY aggregation. Requires Excel 365 (2024+).
How do I add a % of total column to a grouped summary?
Use it as the aggregation: =GROUPBY(Region, Sales, PERCENTOF) spills each group's share of the grand total.
What's the equivalent without PERCENTOF?
Divide by the sum: =value / SUM(range), formatted as a percentage.

Stop fighting formulas. Learn them in a day.

This recipe is one of hundreds of real-world formulas we teach. Our Excel Formulas & Functions class covers lookups, logic, text, and dynamic arrays hands-on — live in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related formulas: Pivot percent of total · GROUPBY · Percent change & % of total

Function references: PERCENTOF · SUM