ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • About
  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Dynamic arrays
  3. PERCENTOF Function in Excel: Share of Total in One Step

PERCENTOF Function in Excel: Share of Total in One Step

By ExcelReady Team·Updated November 3, 2026·6 min read

The short answer

PERCENTOF returns the share a subset of values makes up of a larger set: =PERCENTOF(data_subset, data_all). It adds up each argument and divides the first total by the second, so =PERCENTOF(C2,C2:C7) is the same as =C2/SUM(C2:C7). It is a recent Microsoft 365 function. In older Excel, use SUM or SUMIF divided by SUM.

Key takeaways

  • Syntax: =PERCENTOF(data_subset, data_all). The result is a decimal, so format it as a percentage.
  • PERCENTOF(x, y) gives the same answer as SUM(x)/SUM(y).
  • Its best use is inside GROUPBY or PIVOTBY: =GROUPBY(A2:A7,C2:C7,PERCENTOF) shows each group's share.
  • PERCENTOF is a recent Microsoft 365 function. Older versions show #NAME?, so share files carefully.
On this page+
  1. What does the PERCENTOF function do?
  2. PERCENTOF examples on one table
  3. Use PERCENTOF inside GROUPBY and PIVOTBY
  4. Percentage of total in any Excel version
  5. PERCENTOF vs a pivot table
  6. Common PERCENTOF mistakes
  7. Practise it

The PERCENTOF function in Excel returns the share one set of numbers makes up of a larger set, such as one region's share of total sales. You write =PERCENTOF(data_subset, data_all) and Excel does the SUM and the division in one step. This guide covers the syntax, the version you need, where PERCENTOF really helps (inside GROUPBY and PIVOTBY), and the classic formula that gives the same result in any Excel.

What does the PERCENTOF function do?#

PERCENTOF adds up the first argument, adds up the second, and divides the first total by the second.

Excel formula
=PERCENTOF(data_subset, data_all)
ArgumentMeaningExample
data_subsetThe values whose share you wantC2, or the North sales
data_allAll the values that make up the totalC2:C7

The result is a decimal: 0.24 means 24%. Format the cell as a percentage with Ctrl+Shift+% on Windows or ⌃⇧% on a Mac.

In other words, =PERCENTOF(x, y) is the same as =SUM(x)/SUM(y). There is no new maths here. The value of PERCENTOF is that it's shorter and that it can be passed to other functions as a calculation, which you'll see below.

Version note: PERCENTOF is a recent Microsoft 365 function, introduced alongside GROUPBY and PIVOTBY. At the time of writing, Microsoft lists it for Microsoft 365, including Excel for the web, and not for Excel 2021 or earlier. If you type it and see #NAME?, your version doesn't have it yet. Anyone who opens your file in an older version will see #NAME? too.

PERCENTOF examples on one table#

All the examples use this sales table in A1:C7:

ABC
1RegionRepSales
2NorthKofi12,000
3SouthMei8,000
4NorthRavi6,000
5EastKofi9,000
6SouthRavi5,000
7WestMei10,000

Total sales are 50,000.

One row's share#

Excel formula
=PERCENTOF(C2,$C$2:$C$7)

Kofi's North sale is 12,000 ÷ 50,000 = 24%. Lock the total range with $ (press F4 on Windows or ⌘T on a Mac) so you can fill the formula down column D.

One category's share with FILTER#

To get North's share, pass only the North sales as the subset. FILTER picks them out:

Excel formula
=PERCENTOF(FILTER(C2:C7,A2:A7="North"),C2:C7)

The subset is 12,000 + 6,000 = 18,000, so the result is 36%. FILTER needs Microsoft 365 or Excel 2021, which you'll have if PERCENTOF works.

Use PERCENTOF inside GROUPBY and PIVOTBY#

PERCENTOF is most useful as the calculation in GROUPBY or PIVOTBY. These functions build a summary table from a formula, and their third argument is the function to apply to each group. Pass PERCENTOF there, without brackets:

Excel formula
=GROUPBY(A2:A7,C2:C7,PERCENTOF)

The formula spills a sorted list of regions with each one's share of the total:

RegionShare
East18%
North36%
South26%
West20%
Total100%

The headings are added here for clarity; with ranges that don't include headers, GROUPBY returns just the regions and the shares. Each group's sales are the subset, and all the sales are the total. Before PERCENTOF, you needed a helper column or a pivot table to get this view. The guide to the GROUPBY function explains the other arguments, such as sorting and totals. Both GROUPBY and PERCENTOF spill their results, so read how dynamic arrays work if the spill behaviour is new to you.

Percentage of total in any Excel version#

If your Excel doesn't have PERCENTOF, or your file must work for everyone, divide by SUM. This is what PERCENTOF does behind the scenes.

TaskPERCENTOFWorks in every version
One row's share=PERCENTOF(C2,$C$2:$C$7)=C2/SUM($C$2:$C$7)
North's share=PERCENTOF(FILTER(C2:C7,A2:A7="North"),C2:C7)=SUMIF(A2:A7,"North",C2:C7)/SUM(C2:C7)
Each region's share=GROUPBY(A2:A7,C2:C7,PERCENTOF)SUMIF per region, or a pivot table

For North, SUMIF adds 12,000 + 6,000 = 18,000 and SUM gives 50,000, so the result is again 36%. The SUM function guide covers the basics, and the article on percentage of total in Excel shows the classic method step by step, including how to check your shares add up to 100%.

PERCENTOF vs a pivot table#

