Function · Math
Excel PERCENTOF function
The Excel PERCENTOF function returns what share a subset is of the whole. Texas is 42% of $10,000 in March 2026 sales.
Syntax =PERCENTOF(data_subset, data_all)
=PERCENTOF(B4,B2:B4)Arguments
| Name | Required | What to pass |
|---|---|---|
| data_subset | Required | The values in the part you are measuring. PERCENTOF sums them. Text inside a range is ignored, the same way SUM ignores text. A text constant, such as "4200", is #VALUE!. |
| data_all | Required | The values in the whole set. PERCENTOF sums them and divides the subset by that total. The subset does not have to sit inside this range. A total of zero is #DIV/0!. |
Examples
Texas as a share of the March 2026 state totals
=PERCENTOF(B4,B2:B4)Result 0.42, which is 42% when the cell is formatted as a percent
Each state's share of the nine March orders
=GROUPBY(B2:B10,D2:D10,PERCENTOF,0,0)Result California 38%, Ohio 20%, and Texas 42%
Each state and channel as a share of the $10,000
=PIVOTBY(B2:B10,C2:C10,D2:D10,PERCENTOF,0,1,,1,,,2)Result California retail 28% and web 10%. Ohio 15% and 5%. Texas 32% and 10%. The total row is 75% and 25%.
The same Texas share in Excel 2024 and earlier
=SUMIFS(D2:D10,B2:B10,"Texas")/SUM(D2:D10)Result 0.42
| A | B | C | |
|---|---|---|---|
| 1 | State | Amount | Share |
| 2 | California | 3800 | |
| 3 | Ohio | 2000 | |
| 4 | Texas | 4200 | |
| 5 | Texas share | 0.42 |
PERCENTOF divides the sum of a subset by the sum of the whole set. Microsoft documents it as SUM(data_subset)/SUM(data_all). The March 2026 state totals are California $3,800, Ohio $2,000, and Texas $4,200. Texas divided by $10,000 is 0.42, which a Percent format shows as 42%. The nine orders behind those totals are on the GROUPBY page. Passing the name PERCENTOF, with no parentheses, returns California 38%, Ohio 20%, and Texas 42%. PIVOTBY adds a second field and a relative_to argument. relative_to 2 divides by the $10,000 grand total, so California retail is 28%. relative_to 0 divides by the column total. relative_to 1 divides by the row total, so Ohio retail is 75% of Ohio’s $2,000.
Excel 2024, Excel 2021, and Excel 2019 return #NAME?. The same share is SUM of the subset divided by SUM of the whole set. On the nine-order sheet, Texas is SUMIFS of the Texas rows divided by SUM of every amount, and that quotient is also 0.42. The percent change LAMBDA measures growth from an old number to a new one. The Annual Budget Planner puts housing at $1,900 of a $6,400 monthly plan, which is 0.296875. The Sales Commission Calculator puts Ada’s $25,000 at 52.08% of the $48,000 team total when the cell is a percent with two decimals. The Sales Pipeline Tracker shows Cedar Bakery’s $1,500 won deal as 45.45% of the $3,300 closed on that sheet. All three open in Excel 2010.