How to Subtract in Google Sheets

How to Subtract in Google Sheets

Subtraction is one of the four basic operations of mathematics. In Google Sheets, you can use subtraction alone, or in combination with other functions to create complex formulas. There is no special function for subtraction in Google Sheets. To subtract two numbers, you can simply use the minus sign (-).

In addition to subtracting numbers from each other, you can also subtract cell values ​​by referring to them in the formula bar. Moreover, you can subtract a group of numbers sequentially and even subtract matrices from each other. You can accomplish all of these tasks by using the minus sign (-) in Google Sheets.

Like subtraction in Excel, there is no subtraction function in Google Sheets. You can subtract numbers in Google Sheets the same way you would on paper. Except this time, you won’t have to do the math yourself. Google Sheets takes care of it!

Let’s start by subtracting two numbers:

  1. Select the cell in which you want to display the result of the subtraction.
  2. Go to the formula bar and type an equals (=). This will launch your formula.
  3. Enter the number you want to subtract from.
  4. Type the minus sign ().
  5. Now add the number you want to subtract. Your final formula should look like the formula below:
     =256-140< 
  6. Press on Come in.

Google Sheets subtracts the second number in the formula from the first and displays the result.

Rather than manually entering numbers into your subtraction formula, you can refer to the cells that contain the numbers and subtract them.

Two cells waiting for subtraction in Google Sheets

In this example spreadsheet, we have the number of initial volunteers for an experiment and the number of volunteers who quit. The goal is to calculate the number of current volunteers.

  1. Select the cell in which you want to display the calculation results. This will be the cell B3 in this example.
  2. Go to the formula bar and enter the formula below:
     =B1-B2​​​​ 
  3. Press on Come in.
Subtract two cells in Google Sheets

The formula will subtract the number in B2 (resigning volunteers) from the number in B1 (initial volunteers) and display the number of current volunteers.

You can also subtract multiple numbers in a single formula. There are many ways to do this, but we’ll look at two of the easiest methods: Sequential Subtraction and the SUM function.

Column of numbers in Google Sheets waiting for subtraction

We will deploy both methods on an extension of the previous example. Here we have a spreadsheet with the number of initial volunteers, as well as the volunteers who quit each month.

The goal is to calculate the number of current volunteers by subtracting the number of resigning volunteers from the initial number of volunteers.

Sequential subtraction

In this method, we start from the cell we want to subtract from, then add the cells we want to subtract to that cell with a minus sign () between each cell reference.

  1. Select the cell in which you want to display the final result. This will be the cell B8 for the current example.
  2. In the formula bar, enter the formula below:
     =B1-B2-B3-B4-B5-B6-B7 
  3. Press on Come in. You can now see the number of current volunteers.
Subtract multiple numbers in Google Sheets

This formula allows us to subtract B2 of B1then subtract B3 from the remainder of the previous subtraction. It will continue until B7 is subtracted from the remainder of all previous subtractions, giving us the number of current volunteers.

Subtraction with the SUM function

While sequential subtraction gets the job done, entering cell references one by one is still a chore. After all, isn’t Google Sheets all about making things easier?

This is where the SUM function comes in. This function allows you to sum numbers and cells in Google Sheets.

 =SUM(value1, value2, value3, ...) 

The values ​​you enter can be numbers or cells containing numbers. SUM only works with numeric values.

To subtract multiple cells in Google Sheets, you can sum all the subtractions using the SUM function and then subtract them from the original number. In this method, we will use the SUM function to obtain the results of the previous example without having to consult the cells one by one:

  1. Select the cell in which you want to display the result of the subtraction. As before, we will use the cell B8.
  2. In the formula bar, enter the formula below:
     =B1-SUM(B2:B7) 
  3. Press on Come in.
Subtracting multiple numbers using the SUM function in Google Sheets

This formula uses the SUM function to add up all the resigned volunteers (B2 at B7) together, then it subtracts the total of quitting volunteers from the original volunteers. The resulting number will be the number of current volunteers.

A matrix is ​​basically an array of numbers placed in a table. You can perform basic mathematical operations on matrices in Google Sheets, and you can easily subtract one matrix from another.

Keep in mind that to subtract matrices, both matrices must have the same structure. This means that if your first matrix is ​​a 3×3 matrix, then the second matrix and the third matrix (where you will display the results of the subtraction) must also be 3×3.

Since matrices are arrays in Google Sheets, you’ll need to write an array formula to use them. An array is a structure that contains multiple values, and an array formula tells Google Sheets to treat those values ​​as an array, not as individual values. Although the name might sound a little intimidating, in this case the array formula is simple.

Two matrices waiting for subtraction in Google Sheets

In this example, we have three 3×3 matrices. The goal is to subtract Matrix 2 from Matrix 1 and display the results in Matrix 3. Here’s how:

  1. Select the first cell of the matrix in which you want to display the results of the subtraction. In this example, matrix 3 starts at E5and so we choose E5.
  2. Go to the formula bar. There are two paths you can take from here:
    1. In the formula bar, enter the formula below and press CTRL + Shift + Come in:
       =(A2:C4)-(A7:C9) 
    2. In the formula bar, enter the formula below and press Come in:
       =ArrayFormula((A2:C4)-(A7:C9)) 
Subtraction of two matrices in Google Sheets

Regardless of the path taken, the final formula and result are the same. The basic formula selects the matrix 2 (A7 at C9), subtracts it from the matrix 1 (A2 at C4), then displays the results of the subtraction in matrix 3.

The difference between the two methods is that in the first method, we only typed the basic formula and then pressed CTRL + Shift + Come in rather than Come in alone. This combination tells Google Sheets that it’s an array, and Google Sheets automatically puts the formula in an ArrayFormula function.

In the second method, we entered the ArrayFormula function manually so that Google Sheets didn’t have to. Since ArrayFormula is already present, there is no need to use the function CTRL + Shift + Come in combo, and a solitaire Enter would suffice.

Subtraction made easy with Google Sheets

Subtraction is one of the four basic math operations, and you can subtract numbers, cells, and even matrices using Google Sheets. Although subtraction is simple at its core, you can still combine it with other Google Sheets functions to create complex formulas that make your calculations much easier.

Google Sheets is bliss and has the potential to make life much easier for anyone who deals with numbers. The great thing about Sheets is that just when you think it can’t make the math easier, it takes you by surprise and shows you it can.