A pivot table can show the same shares with no formula at all. Add Sales to Values, right-click it, and choose Show Values As > % of Grand Total. The guide to percent of total in a pivot table walks through it, and the article on pivot table Show Values As covers the other options, such as % of Parent Row Total.

Choose by how the result will be used:

  • Pivot table when someone else will filter and explore the data, or when the file must work in older Excel.
  • PERCENTOF with GROUPBY when you want a summary that updates the moment the data changes, with no Refresh button, and everyone has Microsoft 365.
  • SUM division when you need one share in one cell and maximum compatibility.

Common PERCENTOF mistakes#

These slips give a wrong share or an error:

  1. Getting the order backwards. The subset comes first and the total second. =PERCENTOF(C2:C7,C2) returns 417% instead of 24%.
  2. Multiplying by 100. PERCENTOF returns a decimal. Format the cell as % instead of multiplying, or you'll see 2400%.
  3. A subset that isn't part of the total. If the subset range includes rows outside data_all, the share can go over 100%.
  4. Sharing the file with older Excel. Recipients without PERCENTOF see #NAME?. Use the SUM version if you're not sure.
  5. Repeating the same total many times. If one formula uses the total several times, the LET function can name it once and make the formula easier to read.

Practise it#

PERCENTOF is one of several newer functions that replace helper columns. Practise modern Excel functions in a live spreadsheet: you type FILTER, SORT and UNIQUE formulas and the page checks them instantly. Then try the percent change lesson to get comfortable with percentage formats and formulas, and do the exercise on this page with the version that works everywhere.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

This sheet uses formulas that work in every Excel version. In F2, calculate North's share of total sales: SUMIF of North sales divided by the SUM of all sales (C2:C7).

fx
ABCDEFG
1
Region
Rep
Sales
2
North
Kofi
12000
North share
3
South
Mei
8000
4
North
Ravi
6000
5
East
Kofi
9000
6
South
Ravi
5000
7
West
Mei
10000
8
9
10

Tip: SUMIF(A2:A7,"North",C2:C7) adds the North sales. Divide it by SUM(C2:C7). This is exactly what PERCENTOF does for you.

Practise this in a lesson

LessonModern Excel: XMATCH, SORTBY, TEXTSPLIT and spill references (A2#)Split names with TEXTSPLIT, find positions with XMATCH, sort by another column with SORTBY, and refer to a whole spilled result with A2#.LessonPercentages and % changeCalculate percent change with (new - old) / old, format it as a percentage, and grow a number by a percent.Function guideSUMAdd up columns, rows and separate ranges with Excel's SUM function. Clear examples, common mistakes and a live practice exercise.

Frequently asked questions

What does the PERCENTOF function do in Excel?

+

It returns the percentage that one set of values makes up of another. =PERCENTOF(C2,C2:C7) divides C2 by the total of C2:C7. The result is a decimal such as 0.24, which you format as 24%.

Which Excel versions have PERCENTOF?

+

PERCENTOF is a recent addition to Microsoft 365, introduced alongside GROUPBY and PIVOTBY. Excel 2021 and earlier don't have it. If you type it and get #NAME?, your version doesn't support it yet.

What is the difference between PERCENTOF and dividing by SUM?

+

There is no difference in the result: PERCENTOF(x, y) equals SUM(x)/SUM(y). PERCENTOF is shorter to read and can be passed as a function to GROUPBY and PIVOTBY, which a division cannot.

How do I calculate percentage of total without PERCENTOF?

+

Divide the value by the total and lock the total with $ signs: =C2/SUM($C$2:$C$7). For a category's share, use =SUMIF(A2:A7,"North",C2:C7)/SUM(C2:C7). Format the result as a percentage.

Sources

  • SUM function - Microsoft Support
  • Calculate percentages - Microsoft Support
  • FILTER function - Microsoft Support

Written and checked by the ExcelReady Team. First published November 3, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. What does the PERCENTOF function do?
  2. PERCENTOF examples on one table
  3. Use PERCENTOF inside GROUPBY and PIVOTBY
  4. Percentage of total in any Excel version
  5. PERCENTOF vs a pivot table
  6. Common PERCENTOF mistakes
  7. Practise it

Keep reading

Math· 6 min read

How to Calculate Percentage of Total in Excel

To calculate the percentage of total in Excel, divide each value by the total and lock the total with dollar signs: =B2/$B$6, or =B2/SUM($B$2:$B$5) without a total row. Fill the formula down and press Ctrl+Shift+% (Control+Shift+% on a Mac) to show percentages. The results should add up to 100%.

Data tools· 6 min read

Pivot Table "Show Values As" Explained

Show Values As is a pivot table setting that changes how each number is displayed without changing the source data. Right-click a value, choose Show Values As, and pick an option such as % of Grand Total, % Difference From, Running Total In or Rank Largest to Smallest. Choose No Calculation to go back to plain sums.

Dynamic arrays· 6 min read

Dynamic Arrays in Excel Explained Simply

Dynamic arrays let one Excel formula return several values that spill into the cells below or beside it. Type =UNIQUE(B2:B9) in one cell and the whole list appears, then resizes when the data changes. They need Excel 2021, Excel 2024, Microsoft 365 or Excel for the web. Refer to a whole spill with a # after its first cell, such as E2#.

More on dynamic arrays

  • How to Randomize a List in Excel With SORTBY
  • How to Reverse the Order of a List in Excel
  • The SEQUENCE Function in Excel
  • Make a List of Dates With SEQUENCE in Excel
  • How to Sort Alphanumeric Codes Like A2 and A10 in Excel
  • Sort and Filter Together With One Formula
All dynamic arrays articles →

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free