Smart Systems for Home

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

Percent Diff in Excel: Formula and How to Use It

· 7 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

The percent difference in Excel is calculated with the formula =(B2-A2)/ABS(A2), where A2 is the starting or reference value and B2 is the new or compared value. That gives a decimal like 0.25, and formatting the cell as a percentage turns it into 25%. If you only need the size of the gap with no sign, wrap the whole thing in ABS: =ABS(B2-A2)/ABS(A2). Excel has no built-in PERCENTDIFF function, so this arithmetic is the whole trick.

A word on which formula you want, because people use two similar names for different jobs. Percent change (also called percent increase or decrease) compares a new value against an older one and answers "how much did this grow or fall?" Percent difference usually compares two values where neither is clearly the reference, and the classic version divides by the average of the two: =ABS(A2-B2)/((A2+B2)/2). Both are shown below; pick by whether one value is genuinely the "before" figure.

What You'll Need

  • Excel on desktop (Microsoft 365, Excel 2019 or later) or Excel for the web. Mobile Excel can do this too, but typing long formulas on a phone is awkward.
  • Two values per row, ideally placed in side-by-side columns such as A and B, with a header row.
  • Numbers stored as actual numbers, not text. Left-aligned figures in a cell are usually text and will break the formula.
  • No blank or zero values in the reference column, because division by zero returns #DIV/0!.

Step-by-Step

  1. Lay out your data. Put the older or reference value in column A and the newer or compared value in column B, starting on row 2 so row 1 can hold labels like "Last month" and "This month". Keeping the layout consistent down the sheet means one formula can be filled everywhere.
  2. Click the first empty cell in column C, for example C2. This is where the result for that row will sit.
  3. Type the percent change formula: =(B2-A2)/A2. Press Enter. If A2 is 200 and B2 is 250, you get 0.25.
  4. Format the result as a percentage. Select cell C2 and press Ctrl+Shift+% on Windows or Cmd+Shift+% on Mac. Alternatively use Home > Number Format dropdown and choose Percentage. The cell now reads 25%. Use the Increase Decimal button next to that dropdown if you want 25.0% instead of 25%.
  5. Guard against division by zero. If some rows may have a zero or blank in column A, use =IFERROR((B2-A2)/A2,"") so those rows show nothing instead of an error. Do not replace the blank result with 0%, which would look like a real answer.
  6. Copy the formula down. Drag the small square at the bottom-right corner of C2 down the column, or double-click it to fill to the end of the adjacent data. Relative references adjust automatically, so row 7 uses A7 and B7.
  7. Skip the sign when you only want the gap. For magnitude only, use =ABS(B2-A2)/ABS(A2). This is the version to use when direction does not matter, for example comparing how far apart two readings are.
  8. Switch to the average-based percent difference if neither value is the baseline. In a fresh column type =ABS(A2-B2)/((A2+B2)/2) and format it as a percentage. With 200 and 250 this returns about 22.2%, not 25%, because it divides by the midpoint of 225 rather than by 200.
  9. Describe the direction in words if you need to. In a neighboring column, =IF(B2>A2,"Increase",IF(B2<A2,"Decrease","No change")) gives a readable label next to each percentage.

Menu names and shortcut combinations can vary slightly by Excel version, platform and region, so look for the closest equivalent if a label does not match exactly.

Common Mistakes

  • Dividing by the new value instead of the old one. =(B2-A2)/B2 is a valid ratio but not the usual percent change, and it gives a different number. Decide which value is the base and divide by that.
  • Forgetting to apply percentage formatting. The formula returns 0.25, not 25. A cell showing 0.25 is not wrong, it is just unformatted.
  • Multiplying by 100 as well as formatting. Doing =(B2-A2)/A2*100 and then applying Percentage format shows 2500%. Use one method or the other, not both.
  • Subtracting in the wrong order. =(A2-B2)/A2 flips every sign. Fine for a decrease-focused report, confusing in a column of mixed changes.
  • Mixing the two formulas in one column. Percent change and average-based percent difference are not interchangeable, so a column half of each will mislead anyone reading it.
  • Text that looks like a number. Imported values with spaces, trailing minus signs or non-breaking spaces produce #VALUE!. Clean them first.

Tips

  • Name your columns clearly, such as "Baseline" and "Current", so the direction of the formula is obvious months later.
  • Keep a note in the header cell or a comment stating which formula you used, since the two percent methods give different answers for the same pair.
  • Use Conditional Formatting with a color scale or data bars on the result column to make large swings jump out, especially on long lists.
  • For negative baselines, percent change gets mathematically strange because dividing by a negative number flips the sign again. Show the absolute change alongside the percentage, or state the convention in a note.
  • When building a summary from several rows, decide whether to average the percentages or to compare the column totals. Averaging row percentages ignores size differences between rows.
  • Press F2 to edit a formula in place and see which cells it references; colored outlines show the A and B cells it is using.

Troubleshooting

The cell shows #DIV/0! The reference value is zero or blank. Wrap the formula in IFERROR as shown above, or confirm the base cell actually contains data.

The cell shows #VALUE! One of the cells holds text rather than a number. Check for leading apostrophes, stray spaces or values pasted from a web page. Selecting the cell and reading the formula bar usually reveals a leading apostrophe; retype the number to fix it.

The result looks like a date. This happens when a percentage-formatted cell is later reformatted as Date. Select the cell and reapply Percentage from the Number Format dropdown.

All results are identical or wrong after filling down. The formula probably locked a reference with dollar signs. =(B$2-A$2)/A$2 stays on row 2 no matter where it is copied. Remove the $ signs where you want the reference to move.

Percentages look absurd, such as 2500%. Either the values were already stored as percentages (so 25% is actually 0.25 in the cell) or the formula includes a *100. Check the underlying value in the formula bar to confirm.

Nothing happens when you press Enter. The cell may be in Edit mode with a stray character, or the sheet is protected. Press Esc, click the cell once, and retype the formula.

Frequently Asked Questions

Does Excel have a percent difference function?

No. There is no PERCENTDIFF or similar built-in function. You calculate it with ordinary arithmetic: =(B2-A2)/A2 for percent change or =ABS(A2-B2)/((A2+B2)/2) for average-based percent difference.

What is the difference between percent change and percent difference?

Percent change treats one value as the starting point and divides by it. Percent difference treats both values as comparable and divides by their average. For 200 and 250, percent change gives 25% and percent difference gives about 22.2%.

How do I show the result with a plus or minus sign?

Format the cell as a percentage, then open Format Cells with Ctrl+1 and choose a number format that includes a sign, or use a custom format such as +0.0%;-0.0%. Excel adds a minus sign automatically for negatives.

Can I calculate percent difference between two columns of totals?

Yes. Use the SUM of each column in place of the single cells, for example =(SUM(B2:B20)-SUM(A2:A20))/SUM(A2:A20). That weights each row according to its size rather than averaging row percentages.

Why does a decrease show as a negative percentage?

Because the formula subtracts the base from the new value. A drop produces a negative number, which is the mathematically correct result. If you would rather see decreases without a minus sign, use the ABS version.

How do I format the result to two decimal places?

Select the cells, press Ctrl+1, choose Percentage, and set Decimal places to 2. On the Home tab the Increase Decimal button does the same thing in one click.