Lesson 11 of 92 · Free Excel Course
Excel
Excel Formula for Minus, Multiply and Divide (With Examples)
How to subtract, multiply and divide in Excel: minus formulas, a whole column times one number, PRODUCT, #DIV/0!, remainders and rounding.
In the last lesson SUM did all the adding. Now for the other three: taking away, multiplying and dividing. Here's the surprise for most beginners: Excel has no SUBTRACT function and no DIVIDE function. You don't need them. You use the minus sign, the star and the slash you met in Formulas: the basics. This lesson shows the formulas people actually need: what's left in a budget, a column of hours times one pay rate, splitting a bill, the remainder of a division and how to round the messy results.
The three signs you need
Every formula starts with =. After that, these are the signs:
| To do this | Type | Example | Result |
|---|---|---|---|
| Subtract | - (minus, the hyphen key) | =10-4 | 6 |
| Multiply | * (star, Shift+8) | =6*7 | 42 |
| Divide | / (forward slash) | =20/8 | 2.5 |
You can mix them with brackets, like =(10-4)*2, which gives 12. Remember the order from the formulas lesson: Excel multiplies and divides before it adds and subtracts, unless brackets say otherwise.
One small trap: if you type 7/30 into a cell without the equals sign, Excel thinks you mean a date and shows 30-Jul. Always start with = when you want math.
Subtract one cell from another
Say you set a budget for each spending category and want to see what's left. The formula is "budget minus spent".
- Click D2, where the answer goes.
- Type
=. - Click B2 (the budget), type
-, then click C2 (what you spent). - Press Enter. The formula reads
=B2-C2. - Click D2 again, then double-click the small square at the bottom-right corner of the cell (the fill handle). Excel copies the formula down to the last row of your list.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Category | Budget | Spent | Left |
| 2 | Groceries | $400.00 | $362.50 | $37.50 |
| 3 | Fuel | $150.00 | $171.20 | -$21.20 |
| 4 | Dining out | $120.00 | $85.00 | $35.00 |
Each copy adjusts itself: D3 becomes =B3-C3, D4 becomes =B4-C4. That's how you subtract one column from another: write the formula once in the top row and fill it down. On a Mac, press Return instead of Enter. In Excel for the web the steps are the same, and the fill handle works there too (drag it if double-clicking doesn't fill).
A negative answer isn't an error. It just means the second number was bigger. If you'd rather see it in red, set a number format as shown in Format cells.
Subtract several cells, or a total
Now take a paycheck and subtract three bills from it. You have two choices.
Chain the minus signs: =B2-B3-B4-B5. Fine for a few cells.
Subtract a SUM: =B2-SUM(B3:B5). Excel adds the bills first, then takes the total away from the paycheck. This stays short no matter how many bills there are, and if you insert a new bill row inside B3:B5, SUM picks it up.
| A | B | |
|---|---|---|
| 1 | Item | Amount |
| 2 | Paycheck | $2,400.00 |
| 3 | Rent | $1,200.00 |
| 4 | Car payment | $310.00 |
| 5 | Phone | $65.00 |
| 6 | Left to spend | $825.00 |
There's a third way Microsoft mentions: type the amounts you're taking away as negative numbers and SUM everything. =SUM(2400,-1200,-310,-65) also gives 825. It's handy when you keep a running list of money in and money out in one column.
Multiply with * or PRODUCT
To multiply two cells, use the star: =B2*C2 gives price times quantity, hours times rate, and so on.
When you need to multiply more than two numbers, there's a function for it. PRODUCT multiplies everything you give it, in the same way SUM adds. For a box that's 12 by 10 by 8 inches, with the three sizes in B2, C2 and D2:
=B2*C2*D2gives 960.=PRODUCT(B2:D2)also gives 960.
PRODUCT accepts up to 255 numbers or ranges. Watch one thing: it skips empty cells rather than treating them as zero. If D2 were blank, =PRODUCT(B2:D2) would give 120 (just 12 times 10), while =B2*C2*D2 would give 0. Neither is wrong, but you should know which one you're getting. The PRODUCT function reference page has more examples.
Multiply (or subtract) a whole column by one number
This is the most-asked version. You have a column of hours and one hourly pay rate, and you want pay for every row. Put the rate in its own cell so you can change it later.
- Type the rate, 18.50, in E1.
- Click C2 and type
=B2*E1, but don't press Enter yet. - Put a dollar sign before the E and before the 1 so it reads
=B2*$E$1. (Shortcut on Windows: click inside E1 in the formula and press F4.) - Press Enter, then double-click the fill handle to copy it down.
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Day | Hours | Pay | Rate: | $18.50 |
| 2 | Mon | 8 | $148.00 | ||
| 3 | Tue | 6.5 | $120.25 | ||
| 4 | Wed | 7.25 | $134.13 |
Why the dollar signs? Without them, the copy in C3 would become =B3*E2, C4 would be =B4*E3, and those cells are empty, so the pay shows $0.00. The $ locks the reference to E1. It works the same for subtracting or dividing by a fixed cell, such as =B2-$E$1 or =B2/$E$1. This idea is big enough to have its own lesson: Absolute and relative references.
Without a formula: Paste Special
If you want to change the numbers themselves (for example, raise every price by multiplying by 1.1) and don't need a formula, use Paste Special.
- Type the number, such as 1.1, in a spare cell and copy it (Ctrl+C).
- Select the cells you want to change.
- On the Home tab, click the arrow under Paste and choose Paste Special (or press Ctrl+Alt+V).
- Under Operation, pick Multiply (or Divide, Add, Subtract). Click OK.
On a Mac it's Home > arrow next to Paste > Paste Special, with the same Operation choices. Be careful: this overwrites your original numbers and leaves no formula behind, so you can only get them back with Undo. Excel for the web's paste menu doesn't list these math operations, so use a formula there instead.
Divide, and how to handle #DIV/0!
Division uses the slash. To split a bill, divide the total by the number of people: =B2/C2.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Bill | Total | People | Each |
| 2 | Pizza night | $96.00 | 4 | $24.00 |
| 3 | Taxi | $38.50 | 0 | #DIV/0! |
#DIV/0! appears when the number you divide by is 0 or the cell is blank. The real fix is to fill in the right number. But if a row is waiting for data and you don't want an ugly error on the screen, you have two options:
=IF(C3=0,"",B3/C3)says "if People is zero (or empty), show nothing; otherwise divide". You'll learn IF properly in IF and IFS.=IFERROR(B3/C3,"")says "try the division, and if it gives any error, show nothing".
IFERROR is shorter, but Microsoft points out it hides every error, not just #DIV/0!. If you made a typo that causes a different error, IFERROR hides that too. Check the formula works on good data first, then add the wrapper.
Whole numbers and remainders: QUOTIENT and MOD
Sometimes a decimal answer isn't what you want. You have 50 eggs and boxes that hold 12. =50/12 gives 4.1666..., but you want to know how many full boxes and how many eggs are left over.
=QUOTIENT(50,12)gives 4: the whole-number part of the division. The remainder is simply dropped.=MOD(50,12)gives 2: the remainder, because 4 boxes hold 48 eggs and 50 minus 48 is 2.
Both take the number first and the number you divide by second, and both work with cell references, like =QUOTIENT(B2,C2). MOD also shows #DIV/0! if you divide by zero. MOD is useful for more than eggs: =MOD(A2,2) gives 0 for even numbers and 1 for odd ones. The MOD function reference page covers it in depth.
Rounding the result: ROUND, ROUNDUP, ROUNDDOWN
Division often leaves long decimals. Split $100 between three people and =100/3 gives 33.333333... There are two very different ways to tidy that up.
Formatting (Home > Decrease Decimal, or a currency format) changes how the number looks. The cell shows $33.33, but Excel still stores 33.3333... and uses that full number in later formulas.
The ROUND functions change the value itself:
=ROUND(B2,2)rounds to 2 decimal places the normal way: 33.33. (Halfway values, like 134.125, round up to 134.13.)=ROUNDUP(B2,2)always rounds away from zero: 33.34.=ROUNDDOWN(B2,2)always rounds toward zero: 33.33.
The second number is how many decimal places to keep. Use 0 for a whole number, and a negative number to round to tens or hundreds: =ROUND(626.3,-3) gives 1000.
| A | B | C | |
|---|---|---|---|
| 1 | Share of $100 | Value shown | Added up |
| 2 | Formatted only | $33.33 | $100.00 |
| 3 | =ROUND(100/3,2) | $33.33 | $99.99 |
| 4 | =ROUNDUP(100/3,2) | $33.34 | $100.02 |
Look at the first two rows. Both show $33.33, yet three formatted shares add up to $100.00 and three rounded shares add up to $99.99. With formatting only, your sheet can look like it doesn't add up. When a rounded figure is what you'll actually pay or charge, round it with ROUND. Mac and Excel for the web have the same Decrease Decimal button on the Home tab, and the functions work identically.
Try it yourself
Download the practice workbook and open the Practice sheet. Type in the yellow cells.
- In D2 type
=B2-C2and fill it down to D4. Fuel should show -$21.20. - In B11 subtract the three bills from the paycheck with
=B7-SUM(B8:B10). You should get $825.00. - In C15 type
=B15*$E$14and fill down to C17. Wednesday should show $134.13. Then delete the dollar signs in a copy and watch it break. - In D21 type
=B21/C21and fill down to D22. Fix the Taxi row's #DIV/0! with=IFERROR(B22/C22,""). - In B26 and B27, work out full egg boxes and leftover eggs with QUOTIENT and MOD. Expect 4 and 2.
- In B31, B32 and B33, round
B30with ROUND, ROUNDUP and ROUNDDOWN to 2 places: 33.33, 33.34, 33.33.
Compare your results with the Answers sheet.
Common mistakes
- Looking for a SUBTRACT or DIVIDE function. They don't exist. Typing
=SUBTRACT(A2,B2)gives a #NAME? error. Use-and/. - Forgetting the dollar signs. Multiplying a column by one cell without
$E$1gives zeros from the second row down. - Using x or ÷. Excel only understands
*for multiply and/for divide. - Dividing the wrong way round.
=B2/C2is total divided by people.=C2/B2gives a tiny, meaningless number. - Hiding errors too early. IFERROR on a broken formula shows a blank and you never find the real problem.
- Thinking formatting rounds. Decrease Decimal only hides digits. Totals use the full value.
- Subtracting numbers stored as text. If a number came in as text from a website, the formula gives #VALUE!. Convert it as shown in Add and SUM.
What's next
You can now do all four kinds of everyday math in Excel. If you skipped it, go back to Add and SUM for totals. Next up is Percentages, which is mostly division with a percent format on top. The Excel course page lists every lesson.
Frequently asked questions
Is there a SUBTRACT or DIVIDE function in Excel?
No. Excel has no SUBTRACT function and no DIVIDE function. You subtract with the minus sign (=A2-B2) and divide with a forward slash (=A2/B2). For multiplying there's the * sign and also a PRODUCT function.
How do I subtract several cells from one cell?
Either chain the minus signs, like =B2-B3-B4-B5, or add up the cells you're taking away and subtract that total in one go: =B2-SUM(B3:B5). Both give the same answer, but the SUM version stays short when the list is long.
How do I multiply a whole column by the same number?
Put the number in its own cell (say E1), then type =B2*$E$1 in the first row and fill it down. The dollar signs keep every copy pointing at E1. Without them the copies slide down to E2, E3 and so on and give 0. Absolute and relative references explains the $ in full.
How do I get rid of #DIV/0! in Excel?
#DIV/0! means the number you're dividing by is 0 or the cell is empty. Fill in the missing number, or wrap the formula so it shows a blank instead: =IF(C2=0,"",B2/C2) or =IFERROR(B2/C2,""). IFERROR hides every kind of error, so only add it once you know the formula is right.
How do I get the remainder of a division in Excel?
Use MOD. =MOD(50,12) gives 2, because 12 goes into 50 four times with 2 left over. QUOTIENT gives the whole-number part: =QUOTIENT(50,12) is 4.
Should I use ROUND or just change the decimal places?
The Decrease Decimal button only changes what you see; the full number is still in the cell and gets used in later sums. =ROUND(B2,2) actually changes the value to two decimals. Use formatting for looks and ROUND when the rounded number must be the one Excel calculates with.