How to Calculate Difference Between Two Numbers in Excel

Excel is an excellent application for conducting mathematical operations on large data. One such operation is the subtraction of two numbers, which means the difference between two numbers.

In this tutorial, we will learn how to work out the difference between two numbers in Excel.

Calculate the Difference Between Two Numbers

The formula to calculate the difference between two numbers in Excel is extremely simple. You just need to use the equal (=) sign to indicate that it’s a formula, and then use the minus (-) sign between the two numbers.

Write the following formula in a cell:

=90-56

Difference between two numbers

This will take the difference between the two numbers (90 and 56), and display the result (34).

If you want to take the difference between two cell values, you should type the equal sign (=), and then the first cell name, minus (-) the second cell name, just like a regular math subtraction.

=A2-B2

Difference between two cell values

Using the difference formula with cell names comes in especially handy if you have many cells you want to calculate the subtraction with.

To apply the difference formula automatically to other cells, click on the little rectangle on the bottom right of the cell that contains the difference formula, and then drag it in the desired direction, or double-click the rectangle to apply the formula to the whole column.  

Apply difference to multiple cells

This way, you can calculate the difference between many cells in a heartbeat.

Calculate the Positive (Absolute) Difference Between Two Numbers in Excel

Sometimes you don’t need the actual difference between two numbers, but the positive difference, or the absolute difference. This means that you always want to obtain a non-negative value by subtracting the smaller number from the larger number. This is perfectly possible and very easy in Excel if you use the ABS function.

The ABS function takes the absolute value of the number, cell value, or the result of the expression written inside it. The syntax of the function is as follows:

=ABS(value)

Let’s find the positive (absolute) difference between two numbers. In order to do that, we will write the difference formula inside the ABS function.

=ABS(A2-B2)

When we apply this formula to all cells in our spreadsheet, we can see that the negative difference values have been transformed into positive ones with the help of the absolute value (ABS) function.

Calculate positive difference between two numbers

P.S.

If you want to calculate the percentage difference between two numbers, you can follow Calculate Percentage Difference in Excel tutorial.

In this tutorial, we learned how to calculate the difference and the positive difference between two numbers. This is a skill that’s definitely going to save time!

Leave a Comment