Smart Systems for Home

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

Google Sheets Formula to Subtract Two Cells

· 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 subtract two cells in Google Sheets, click the cell where you want the result, type =, click the first cell, type -, click the second cell, and press Enter. For example, =A2-B2 subtracts the value in B2 from the value in A2. That is the entire formula — no function name is required, because subtraction uses the minus operator rather than a built-in function.

What You'll Need

  • A Google account and access to Google Sheets (sheets.google.com or the Google Sheets app).
  • Two cells containing numbers (or formulas that return numbers) in the same spreadsheet.
  • An empty cell to hold the result.

Step-by-Step

  1. Open your spreadsheet. Go to sheets.google.com, sign in, and open the file you want to edit. On mobile, open the Google Sheets app and tap the file. Menu labels can differ slightly by version, device, and region, but the formula syntax is identical everywhere.
  2. Click the result cell. Choose an empty cell where the answer should appear. Click it once so it is highlighted with a blue border.
  3. Type an equals sign. Press = on your keyboard (or tap the formula bar on mobile). Every formula in Google Sheets starts with =. Without it, Sheets treats your entry as text.
  4. Click the first cell. The cell reference (for example A2) appears automatically after the equals sign. You can also type the reference manually.
  5. Type a minus sign. Press the - key. This is the subtraction operator. Do not use an en dash or em dash; only the standard hyphen-minus works.
  6. Click the second cell. Its reference is added after the minus sign. Your formula bar should now read something like =A2-B2.
  7. Press Enter. The result appears in the cell and the selection moves down one row. If you are on mobile, tap the green check mark to confirm.
  8. Verify the result. Click the result cell and look at the formula bar to confirm the references are correct. If the answer looks wrong, check that you subtracted in the intended order: =A2-B2 gives a different result from =B2-A2.
  9. Copy the formula down (optional). If you have a column of values, drag the small blue square in the bottom-right corner of the result cell downward. Google Sheets adjusts the row references automatically, so =A2-B2 becomes =A3-B3, and so on.

Common Mistakes

  • Forgetting the equals sign. Typing A2-B2 without = stores it as text and shows no result.
  • Reversing the order. Subtraction is not commutative. =A2-B2 and =B2-A2 produce opposite results. Decide which value is the starting amount and which is the amount being removed.
  • Using the wrong dash character. Copying a formula from a document or website can bring in an en dash (–) or em dash (—), which Sheets does not read as subtraction. Retype the hyphen manually.
  • Referencing text instead of numbers. If either cell contains text, a space, or a number stored as text, the formula returns an error. Check for leading apostrophes or cells formatted as Plain Text.
  • Leaving a space in the middle. =A2 - B2 with spaces still works, but =A2-B 2 does not. Keep references intact.
  • Subtracting across sheets without the sheet name. To subtract a cell on another tab, include the sheet name and an exclamation mark, for example =Sheet2!A2-B2. If the sheet name contains spaces, wrap it in single quotes: ='January Sales'!A2-B2.

Tips

  • Use absolute references with $ when you want to subtract the same cell from many rows. For example, =A2-$B$1 keeps B1 fixed when you copy the formula down.
  • Subtract multiple cells in one formula: =A2-B2-C2 removes both values from A2. You can also use =A2-SUM(B2:C2) to subtract a whole range.
  • Subtract dates to find the number of days between them. Format the result cell as a number (Format > Number > Number) so Sheets does not display a date.
  • Wrap the formula in IFERROR to hide errors: =IFERROR(A2-B2,"") shows a blank instead of #VALUE! when a cell is empty or contains text.
  • Press Ctrl+` (Windows/ChromeOS) or Cmd+` (Mac) to toggle showing all formulas instead of results, which helps you audit a sheet quickly.

Troubleshooting

If the formula does not produce the expected result, work through these checks in order:

  1. Check the formula bar. Click the result cell and read the formula at the top. Confirm it starts with = and uses a standard hyphen.
  2. Look for error codes. #VALUE! usually means one cell contains text or is blank in a way Sheets cannot calculate. #REF! means a referenced cell or sheet was deleted. #NAME? usually means a sheet name is misspelled or missing quotes.
  3. Inspect the source cells. Click each referenced cell and check the formula bar. A number preceded by an apostrophe is stored as text. Re-enter it as a plain number.
  4. Check number formatting. A cell formatted as a date or currency may display a result that looks odd. Use Format > Number to switch to a plain number format.
  5. Recalculate. Google Sheets recalculates automatically, but reloading the browser tab (or closing and reopening the mobile app) refreshes the view if results appear stale.
  6. Test with simple numbers. In two empty cells, type 10 and 4, then build =A1-B1. If that returns 6, the formula method is fine and the problem is in your original data.

Frequently Asked Questions

Can I subtract two cells without using a function?

Yes. Subtraction in Google Sheets uses the minus operator, not a function. A formula like =A2-B2 is complete on its own. There is no SUBTRACT function in Google Sheets.

How do I subtract a whole column from another column?

Enter =A2-B2 in the first row of the result column, then drag the fill handle down. Each row adjusts automatically, giving you =A3-B3, =A4-B4, and so on.

Why does my subtraction formula show a date instead of a number?

If both cells contain dates, Sheets assumes you want a date result. Select the result cell and set Format > Number > Number to display the difference in days.

How do I subtract a cell on a different sheet?

Include the sheet name and an exclamation mark before the cell reference, such as =Sheet2!A2-B2. If the sheet name has spaces, put it in single quotes: ='Q1 Data'!A2-B2.

What happens if one of the cells is empty?

An empty cell is treated as zero, so =A2-B2 returns the value of A2 when B2 is blank. If a cell contains text rather than being empty, you get a #VALUE! error instead.

Can I subtract the same cell from many rows?

Yes. Use an absolute reference with dollar signs, for example =A2-$B$1. When you copy the formula down, B1 stays fixed while A2 changes row by row.