TExcelTAD
Home › Basic Math & Pre-Algebra › Subtraction

Subtraction

Subtraction finds what is left when you take an amount away, or how far apart two numbers are. It undoes addition, which gives you a free way to check every answer, and its column method uses borrowing, the mirror image of carrying.

Words and symbols

In 52−17=3552 - 17 = 35, the number you start from (52) is the minuend, the number taken away (17) is the subtrahend, and the result (35) is the difference. You can read subtraction two ways:

  • Take away: you had 52 stickers and gave away 17, so 35 are left.
  • Difference (compare): 52 is 35 more than 17. On the number line, 35 is the distance from 17 to 52.

Subtraction undoes addition

Subtraction and addition are inverse operations: one undoes the other.

52−17=35because35+17=5252 - 17 = 35 \quad\text{because}\quad 35 + 17 = 52

This is the best habit in arithmetic: check a subtraction by adding the answer back. If you get the minuend, the answer is right.

Unlike addition, order matters. 52−1752 - 17 is 35, but 17−5217 - 52 is −35-35, a negative number (see Signed Numbers). Grouping matters too: (10−4)−3=3(10 - 4) - 3 = 3, but 10−(4−3)=910 - (4 - 3) = 9. Subtraction is neither commutative nor associative.

python · try it yourself
a, b = 52, 17
d = a - b
print("difference:", d)
print("check by adding:", d + b == a)
print("reversed order:", b - a)
print((10 - 4) - 3, 10 - (4 - 3))
difference: 35
check by adding: True
reversed order: -35
3 9

Column subtraction with borrowing

Line the numbers up by place value and subtract column by column from the right. When the top digit is smaller than the bottom digit, borrow: take 1 from the next column to the left, which is worth 10 in the current column.

text
     6 ¹3 ¹2          (after borrowing)
     7  4  2
   − 2  8  6
   ---------
     4  5  6

ones:     2 < 6, borrow from the tens: 12 − 6 = 6   (tens digit 4 becomes 3)
tens:     3 < 8, borrow from the hundreds: 13 − 8 = 5 (hundreds 7 becomes 6)
hundreds: 6 − 2 = 4
check:    456 + 286 = 742 ✓

Zeros make borrowing look harder, because you have to borrow across them: in 400−137400 - 137, the ones borrow from the tens, which first borrow from the hundreds. 400 becomes 3 hundreds, 9 tens and 10 ones, and then 10−7=310 - 7 = 3, 9−3=69 - 3 = 6, 3−1=23 - 1 = 2, giving 263.

Here is the algorithm in code, printing every borrow:

python · try it yourself
def column_subtract(a, b):          # assumes a >= b >= 0
    da = [int(c) for c in str(a)][::-1]
    db = [int(c) for c in str(b)][::-1] + [0] * (len(str(a)) - len(str(b)))
    out, borrow = [], 0
    for i, (x, y) in enumerate(zip(da, db)):
        x -= borrow
        if x < y:
            x += 10
            borrow = 1
        else:
            borrow = 0
        out.append(x - y)
        print(f"column {i}: {x} - {y} = {x - y}" + ("  (borrowed)" if borrow else ""))
    return int("".join(map(str, reversed(out))))

print("742 - 286 =", column_subtract(742, 286))
column 0: 12 - 6 = 6  (borrowed)
column 1: 13 - 8 = 5  (borrowed)
column 2: 6 - 2 = 4
742 - 286 = 456

Mental subtraction tricks

  • Count up (shopkeeper's method): 1000−3681000 - 368. From 368, +2→370+2 \to 370, +30→400+30 \to 400, +600→1000+600 \to 1000. Total climbed: 632.
  • Round and adjust: 85−29=85−30+1=5685 - 29 = 85 - 30 + 1 = 56. (Taking away 30 took away one too many, so give it back.)
  • Shift both numbers: the difference doesn't change if you add the same amount to both. 503−198=505−200=305503 - 198 = 505 - 200 = 305.

The last trick is how you dodge borrowing entirely.

Differences in data

Subtracting neighbours in a list shows how much something changed each step. Programmers call these deltas:

python · try it yourself
balance = [120, 95, 140, 140, 88]      # account balance at the end of each day
changes = [balance[i] - balance[i - 1] for i in range(1, len(balance))]
print("daily change:", changes)
print("total change:", balance[-1] - balance[0], "=", sum(changes))
daily change: [-25, 45, 0, -52]
total change: -32 = -32

The daily changes always add up to "last minus first": everything in between cancels.

In software

  • Elapsed time: a game measures the time since the last frame as now - previous (often called dt) and moves objects by speed×dt\text{speed} \times dt.
  • Distances and sizes: the width of a box on screen is right - left; the number of items from index i up to (not including) j is j - i.
  • Diffs and change detection: version control, stock charts and sensor dashboards are built on differences between successive values.
  • Unsigned integers: in languages like C or Rust, subtracting a bigger unsigned number from a smaller one does not give a negative answer. It wraps around or crashes; see Integer Overflow.

Exercises

Exercise 1: Borrowing

Compute 6 050−2 3866\,050 - 2\,386 by hand and check by adding.

Answer

3 664

Solution
text
ones:      0 < 6, borrow from tens (tens 5 → 4): 10 − 6 = 4
tens:      4 < 8, borrow from hundreds (0 → borrow from thousands: 6 → 5, hundreds become 10, then 9): 14 − 8 = 6
hundreds:  9 − 3 = 6
thousands: 5 − 2 = 3
result 3 664;  check 3 664 + 2 386 = 6 050 ✓

Exercise 2: Count up

Find 2 000−1 2472\,000 - 1\,247 by counting up.

Answer

753

Solution

1 247→1 250 (+3)→1 300 (+50)→2 000 (+700)1\,247 \to 1\,250\ (+3) \to 1\,300\ (+50) \to 2\,000\ (+700). Total climbed: 3+50+700=7533 + 50 + 700 = 753.

Exercise 3: Shift both numbers

Rewrite 712−397712 - 397 as an easier subtraction with the same answer, then solve it.

Answer

715−400=315715 - 400 = 315

Solution

Add 3 to both numbers so the subtrahend becomes a round 400: 712+3=715712 + 3 = 715 and 397+3=400397 + 3 = 400. The difference is unchanged: 715−400=315715 - 400 = 315.

Exercise 4: Biggest drop

Temperatures at noon for a week were 18, 21, 17, 12, 15, 15, 9. Write code that finds the day-to-day changes and the biggest single drop.

Answer

Changes: 3, −4, −5, 3, 0, −6. The biggest drop is 6 degrees (from 15 to 9).

Solution

The biggest drop is the most negative change, so take min of the changes.

python · try it yourself
temps = [18, 21, 17, 12, 15, 15, 9]
changes = [temps[i] - temps[i - 1] for i in range(1, len(temps))]
print(changes)
print("biggest drop:", -min(changes))
[3, -4, -5, 3, 0, -6]
biggest drop: 6

Test yourself

How do you check that 903−458=445903 - 458 = 445 is correct?

  1. Check that 445−458=903445 - 458 = 903
  2. Check that 445+458=903445 + 458 = 903
  3. Check that 903+458=445903 + 458 = 445
  4. Subtraction cannot be checked

What is 300−164300 - 164?

  1. 136
  2. 146
  3. 264
  4. 164

Which is true?

  1. a−b=b−aa - b = b - a for all numbers
  2. (a−b)−c=a−(b−c)(a - b) - c = a - (b - c) for all numbers
  3. Adding the same number to aa and bb leaves a−ba - b unchanged
  4. Subtraction never gives a negative number