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 =PERCENTOF(B2,$B$2:$B$5) returns 40%
Returns the share a subset makes of a total: the sum of the subset divided by the sum of all the values.
Syntax
=PERCENTOF(, )
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 =PERCENTOF(B2,$B$2:$B$5) returns 40%
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%.
=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.
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).
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.
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.
=B2/SUM($B$2:$B$5) works in every version and gives the same number.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%.
B2, a range B2:B3, or a filtered list like FILTER(B2:B9,B2:B9>=400).B2:B9. The part should be drawn from this set.Each example is a live sheet. Change the inputs or the formula and watch the result.
Example 1
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 =PERCENTOF(B2,$B$2:$B$5) returns 40%
Example 2
B7 =PERCENTOF(B2:B3,B2:B5)
Result: 65%
800 + 500 is 1,300 of 2,000, or 65%.
B7 =PERCENTOF(B2:B3,B2:B5) returns 65%
Example 3
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 =PERCENTOF(FILTER(B2:B5,B2:B5>=400),B2:B5) returns 85%
Example 4
B7 =SUM(B2:B3)/SUM(B2:B5)
Result: 65%
This works in every version of Excel and matches PERCENTOF(B2:B3, B2:B5).
B7 =SUM(B2:B3)/SUM(B2:B5) returns 65%
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.
#NAME?. Use SUM(subset)/SUM(all) if the file has to work everywhere.$B$2:$B$5. A relative range shifts and gives wrong shares.#DIV/0!. If the subset includes values outside the whole, the share can exceed 100%.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.
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.
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)`.
PERCENTOF returns a decimal. Apply the Percent Style number format to the cell, which multiplies the display by 100 and adds the % sign.
Yes, pass a filtered list as the first argument: `=PERCENTOF(FILTER(B2:B9, A2:A9="North"), B2:B9)`.
Tracks take you from the basics to modelling, one graded exercise at a time.