Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

How to Calculate Percentage Between Two Numbers in Excel

· 5 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To calculate what percentage one number is of another in Excel, divide the first number by the second and format the result as a percentage. For example, to find what percent 25 is of 100, enter =25/100 and apply the Percentage format—this yields 25%. No add-ins or special tools are required; basic Excel functions and formatting suffice.

What You'll Need

  • Microsoft Excel (any recent version: Excel 2010, 2013, 2016, 2019, 2021, Microsoft 365, or Excel for the web)
  • Two numeric values you want to compare (e.g., sales figures, quantities, scores)
  • Basic familiarity with entering formulas in Excel cells

Step-by-Step

  1. Open your Excel workbook and ensure the two numbers you want to compare are entered into separate cells. For instance, place the part (the numerator) in cell A2 and the whole (the denominator) in cell B2.
  2. Select a blank cell where you want the percentage result to appear—e.g., cell C2.
  3. Enter the division formula by typing =A2/B2 and pressing Enter. This tells Excel to divide the value in A2 by the value in B2.
  4. Format the result as a percentage. With cell C2 still selected, go to the Home tab on the ribbon. In the Number group, click the % (Percentage) button. Alternatively, press Ctrl + Shift + % (on Windows) or Cmd + Shift + % (on Mac). Excel will automatically multiply the decimal result by 100 and add a percent sign.
  5. Verify your formula. If A2 contains 50 and B2 contains 200, the formula =A2/B2 returns 0.25, which becomes 25% after applying the Percentage format.
  6. Drag the formula down (if analyzing multiple rows). Click the small square at the bottom-right corner of cell C2 (the fill handle) and drag it down to copy the formula to other rows. Excel will automatically adjust cell references (e.g., =A3/B3, =A4/B4), assuming your data is in a consistent layout.

Common Mistakes

  • Dividing by zero: If the denominator (e.g., B2) is 0, Excel returns a #DIV/0! error. Always ensure the whole value is non-zero before calculating.
  • Swapping numerator and denominator: Entering =B2/A2 instead of =A2/B2 gives the inverse percentage (e.g., 400% instead of 25%). Double-check which number represents the part and which represents the whole.
  • Forgetting to apply the Percentage format: Without formatting, Excel displays the raw decimal (e.g., 0.25). Users may misinterpret it as 0.25% instead of 25%. Always apply the Percentage format after the division.
  • Including text or non-numeric data: If A2 or B2 contains text (e.g., "Sales"), Excel returns a #VALUE! error. Ensure only numeric values are used in the calculation cells.
  • Missing equals sign: Typing A2/B2 without the leading = treats it as plain text, not a formula. Always start formulas with =.

Tips

  • Use absolute references for constant denominators: If you're comparing many values against the same whole (e.g., B2), freeze the denominator with =A2/$B$2. This prevents the reference from changing when dragging the formula down.
  • Round for clarity: For cleaner output, wrap the formula in ROUND, like =ROUND(A2/B2, 2), to show two decimal places before applying Percentage formatting.
  • Handle negative numbers carefully: Percentages involving negatives (e.g., profit/loss) can mislead. A negative part over a positive whole yields a negative percentage (e.g., =-10/100 = -10%). Consider context to avoid misinterpretation.
  • Use cell references instead of hardcoding: Typing =50/200 directly is less flexible than =A2/B2. Using references lets you update values later without rewriting formulas.
  • Check for hidden spaces or formatting issues: Numbers stored as text (e.g., "100" with a green triangle alert) cause errors. Convert them using Data > Text to Columns or the VALUE() function.

Troubleshooting

If your percentage calculation fails, follow these checks in order:

  • Confirm cell contents are numbers: Select the cells used in the formula, right-click, choose Format Cells, and under the Number tab, ensure Number or General is selected—not Text. If numbers are left-aligned, they may be stored as text.
  • Inspect for hidden errors: Look for #DIV/0!, #VALUE!, or #NAME? in your formula cell. Hover over the cell to see error explanations, or use Formulas > Error Checking on the ribbon.
  • Re-enter the formula manually: Sometimes, invisible characters corrupt formulas. Delete the formula, retype = followed by the cell references, and press Enter.
  • Check for circular references: If Excel warns about circular references (e.g., a formula in C2 referencing C2), fix it by moving the formula to a different cell or enabling iterative calculation only if necessary (File > Options > Formulas > check Enable iterative calculation).
  • Verify Excel version compatibility: In Excel for the web, some advanced formatting options are limited. Apply the Percentage format before dragging formulas, or use the keyboard shortcut (Ctrl + Shift + %).

Frequently Asked Questions

How do I calculate percentage change between two numbers in Excel?

Use the formula =(new_value - old_value) / old_value, then format as percentage. For example, if old value is in A2 (100) and new value is in B2 (120), enter =(B2-A2)/A2 in C2 to get 20%.

Why does my percentage show as a decimal instead of a percent?

Excel displays decimals by default unless you apply the Percentage format. Select the cell(s), go to the Home tab, and click the % button. Alternatively, right-click the cell, choose Format Cells, select Percentage, and set decimal places.

Can I calculate a percentage of a total across multiple rows?

Yes. First, sum the total range (e.g., =SUM(B2:B10) in B11), then use a formula like =A2/$B$11 in C2, copy down, and format as percentage. This gives each row’s share of the total.

How do I prevent #DIV/0! errors when the denominator is blank or zero?

Wrap your formula in an IFERROR or IF statement. For example, =IF(B2=0, 0, A2/B2) returns 0% if B2 is zero, or =IFERROR(A2/B2, "N/A") displays "N/A" instead of an error.

Is there a keyboard shortcut to apply the Percentage format?

Yes. On Windows, press Ctrl + Shift + % after selecting the cell(s). On Mac, use Cmd + Shift + %. This instantly converts decimals to percentages (e.g., 0.5 becomes 50%).

Can I calculate percentages in Excel for Mac or the web version?

Yes. The core method—division followed by Percentage formatting—works identically in Excel for Mac and Excel for the web. Formatting options may appear slightly differently (e.g., under Home > Number), but the steps and formulas remain the same.