How to Subtract in Excel: Formula Guide
In this article
To subtract in Excel, start a formula with an equals sign, type the first number or cell reference, then a minus sign, then the second number or cell reference, and press Enter. For example, =A2-B2 subtracts the value in B2 from the value in A2. That single pattern covers almost every subtraction task, from simple differences to running balances and date gaps.
What You'll Need
- Microsoft Excel on Windows, Mac, or the web (Excel for the web). The steps below use the desktop ribbon, but the formula syntax is identical everywhere.
- A worksheet with at least two values or two cells containing numbers.
- Basic familiarity with clicking a cell and typing in the formula bar.
Note: menu labels and ribbon names can differ slightly by Excel version, device, and region. The formulas themselves do not change.
Step-by-Step
- Click the cell where you want the result. This is where the answer will appear. It can be empty or already contain a label; the formula will replace whatever is there.
- Type an equals sign (=). Every formula in Excel begins with
=. Without it, Excel treats your entry as text. - Enter the first value or cell reference. Type a number such as
150, or click the cell that holds the number you want to subtract from (the minuend). For example, click cell A2 and Excel insertsA2into the formula. - Type a minus sign (-). This is the subtraction operator. On a numeric keypad it is the hyphen key; on the main keyboard it is the key to the right of the zero.
- Enter the second value or cell reference. Type the number you want to take away, or click the cell holding it. For example, type
B2or click cell B2. - Press Enter. Excel calculates the result and moves the selection down one cell. The formula stays in the original cell and remains visible in the formula bar when you reselect it.
- Copy the formula down a column if needed. Select the cell with the formula, grab the small square at its bottom-right corner (the fill handle), and drag down. Relative references adjust automatically, so
=A2-B2becomes=A3-B3in the next row. Double-clicking the fill handle fills down as far as the adjacent column has data. - Subtract multiple numbers in one formula. Chain minus signs:
=A2-B2-C2subtracts B2 and C2 from A2. You can also use=A2-SUM(B2:B10)to subtract an entire range in one go. - Subtract a constant from a column. Use an absolute reference so the constant does not shift when copied:
=A2-$D$1. The dollar signs lock the reference to cell D1. - Subtract dates to get a duration. If A2 is a later date and B2 is an earlier date,
=A2-B2returns the number of days between them. Format the result cell as General or Number, not Date, or Excel may display an odd date instead of a day count. - Check the result. Click the result cell and look at the formula bar to confirm the references point to the right cells. If the answer looks wrong, the usual cause is a reference that shifted during a copy or a number stored as text.
Common Mistakes
- Forgetting the equals sign. Typing
10-4without=leaves the text "10-4" in the cell instead of calculating 6. - Reversing the order.
=B2-A2gives a different answer from=A2-B2. Subtraction is not commutative; decide which value is the starting amount before you type. - Numbers stored as text. Values imported from other systems or typed with a leading apostrophe are treated as text. Excel may return
#VALUE!or treat them as zero. Fix by retyping the number or using Text to Columns to convert the column to numbers. - Using a hyphen inside a number. Excel reads
2024-05as a date, not a subtraction. If you need to subtract parts of a code, split them into separate cells first. - Copying without locking references. A constant in D1 becomes D2, D3, and so on when copied down unless you write
$D$1. - Subtracting formatted dates incorrectly. If the result cell is formatted as a date, a day count of 45 may display as a date in 1900. Change the format to General or Number.
- Leaving spaces around the minus sign. Excel tolerates spaces in many cases, but stray characters copied from web pages can break the formula. Keep it clean:
=A2-B2.
Tips
- Use cell references rather than typed numbers whenever the source values might change. The result updates automatically.
- Press
Ctrl+`(the grave accent key, usually below Esc) to toggle showing formulas instead of results, which makes auditing a sheet much faster. On Mac, the shortcut isCtrl+`as well in most layouts. - Use the status bar: select two cells and Excel shows their sum, average, and count at the bottom of the window, but not the difference. For a quick difference, type the formula in an empty cell.
- Name key cells (Formulas > Define Name) so formulas read like
=Revenue-Costsinstead of=B2-B7. - Wrap subtraction in
IFERRORwhen a source cell might be blank or invalid:=IFERROR(A2-B2,"")shows a blank instead of an error. - For a running balance, subtract each expense from the previous balance: in row 3,
=C2-B3where C2 is the prior balance and B3 is the new expense.
Troubleshooting
- The cell shows the formula as text. The cell is probably formatted as Text. Select it, set the format to General (Home > Number format dropdown), then re-enter the formula and press Enter.
- You get #VALUE!. One of the referenced cells contains text, a space, or an error value. Click each referenced cell and check the formula bar; clear spaces or convert text numbers to real numbers.
- The result is 0 when it should not be. Check for hidden decimal places or values stored as text that Excel treats as zero. Widen the column and increase decimal places to see the actual stored values.
- The formula copied down gives wrong answers. Look for relative references that should be absolute. Add dollar signs to any cell that must stay fixed.
- Dates subtract to a strange date. Change the result cell format to General or Number. The underlying value is correct; only the display is wrong.
- Excel will not accept the formula at all. Check that the sheet is not protected (Review > Unprotect Sheet) and that you are not in a cell formatted as text. If the file is shared, confirm you have edit permission.
Frequently Asked Questions
Can I subtract in Excel without a formula?
Not directly. Excel has no subtraction button on the ribbon. You can use Paste Special > Subtract to subtract a copied number from a range of cells, but that changes the original values rather than producing a new result, so keep a backup first.
How do I subtract a percentage in Excel?
To reduce a number by a percentage, use =A2*(1-10%) for a 10% reduction, or =A2-A2*10%. To subtract one percentage from another, simply use =A2-B2 with both cells formatted as percentages.
Why does my subtraction formula show a date?
The result cell inherited a date format, usually because one of the source cells is a date. Select the result cell, open the Number Format dropdown on the Home tab, and choose General or Number.
How do I subtract multiple cells from one total?
Use =A2-SUM(B2:B10) to subtract a whole range from a single value, or chain minus signs: =A2-B2-C2-D2. The SUM version is easier to extend.
Can I subtract across different sheets?
Yes. Reference the other sheet with an exclamation mark: =Sheet1!A2-Sheet2!B2. If the sheet name contains spaces, wrap it in single quotes: ='January Sales'!A2-'February Sales'!B2.
Does subtraction work the same in Excel for the web and Google Sheets?
The formula syntax is the same in Excel for the web and in Google Sheets: =A2-B2. Menu locations differ, but the minus operator and cell reference rules are identical.