PERCENTOF returns the share of a total that a subset represents, expressed as a percentage. It divides the subset value by the total value and formats the result as a percentage, making it easy to compare parts to the whole.
=PERCENTOF(data_subset, data_all)What does PERCENTOF do?
The PERCENTOF function calculates how much a subset contributes to a total. You give it two numbers: the part you care about and the whole it belongs to. It returns the part as a percentage of the whole, so you can quickly see proportions without writing a division formula and formatting the result yourself.
This matters because percentages are the language of comparison. Whether you are tracking sales by region, budget spent by department, or marks scored in a subject, expressing a value as a share of the total makes the meaning immediately clear. PERCENTOF keeps that calculation consistent and readable, especially when you share workbooks with others.
Imagine you manage a small team and need to report each person's share of monthly sales. Instead of manually dividing each person's sales by the team total and applying percentage formatting, you can use PERCENTOF in one cell and copy it down. The formula stays short, the intent is obvious, and the result updates automatically when the numbers change.
When to use PERCENTOF
- Calculating each product's share of total revenue.
- Showing what percentage of a budget each department has spent.
- Reporting each student's contribution to a group project total.
- Measuring the proportion of survey responses in each category.
- Tracking the percentage of website traffic from each source.
- Determining how much of a monthly target each salesperson achieved.
PERCENTOF syntax
=PERCENTOF(data_subset, data_all)| Argument | Required? | What to enter |
|---|---|---|
data_subset | Required | The part or portion you want to express as a percentage of the whole. It can be a number, a cell reference, or a range that evaluates to a single value. Example: B2 where B2 contains 250. |
data_all | Required | The total or whole amount that the subset is compared against. It must be a number, a cell reference, or a range that evaluates to a single value. Example: B10 where B10 contains 1000. |
What it returns: A decimal number formatted as a percentage, representing the subset as a share of the total. For example, if the subset is 250 and the total is 1000, PERCENTOF returns 25%.
PERCENTOF examples
1 Basic share of total sales
This example shows the simplest use: one region's sales as a percentage of total sales. The formula =PERCENTOF(B2, B6) divides the North region sales (1200) by the total sales (4000) and returns 0.3, which Excel displays as 30%. It answers the question: what portion of all sales came from the North region?
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Region | Sales | |||
| 2 | North | 1200 | 0.3 | ||
| 3 | South | 800 | |||
| 4 | East | 1000 | |||
| 5 | West | 1000 | |||
| 6 | Total | 4000 | |||
| 7 |
2 Department budget spent as a percentage
Here we calculate how much of the total budget a single department has spent. The formula =PERCENTOF(C2, C6) takes the Marketing spend (15000) and divides it by the total budget (50000), returning 0.3 or 30%. This helps managers see at a glance which departments are using the largest share of resources.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Department | Budget | Spent | |||
| 2 | Marketing | 20000 | 15000 | 0.3947368421 | ||
| 3 | Sales | 15000 | 12000 | |||
| 4 | IT | 10000 | 8000 | |||
| 5 | HR | 5000 | 3000 | |||
| 6 | Total | 50000 | 38000 | |||
| 7 |
3 Student marks as a share of total possible
This example calculates a student's score as a percentage of the maximum possible marks. The formula =PERCENTOF(B2, B6) divides the student's marks (85) by the total possible marks (100), returning 0.85 or 85%. It is a quick way to convert raw scores into a percentage grade without manually dividing and formatting.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Student | Marks | |||
| 2 | Alice | 85 | 0.85 | ||
| 3 | Bob | 72 | |||
| 4 | Carol | 90 | |||
| 5 | David | 65 | |||
| 6 | Total Possible | 100 | |||
| 7 |
4 Product category share of revenue
This example shows each product category's revenue as a percentage of total revenue. The formula =PERCENTOF(C2, C6) divides the Electronics revenue (5000) by the total revenue (12000), returning approximately 0.4167 or 41.67%. This is useful for identifying which categories drive the business.
| A | B | C | D | E | F | |
|---|---|---|---|---|---|---|
| 1 | Category | Units | Revenue | |||
| 2 | Electronics | 100 | 5000 | 0.4166666667 | ||
| 3 | Clothing | 200 | 3000 | |||
| 4 | Home | 150 | 2500 | |||
| 5 | Toys | 80 | 1500 | |||
| 6 | Total | 530 | 12000 | |||
| 7 |
5 Website traffic source share
Here we calculate what percentage of total website visits came from each source. The formula =PERCENTOF(B2, B6) divides the Organic search visits (4500) by the total visits (10000), returning 0.45 or 45%. This helps marketers understand which channels are most effective.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Source | Visits | |||
| 2 | Organic | 4500 | 0.45 | ||
| 3 | Paid | 3000 | |||
| 4 | Social | 1500 | |||
| 5 | Referral | 1000 | |||
| 6 | Total | 10000 | |||
| 7 |
Common PERCENTOF errors and how to fix them
| Error | Why it happens | How to fix it |
|---|---|---|
| #VALUE! | One or both arguments are text, empty, or non-numeric. | Ensure both data_subset and data_all refer to cells containing numbers. Remove any text or spaces from those cells. |
| #DIV/0! | The data_all argument is zero or refers to an empty cell. | Check that the total is not zero. If it can be zero, wrap the formula in IFERROR or IF to handle that case. |
| #NAME? | The function name is misspelled or not available in your Excel version. | Verify the spelling: PERCENTOF. If you see this error, your Excel version may not support the function; check for updates or use =B2/B6 instead. |
| #NUM! | The arguments produce an invalid numeric result, such as when the subset is negative and the total is positive, leading to a negative percentage that may be unexpected. | Review the data for negative values. If negative percentages are valid, the function will return them; otherwise, correct the data. |
Tips for using PERCENTOF
- Format the result cell as a percentage to display the decimal as a percentage (e.g., 0.3 becomes 30%).
- Use absolute references for the total (e.g.,
$B$6) when copying the formula down so the total stays fixed. - Combine with
SUMto calculate the total dynamically:=PERCENTOF(B2, SUM(B2:B5)). - If the total can be zero, wrap the formula in
IFERRORto avoid#DIV/0!errors. - Use
PERCENTOFinstead of manual division to make your formulas self-documenting and easier to audit.
Frequently asked questions
What is the difference between PERCENTOF and dividing two numbers?
PERCENTOF returns a decimal that you can format as a percentage, and it makes the intent clear. Dividing two numbers gives the same decimal but requires you to apply percentage formatting manually and may be less readable.
Can PERCENTOF handle ranges instead of single cells?
No, PERCENTOF expects single values for both arguments. If you pass a range, it will use implicit intersection or return an error. Use SUM to aggregate a range first, e.g., =PERCENTOF(SUM(B2:B5), B6).
Why does PERCENTOF return a decimal instead of a percentage?
Excel stores percentages as decimals. PERCENTOF returns the decimal value (e.g., 0.25 for 25%). To display it as a percentage, format the cell as Percentage.
Is PERCENTOF available in all Excel versions?
PERCENTOF is a newer function available in Excel for Microsoft 365 and Excel 2021 and later. If you use an older version, you can achieve the same result with =B2/B6 and percentage formatting.
Related functions
Every example on this page was recalculated by SheetSkill’s spreadsheet engine. PERCENTOF reference