Smart Systems for Home

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

Excel Formula Minus Sum: Subtract Totals Correctly

· 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

To subtract a sum in Excel, wrap the SUM function inside a subtraction formula: =A1-SUM(B1:B10). That formula takes the value in A1 and removes the total of B1 through B10 from it. You can also write =SUM(A1:A5)-SUM(B1:B5) to subtract one range total from another, or use a plain minus between two cells with no SUM at all when you are only working with single values. The only thing you need first is data laid out in cells, and a decision about whether you are subtracting one number from a total or one total from another total.

This guide covers the working syntax, the difference between subtraction and the SUM function's own behaviour, and the mistakes that make the result look wrong even when the formula is technically correct. Menu names and button positions can differ slightly by Excel version, by desktop versus web, and by region, so if a label does not match exactly, look for the closest equivalent.

What You'll Need

  • Excel on desktop (Microsoft 365, Excel 2021, 2019, or similar), Excel for the web, or Excel on a phone or tablet. The formulas below work the same in all of them.
  • Numbers entered in cells as actual numbers, not as text. Text that looks like a number is the single most common reason a subtraction gives a wrong answer.
  • A clear idea of the order of operations: what is being subtracted from what.

Step-by-Step

  1. Click the cell where the answer should appear. This is the empty cell that will hold the formula. Avoid putting the formula inside one of the ranges you intend to add up, or you will create a circular reference and Excel will warn you about it.
  2. Type an equals sign. Every formula in Excel starts with =. Without it, Excel treats your typing as text.
  3. Enter the starting value or range. For a single starting number, type its cell reference such as A2. For a starting total, type SUM(A2:A10) so Excel adds that block first.
  4. Type the minus sign. Use the hyphen key on the main keyboard or the numeric keypad. Do not use an en dash or em dash copied from a document; Excel will not accept it as an operator.
  5. Enter the amount being subtracted. Type a cell reference like B2, a fixed number like 250, or another SUM block like SUM(B2:B10). A finished example is =SUM(A2:A10)-SUM(B2:B10), which totals the first block and removes the second block's total.
  6. Press Enter. Excel calculates the result and moves the selection down one cell. If you see the formula itself instead of a number, the cell is formatted as text; select it, then use the number format dropdown on the Home tab to set it back to General and re-enter the formula.
  7. Check the order of operations. Excel performs multiplication and division before addition and subtraction, and evaluates left to right otherwise. In a formula like =A1-B1+C1, Excel subtracts B1 from A1 and then adds C1, which is usually what you want. If you need a different grouping, use brackets: =A1-(B1+C1) subtracts both from A1.
  8. Copy the formula down if needed. Drag the fill handle (the small square at the bottom-right of the selected cell) to repeat the formula for other rows. Use absolute references with dollar signs, such as $B$2, for any cell that must stay fixed while the rest shifts. Pressing F4 with the cursor on a reference cycles through the relative and absolute options on desktop Excel.
  9. Format the result if it is money or a percentage. Select the result cells and apply Currency or Percentage from the number format dropdown on the Home tab so the answer reads clearly. Formatting changes only the display, never the underlying value.
  10. Double-check the totals separately. Put =SUM(A2:A10) in one spare cell and =SUM(B2:B10) in another, then subtract the two cells manually. If the results disagree with your main formula, the problem is in the ranges, not the arithmetic.

Common Mistakes

  • Numbers stored as text. If a cell was imported or pasted from another program, it may be left-aligned and stored as text. SUM ignores text values entirely, so the total looks too small. Fix it by selecting the range and using the warning icon that appears next to it, choosing Convert to Number, or by re-entering the values.
  • Summing the cell that holds the formula. If your SUM range includes the formula cell, Excel flags a circular reference and may return 0. Keep the answer cell outside every range you reference.
  • Missing the equals sign or using a minus at the start incorrectly. Typing 4-2 in a cell gives the text 4-2, not a result. Typing =-A1 simply flips the sign of A1 rather than subtracting a total.
  • Hidden or filtered rows. SUM includes hidden rows in its range, but it does not include rows filtered out by a filter. SUBTOTAL with function number 9 does the same, and SUBTOTAL with 109 excludes both hidden and filtered rows. If a total looks short, check for an active filter.
  • Blank cells inside a range with leading or trailing spaces. A cell containing only a space looks blank but is treated as text. Use Find and Replace to remove stray spaces from number columns.
  • Confusing SUM with subtraction. SUM only adds. There is no SUBTRACT function in Excel; subtraction is always done with the minus operator. If you need to subtract several numbers in sequence, write them out: =A1-B1-C1-D1.

Tips

  • Use SUM(A2:A10)-SUM(B2:B10) rather than A2+A3+...-B2-B3.... The range version is shorter, easier to audit, and updates automatically when you extend the range.
  • Click and drag to select a range while typing a formula instead of typing the references. Excel inserts the correct syntax for you and reduces typos.
  • Press Ctrl and the grave accent key (the key above Tab) on desktop Excel to toggle between showing results and showing every formula in the sheet. Ctrl and the tilde key does the same on many layouts. This is a fast way to spot a formula pointing at the wrong cells.
  • Use the Evaluate Formula tool on the Formulas tab to walk through a long calculation step by step when the answer is wrong but the syntax looks right.
  • Keep inputs and calculations on separate areas of the sheet. Chaining subtraction formulas on top of each other makes errors much harder to trace.

Troubleshooting

The cell shows #VALUE!: one of the referenced cells contains text that cannot be treated as a number, often a stray space or a word. Click the error icon beside the cell and choose the option to trace the error, then correct the offending cell.

The result is 0 when it should not be: check for a circular reference first (Excel shows a warning and the status bar names the cell), then check whether your SUM ranges overlap so the same numbers are added and subtracted.

The formula returns a date or strange number: the cell is probably formatted as a date. Change the format to General or Number on the Home tab.

The formula looks right but gives the wrong total: select each range in turn and look at the status bar at the bottom of the window, which shows Sum, Average and Count for the selection. Compare that count to the number of rows you expect. If Count is lower than the rows selected, some cells are text.

If that did not work: rebuild the formula from scratch in an empty cell using only two references, confirm it calculates, then extend it one range at a time until the result changes unexpectedly. On the web version of Excel, some auditing tools are limited compared with desktop, so switching to the desktop app can help isolate the problem.

Frequently Asked Questions

Is there a SUBTRACT function in Excel?

No. Excel has no dedicated subtraction function. You subtract with the minus operator, optionally wrapping ranges in SUM first.

How do I subtract a column total from another column total?

Use =SUM(A2:A100)-SUM(B2:B100), adjusting the ranges to match your data. Both ranges can be different sizes.

Why does my SUM ignore some numbers?

Those cells are almost certainly stored as text. Left-aligned numbers and cells with a green warning triangle are the usual signs.

Can I subtract a percentage of a sum?

Yes. To remove 15 percent of a total, use =SUM(A2:A10)*(1-15%), or =SUM(A2:A10)-SUM(A2:A10)*15% for the same result written out.

Does deleting a row break my formula?

No. Excel adjusts cell and range references automatically when rows or columns are inserted or deleted within the referenced area. Deleting an entire referenced range can produce a #REF! error, which you then need to fix by re-entering the range.

How do I subtract a fixed amount from a whole column?

Enter the fixed amount in one cell, then use an absolute reference such as =A2-$D$1 and fill the formula down. The dollar signs keep D1 fixed for every row.