Excel Formula for Minus: How to Subtract in Excel
Are you trying to figure out how to subtract numbers in Microsoft Excel? The Excel formula for minus, or subtraction, is quite simple. In this article, we’ll cover everything you need to know about subtracting in Excel, including the basic subtraction formula, how to subtract multiple numbers or cells, common errors to watch out for, and more advanced subtraction formulas and functions.
Basic Excel Subtraction Formula
The most straightforward way to subtract in Excel is to use the minus sign (-) in a formula. To subtract one number from another, simply type the equals sign (=), followed by the number you want to subtract from, the minus sign, and the number you want to subtract.
For example, to subtract 10 from 25, you would enter the following formula in a cell:
=25-10
Excel will calculate the result and display 15 in the cell.
You can also reference cell values in your subtraction formula. For instance, if you have the value 25 in cell A1 and 10 in cell B1, you could subtract the value in B1 from A1 with:
=A1-B1
Subtracting Multiple Numbers or Cells
What if you need to subtract more than two numbers or cell values? No problem – you can easily subtract multiple values in a single formula.
To subtract multiple numbers, simply list out all the numbers you want to subtract, separated by minus signs:
=100-20-15-10
Excel will calculate this from left to right: 100-20=80, 80-15=65, 65-10=55. So the end result will be 55.
You can also subtract multiple cell references in the same way. If you had the values 100, 20, 15, and 10 in cells A1 through A4, respectively, you could subtract them with:
=A1-A2-A3-A4
Common Errors with Subtraction Formulas
There are a few common mistakes to watch out for when writing subtraction formulas in Excel:
#NAME? Error
If you see a #NAME? error, that means Excel doesn’t recognize something in your formula, likely because you’ve misspelled something. Double check that you’ve spelled the function name correctly.
#VALUE Error
The #VALUE error appears when there is a problem with a value in your subtraction formula, often because you are trying to subtract a text value that cannot be converted to a number.
#DIV/0 Error
The #DIV/0 error happens when you are trying to divide a number by 0 or an empty cell. This can sometimes happen if a subtraction formula is dividing by a cell reference that contains 0 or is blank.
Advanced Subtraction with the MINUS Function
Excel has a MINUS function that provides another way to subtract numbers. It takes two arguments – number 1 and number 2.
The syntax is:
=MINUS(number1, number2)
For example:
=MINUS(10,5) would return 5.
You can use cell references as well:
=MINUS(A1,B1) subtracts the value in B1 from the value in A1.
While the MINUS function provides an alternative to the standard subtraction formula, it is limited to subtracting only two values. For most cases, the simpler subtraction method of using the minus sign is preferable.
Subtracting Percentages
You can subtract percentages in Excel just like regular numbers. To subtract a percentage, simply write the percentage after the minus sign.
For example:
=50-10% calculates 10% of 50 (which is 5) and then subtracts that from 50, giving a result of 45.
If your percentage value is in a cell, be sure to multiply it by 100 in your formula:
=A1-B1*100
Subtracting Dates and Times
Excel stores dates and times as serial numbers, so you can subtract one date from another to calculate the number of days between them. To subtract two dates, simply write a formula with a minus sign between two date cell references or values.
For example, if you have two dates in cells A1 and B1, you can calculate the days between them with:
=A1-B1
This will return the number of days between the two dates.
You can also subtract a number from a date to calculate a date that many days in the past. For example:
=A1-10 calculates the date 10 days before the date in cell A1.
Time values can be subtracted similarly. Since Excel stores times as fractional days, subtracting one time from another gives you the decimal number of days between them.
=A1-B1, where A1 and B1 contain time values, will return a decimal number representing the fraction of a day between those two times.
The DATEDIF Function to Calculate Date Difference
For more control over calculating date differences, you can use the DATEDIF function. This allows you to specify the unit of time to calculate the difference in.
=DATEDIF(A1,B1,”d”)
calculates the number of full days between the dates in A1 and B1. You can replace “d” with other codes to calculate the difference in months (“m”) or years (“y”) instead.
Subtracting Negative Numbers
Subtracting a negative number is equivalent to adding that number’s positive value. For example:
10 – (-5) = 15
because subtracting negative 5 is the same as adding positive 5.
In Excel, as long as your cell formatting is set to display negative numbers with a minus sign, you can subtract them like any other number.
=A1-B1 will subtract a negative value in B1 from A1.
Use Absolute Values for Subtraction
If you want to ensure you are always subtracting a positive value, you can use the ABS function to take the absolute value before subtracting.
=A1-ABS(B1) subtracts the absolute value of B1 from A1. So if B1 contains -5, it will subtract 5.
Conditional Subtraction with IF
Sometimes you may want to conditionally perform subtraction, depending on whether a certain condition is met. You can do this with the IF function.
For example:
=IF(A1>100,A1-10,A1)
This checks if the value in cell A1 is greater than 100. If so, it subtracts 10 from A1. If not, it simply returns the unchanged value of A1.
Subtracting Filtered Values with SUBTOTAL
The SUBTOTAL function lets you subtract only visible values in a filtered list.
=SUBTOTAL(2,A1:A10)
subtracts the values in the range A1:A10, but only includes rows that are currently visible (not filtered out). The “2” tells the function to use the “minus” operation on the filtered subtotal.
Final Thoughts
In this article, we’ve covered all the essentials of how to subtract in Excel. You now know how to write basic subtraction formulas, subtract multiple numbers or cells, use the MINUS function, work with percentages, dates, times, and negative numbers, and take advantage of some more advanced functions like IF and SUBTOTAL.
Subtracting in Excel is a fundamental skill that you will likely use frequently in your spreadsheets. With the techniques covered here, you’ll be able to confidently tackle any subtraction task in Excel.
FAQs
What is the basic formula for subtraction in Excel?
How do I subtract multiple numbers or cells in Excel?
What is the MINUS function in Excel?
How do I subtract percentages in Excel?
Can I subtract dates in Excel?
What is the SUBTOTAL function used for in Excel?
Vaishvi Desai is the founder of Excelsamurai and a passionate Excel enthusiast with years of experience in data analysis and spreadsheet management. With a mission to help others harness the power of Excel, Vaishvi shares her expertise through concise, easy-to-follow tutorials on shortcuts, formulas, Pivot Tables, and VBA.