# How to Subtract in Google Sheets

There are a lot of different ways that a spreadsheet application like Google Sheets can be useful. You can store and sort data, create charts, and you can also quickly edit and compare different types of information. But you may be wondering how to subtract in Google Sheets if you’ve been looking for a way to compare data in that manner.

Google spreadsheets share a lot of similarities with the spreadsheets that you create in Microsoft Excel. One of these similarities is the ability to use formulas to calculate values based on the numbers in your cells.

This means that you have the ability to create a subtraction formula in your Google spreadsheet that can calculate the difference between two values. These values can be based on cell references, or they can simply be based on two values that you have entered into a minus function or formula.

This guide is going to show you how to subtract in Google Sheets. You will be able to use a formula that lets you subtract a value in one cell from a value in another cell. You can also use the subtraction formula to subtract one value from another within a single cell, as well as incorporate the SUM function to subtract a cell range from a value.

## How to Subtract in Google Sheets

1. Click inside the cell where you want to display the difference.
2. Type =XX-YY, but replace XX with the first cell, and YY with the second cell.
3. Press Enter on your keyboard.

Our article continues below with additional information and pictures for these steps. We also discuss more ways to subtract in Google Sheets if you aren’t just trying to subtract one individual value in a cell from a value in another cell.

The steps in this guide were performed in the desktop version of Google Chrome, but will also work in other desktop Web browsers like Microsoft Edge, Mozilla Firefox, or Apple’s Safari browser.

### Step 3: Type =XX-YY, but replace the XX with the location of the first cell, and replace the YY with the location of the second cell.

For example, in the image below I am calculating the difference between a value in cell B2 and cell C2, so my formula is =B2-C2.

### Step 4: Press Enter on your keyboard to execute the formula.

Note that I have a number of rows where I would like to perform this same function. Luckily I don’t need to manually type out my formula multiple times, and can simply copy and paste the first formula into the other cells and get the difference between my cells for the entire column.

Google Sheets will automatically update the formula based on its location. So copying the formula from cell D2 in the image above and pasting it into cell D3 will update the formula to calculate the difference between cells B3 and C3 instead.

## How to Subtract Two Numbers in One Cell in Google Sheets

As we mentioned earlier, we can use this same formula if we just want to know the difference between two numbers.

If we click inside one of the cells in our spreadsheet and type a formula like =100-86 Google Sheets will calculate the difference between those two values and display it in the cell.

Note that you will see the difference in the cell (in this case it’s 14) but if you look at the formula bar above the spreadsheet you will see the subtraction formula that we used to determine that value.

## How to Subtract a Range of Cells from a Value in Google Sheets

If you have a starting value and you want to subtract the values from a range of cells from that starting value, then you can incorporate the SUM function to calculate the difference.

The formula for this situation is:

=XX-SUM(YY:ZZ)

Then you will replace the XX with the cell containing the starting value, then replace the YY with the first cell in the range, and the ZZ with the last cell in the range.

In the picture above I am subtracting the cells in cells D18 through D21 from the value in cell D17.