Skip to content

PERCENTOF

Returns the share a subset makes of a total: the sum of the subset divided by the sum of all the values.

Syntax

=PERCENTOF(, )

Math and trigonometry

Excel for Microsoft 365 only. It is a recent addition, so older versions and perpetual releases return #NAME?.

Try it

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

C2
A
B
C
1
Region
Sales
Share
2
North
800
40%
3
East
500
4
South
400
5
West
300
6

C2 =PERCENTOF(B2,$B$2:$B$5) returns 40%

How PERCENTOF works

PERCENTOF returns the proportion that one set of values makes of another. It gives the same result as SUM(data_subset) / SUM(data_all), in a single function, and it works naturally with the dynamic array functions in Microsoft 365. The result is a decimal, such as 0.4, so format the cell as a percentage to see 40%.

What it does

=PERCENTOF(B2, B2:B5) divides the value in B2 by the total of B2:B5. =PERCENTOF(B2:B3, B2:B5) divides the sum of the first two cells by the total. Either argument can be a single cell, a range, or an array returned by another function.

Share of total down a column

The usual pattern is a share-of-total column. Put =PERCENTOF(B2, $B$2:$B$5) in C2 and fill down. Locking the whole range with dollar signs keeps the denominator fixed while the subset moves, which is the same discipline you would use with =B2/SUM($B$2:$B$5).

Subsets from other functions

Because the arguments can be arrays, PERCENTOF combines well with FILTER: =PERCENTOF(FILTER(B2:B9, A2:A9="North"), B2:B9) is the North region's share of sales. In older versions the equivalent is =SUMIF(A2:A9, "North", B2:B9) / SUM(B2:B9), and that stays the better choice when the file must open in any version.

Compatibility

PERCENTOF is available in Excel for Microsoft 365 only. If the workbook is shared with people on Excel 2021, 2024 or earlier, they will see #NAME?. The formula =SUM(subset)/SUM(all) gives an identical result everywhere. Use PERCENTOF when you value the shorter, clearer formula and know your audience has Microsoft 365.

Compared with other approaches

  • =B2/SUM($B$2:$B$5) works in every version and gives the same number.
  • SUMIFS divided by SUM handles conditional shares in all versions.
  • A pivot table's "% of column total" gives shares with no formulas.

Details

If data_all sums to zero, PERCENTOF returns #DIV/0!. The function doesn't check that the subset really belongs to the whole, so a subset larger than the whole can return a result above 100%.

Arguments

data_subset
The values in the part, such as one cell B2, a range B2:B3, or a filtered list like FILTER(B2:B9,B2:B9>=400).
data_all
All the values that make up the whole, such as B2:B9. The part should be drawn from this set.

Examples

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

Example 1

One item as a share of the total

C2 =PERCENTOF(B2,$B$2:$B$5)

Result: 40%

800 of the 2,000 total is 40%. The dollar signs keep the total range fixed when you fill down.

C2
A
B
C
1
Region
Sales
Share
2
North
800
40%
3
East
500
4
South
400
5
West
300
6

C2 =PERCENTOF(B2,$B$2:$B$5) returns 40%

Example 2

Two items together

B7 =PERCENTOF(B2:B3,B2:B5)

Result: 65%

800 + 500 is 1,300 of 2,000, or 65%.

B7
A
B
C
1
Region
Sales
2
North
800
3
East
500
4
South
400
5
West
300
6
7
North and East
65%

B7 =PERCENTOF(B2:B3,B2:B5) returns 65%

Example 3

A share from a filtered list

B7 =PERCENTOF(FILTER(B2:B5,B2:B5>=400),B2:B5)

Result: 85%

FILTER keeps 800, 500 and 400, which add to 1,700 of the 2,000 total.

B7
A
B
C
1
Region
Sales
2
North
800
3
East
500
4
South
400
5
West
300
6
7
Regions selling 400+
85%

B7 =PERCENTOF(FILTER(B2:B5,B2:B5>=400),B2:B5) returns 85%

Example 4

The same result without PERCENTOF

B7 =SUM(B2:B3)/SUM(B2:B5)

Result: 65%

This works in every version of Excel and matches PERCENTOF(B2:B3, B2:B5).

B7
A
B
C
1
Region
Sales
2
North
800
3
East
500
4
South
400
5
West
300
6
7
North and East
65%

B7 =SUM(B2:B3)/SUM(B2:B5) returns 65%

Your turn.

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

Task 1 of 2

In C2, return the share of total revenue for the product in B2. Fill it down to C5.

Answer in C2, then it fills down to C5.

C2
A
B
C
D
E
1
Product
Revenue
Share
Share from items of 150+
2
Desks
450
3
Chairs
300
4
Lamps
150
5
Mats
100
6
7

Common mistakes

  • PERCENTOF is available only in Excel for Microsoft 365. Older versions show #NAME?. Use SUM(subset)/SUM(all) if the file has to work everywhere.
  • The result is a decimal. Format the cell as a percentage, or 0.4 will appear instead of 40%.
  • When filling down, lock the whole range as $B$2:$B$5. A relative range shifts and gives wrong shares.
  • If the whole sums to zero, the result is #DIV/0!. If the subset includes values outside the whole, the share can exceed 100%.
  • Text in either range is ignored, as it is in SUM. A number stored as text drops out of the share without warning.

Questions people ask

What does PERCENTOF do in Excel?

It returns the sum of a subset divided by the sum of the whole, as a decimal. PERCENTOF(B2, B2:B5) is B2 divided by the total of B2:B5.

Which versions of Excel have PERCENTOF?

It is for Excel for Microsoft 365 only. Excel 2021, 2024 and earlier return #NAME?. The formula `=SUM(subset)/SUM(all)` works in every version.

How do I calculate each item's percentage of the total?

Use `=PERCENTOF(B2, $B$2:$B$9)` and fill down, then format as a percentage. The older form is `=B2/SUM($B$2:$B$9)`.

Why does PERCENTOF show 0.4 instead of 40%?

PERCENTOF returns a decimal. Apply the Percent Style number format to the cell, which multiplies the display by 100 and adds the % sign.

Can I use PERCENTOF with a condition?

Yes, pass a filtered list as the first argument: `=PERCENTOF(FILTER(B2:B9, A2:A9="North"), B2:B9)`.

Learn PERCENTOF in a real sheet.

Tracks take you from the basics to modelling, one graded exercise at a time.