Percentage of Total in Excel: Formula, Pivot Table and PERCENTOF
The percentage formula in Excel for a share of total, with a locked total, PERCENTOF, shares within a group, pivot table options and the 99% rounding gap.
- Excel
- Formulas
- Reporting Workflows

On this page
- What is the percentage formula in Excel?
- How do you calculate the percentage of total for each row?
- Is there a function for percentage of total?
- How do you get the share within a group?
- How do you show percentage of total in a pivot table?
- Why don't my percentages add up to 100%?
- How do you do it in Google Sheets?
- Where does Glow Reports fit?
- Common questions
Your sales export lists revenue by product, and the report needs each product's share of the total. In Excel, the percentage formula is the part divided by the total, with a dollar sign on the total so it stays put when you copy the formula down: . Format the cell as a percentage and you are done. Exceljet shows the same method with a named range for the total Exceljet. This guide covers that formula, the share within a group, the pivot table options such as % of Grand Total, the PERCENTOF function, and why the shares sometimes add up to 99%.
What is the percentage formula in Excel?
Divide the part by the total and format the result as a percentage. With a product's revenue in B2 and the total in B7, the formula is , and the cell shows 0.5383 until you apply the percent format, which turns it into 53.83%.
Here is the sample used in this guide, revenue by product from a sales export. Type it in A1:B7.
| Product | Revenue |
|---|---|
| Laptops | 48,450 |
| Monitors | 21,730 |
| Keyboards | 9,415 |
| Mice | 6,690 |
| Cables | 3,715 |
| Total | 90,000 |
B7 holds . Don't multiply by 100 in the formula. returns 53.83, and the percent format then shows 5383%. Excel stores 53.83% as 0.5383, so leave the division alone and let the format do the rest. The format sits in HomeNumberPercent Style, or press Ctrl+Shift+%.
How do you calculate the percentage of total for each row?
Write the formula once with an absolute reference on the total, then copy it down. In C2, type and fill it to C6. The dollar signs lock the total, so every row divides by B7 while the part moves with the row.
=B2/$B$7Without the dollar signs, the formula in C3 becomes . B8 is empty, so Excel returns #DIV/0!. This is the most common reason a percentage column works on the first row and breaks on the next ones. Press F4 after clicking B7 in the formula bar to add the dollar signs Microsoft Support.
On the sample, the column reads:
| Product | Share of total |
|---|---|
| Laptops | 53.83% |
| Monitors | 24.14% |
| Keyboards | 10.46% |
| Mice | 7.43% |
| Cables | 4.13% |
When the data sits in an Excel table named Sales, does the same job and keeps working as rows are added. A total cell below the data has to be moved each time the export grows.
Is there a function for percentage of total?
Yes, in Excel for Microsoft 365: PERCENTOF. returns 53.83% for laptops. Microsoft describes it as equivalent to and lists it for Microsoft 365 only Microsoft Support.
It saves the total cell, since the whole range goes in the second argument. To copy it down, lock that range the same way: . Its first argument can be several cells too. gives the share of laptops and monitors together, 77.98%. In older versions of Excel, the formula returns #NAME?, so share files with the division if the readers don't all use Microsoft 365.
How do you get the share within a group?
Divide each row by the total of its own group, computed with SUMIFS. When a sales export has a region and a product, the share of North laptops within North is the row's revenue divided by all North revenue.
| Region | Product | Revenue |
|---|---|---|
| North | Laptops | 30,100 |
| North | Monitors | 12,400 |
| North | Cables | 2,500 |
| South | Laptops | 18,150 |
| South | Monitors | 9,330 |
| South | Cables | 1,215 |
With this table in A1:C7, type in D2 and copy down:
=C2/SUMIFS($C$2:$C$7,$A$2:$A$7,A2)North sells 45,000 in total, so laptops make up 66.89% of the region. The same row is only 40.84% of the grand total of 73,695. Both are right, and the report has to say which base it uses. The SUMIFS guide explains the criteria if you need a second condition, such as a month.
How do you show percentage of total in a pivot table?
Right-click a value in the pivot table and pick Show Values As% of Grand Total. Excel then shows each value as a share of the total of the whole report. To keep the amounts next to the shares, drag the value field into Values a second time and change only the copy Microsoft Support.
The menu offers several bases, and picking the wrong one is the usual source of odd results:
| Divides each value by | North laptops | |
|---|---|---|
| % of Grand Total | The total of every value in the report | 40.84% |
| % of Column Total | The total of its column | 40.84% |
| % of Parent Row Total | The total of its parent item in the rows | 66.89% |
The figures above assume Region then Product in Rows and a single value column, which is why the first two match. With months across the columns, % of Column Total gives each product's share of that month. % of Parent Row Total gives each product's share of its region, the pivot table version of the SUMIFS formula.
Two things break these percentages. A value field set to Count instead of Sum gives shares of the number of rows, not of revenue. And a pivot table built on old data shows old shares until you refresh it, which the refresh guide covers. The pivot table by month guide shows how to add months to the columns.
Why don't my percentages add up to 100%?
Because each share is rounded on its own. The five exact shares in the sample add up to 100%, but rounded to whole numbers they read 54%, 24%, 10%, 7% and 4%, which add up to 99%. Shown with two decimals, they add up to 99.99%.
99% is the sum of the five shares once each one is rounded to a whole percent.
Nothing is wrong with the data. You have three honest options:
- Show one more decimal. The gap shrinks, though it doesn't always disappear.
- Keep the total row at 100% by computing it from the exact values, , and add a note that the rows are rounded.
- Avoid wrapping each share in and summing those. That turns a display gap into a real one in the total Microsoft Support.
Forcing the largest share up by one point to reach 100% is common in charts, but it changes a figure, so say so in a note if you do it.
How do you do it in Google Sheets?
The formula is the same: , copied down, with the percent format from FormatNumberPercent. The SUMIFS version for a share within a group works unchanged.
In a Google Sheets pivot table, open the editor below the table, find the value under Values and change "Show as" from Default to a percentage option Google Docs Editors Help. The same choice of base applies: a share of the row, of the column or of the grand total.
For a share that changes over time instead, such as this month against last month, see the percentage change guide.
Where does Glow Reports fit?
The formula takes a minute. The report around it takes longer: totals by product or region from a raw export, the right base for each share, a total row that adds up, and a chart. All of it gets redone when next month's export arrives.
With Glow Reports, you upload the CSV or Excel export and ask in plain language, such as revenue by product with each product's share of the total, then the share of each product within its region. The AI writes the SQL, builds the charts and drafts the text. The SQL sits under each figure, so you can see which total each share divides by and edit the query if you want another base. Reports export to PDF and stay in the workspace. The free plan gives 300 credits once, and a report costs 100 credits.
Common questions
How do I calculate a percentage of a total in Excel?
Divide the part by the total with a dollar sign on the total, , copy the formula down and apply the percent format. In Microsoft 365, gives the same result without a total cell.
Why does my percentage formula return #DIV/0!?
The formula divides by an empty or zero cell. When it works on the first row only, the total reference moved as you copied it down. Add dollar signs to the total, , and copy it again.
What is the difference between % of Grand Total and % of Parent Row Total?
% of Grand Total divides each value by the total of the whole pivot table. % of Parent Row Total divides it by the total of the group above it in the rows, such as its region, so the shares add up to 100% within each group.
Should I multiply by 100 in the percentage formula?
No. Excel stores a percentage as a decimal and the percent format multiplies it by 100 for display. Multiplying in the formula as well shows 5383% instead of 53.83%.
I am a product engineer and the founder of Glow Reports. I spent more than 6 years building products in tech, data and cybersecurity, for large groups, startups and SMEs. In most organizations I saw data treated as a technical topic, when it drives business decisions. I built the reporting tool I was looking for, so the people who run small and mid-sized organizations can read their own numbers without a data team.
More from El Mehdi BenaneUpload your sales export to Glow Reports and ask for revenue by product with each share of the total, with the SQL behind each figure.


