To find the percentage that one number represents of another in Excel, divide the part by the whole and format the result as a percentage: type =A1/B1 (with the part in A1 and the whole in B1) and press Enter, then click the % button on the Home tab. That single formula covers questions like "what percentage of the monthly target did this store hit?" The only thing that trips people up is knowing which number is the part and which is the whole, and whether a blank or zero is going to appear somewhere in the column.
What You'll Need
- Excel on desktop, Excel for the web, or a spreadsheet-compatible app that supports standard formulas.
- Two numbers per row: the part (see below for what that means) and the whole.
- A blank column next to the data where the percentage result can go.
Plan your columns before you start. A useful layout is column A for the part (the count you have), column B for the whole (the total to compare against), and column C for the percentage. Once the formula is in C1 it can be dragged down to cover every row, so the layout matters more than the individual formula.
Step-by-Step
- Identify the part and the whole. The part is the number you are measuring. The whole is the number it is being measured against. If a store sold 45 units out of a stock of 200, 45 is the part and 200 is the whole. Getting these the wrong way round is the most common cause of a result that looks absurd (larger than 100%, or far too small).
- Enter the two numbers in separate cells. For example, type 45 in A1 and 200 in B1. Keep raw numbers in their own cells rather than typing them into a formula, so you can change them later without editing the formula itself.
- Click the cell where the result should appear. For instance C1.
- Type the formula. Type =A1/B1 and press Enter. Excel returns 0.225. The forward slash means "divided by"; if you typed the numbers the wrong way round you would get 4.44 instead, which is a quick way to spot a mistake.
- Format the result as a percentage. With C1 still selected, go to the Home tab and click the % button (the Percent Style button in the Number group). The cell now shows 22.5% instead of 0.225. You can also press Ctrl+Shift+% on Windows or Cmd+Shift+% on Mac as a shortcut.
- Adjust the decimal places. The % button usually rounds to whole numbers, so 22.5% can display as 23%. Use the Increase Decimal button next to the % button to show one or two decimals. This affects display only; the underlying value stays exact.
- Copy the formula down the column. Click the fill handle at the bottom-right corner of C1 and drag it down as far as your data goes, or double-click the fill handle to fill automatically. Excel adjusts the references row by row, so row 2 uses A2 and B2, row 3 uses A3 and B3, and so on.
- Check a couple of results by hand. Divide a part by its whole on a calculator for two or three rows and compare. If every result is off by the same amount, look at whether you used fixed references or took the wrong column as the whole.
Common Mistakes
- Dividing the whole by the part. Typing =B1/A1 instead of =A1/B1 gives 444% instead of 22.5%. When a percentage-of figure comes out above 100% unexpectedly, swap the operands.
- Formatting the cells as text. If a cell is formatted as Text, Excel shows the formula as typed instead of calculating it. Select the column, then choose General or Number format and re-enter the formula.
- Forgetting that a percentage is just a formatted decimal. 22.5% and 0.225 are the same value. Pasting a number that already has a percent sign into a formula builds in a division by 100 you did not intend.
- Dividing by zero or by a blank. A blank denominator or a 0 produces the #DIV/0! error. Wrap the formula so it shows a blank instead: =IF(B1=0,"",A1/B1).
- Mixing up the percentage of a total and percentage change. "What percent of the total is this?" uses part divided by whole. "By what percent did it change?" uses (new minus old) divided by old. They are different formulas and should not be swapped.
- Rounding too early. Applying a custom number format that hides decimals is fine, but typing a rounded number back into a formula compounds the error across a long column.
Tips
- Put a clear header above the result column, such as "% of Total", so the column's meaning is obvious months later.
- If you want percentages to sum to exactly 100%, remember that rounding each row to whole percent can make the total 99% or 101%. Keep one more decimal place to avoid the mismatch.
- Use the Percentage number format (Home tab, the small arrow next to the Number group) when you want to set decimals and negative-number display in one place.
- When comparing one row against the same whole every time (such as a total in a single cell), lock that cell with dollar signs before copying: =A2/$B$1. That makes the reference absolute so it does not shift as you drag down.
- If the part is larger than the whole and the result is above 100%, that is not necessarily wrong; it just means the figure exceeds the comparison total.
- To reverse the calculation and find a number from a percentage, multiply the whole by the percentage: =B1*0.225 returns 45.
Troubleshooting
- You see #DIV/0! The denominator is zero or empty. Check for blank cells or stray spaces, and use the IF wrapper shown above to hide the error while the data is incomplete.
- You see the formula instead of a result. The cell is almost certainly formatted as Text, or there is no equals sign at the start. Fix the format to General and re-enter.
- You see #VALUE! One of the cells contains text that looks like a number, often imported from another system with a trailing space. Clean it with TRIM or retype the value.
- The percentage is wrong in every row. Check the fill direction. Dragging sideways instead of down moves the references across columns rather than down rows.
- The result updates unexpectedly after editing another cell. The formula references a cell you did not mean to include. Click the result and look at the colored borders showing which cells feed it.
- The result looks right but the small arrow in the cell is a warning. Excel is flagging inconsistent formatting in the column; you can copy the formatting down or ignore it.
Frequently Asked Questions
How do I show the result as "45 out of 200" style?
Use the percentage format for a numeric result, or build a text string with a formula such as =A1&" out of "&B1. Keep the numeric version in a separate cell if you plan to calculate with it, because text cannot be summed or averaged.
What is the difference between percentage of a total and percentage change?
Percentage of a total divides the part by the whole and answers "how much of the total is this?". Percentage change subtracts the old value from the new one and divides by the old value, answering "how much did this grow or shrink?". Use the first for shares, the second for trends over time.
Why is my answer above 100%?
Either the part really is larger than the whole, or the two cells are reversed. Check by dividing on a calculator; if the correct answer should be under 100%, swap the cell references.
Can I calculate the percentage of two numbers across whole columns?
Yes. Put the formula in the first row and drag the fill handle down, or use =SUM(A2:A10)/SUM(B2:B10) to compare the column totals rather than each row.
How do I stop blank rows showing an error?
Wrap the division in an IF that checks for a blank or zero denominator and returns an empty string instead, so the cell stays clean until data is entered.
Does the percentage button change the actual number?
No. It changes the display, multiplying the stored decimal by 100 for viewing. The underlying value, 0.225 in the example, is what other formulas use.