HomeMath › Subtraction Calculator

Subtraction Calculator

Subtract any two numbers — whole, decimal, or negative. You get the difference a − b, the addition check that proves it, the reversed order for comparison, and a number-line reading of what happened.

Example: with First number a (minuend) 23 · Number to subtract b (subtrahend) 4 → Difference a − b: 19.

  • Check by adding back19 + 4 = 23 ✓
  • Reversed: b − a-19 — order matters in subtraction
  • On the number lineStart at 23, move 4 left, land on 19

Computed by the calculator below using its default values. Change any input to see your own numbers.

Difference a − b
Check by adding back
Reversed: b − a
On the number line

Subtraction answers 'how far and which way': a − b is the gap from b up to a. The built-in check: difference + subtrahend must return the minuend.

The parts of a subtraction

In a − b = c, the number you start with (a) is the minuend, the number you take away (b) is the subtrahend, and the answer (c) is the difference. 23 − 4 = 19: start with 23, remove 4, and 19 remains. Unlike addition, order matters — 23 − 4 and 4 − 23 give answers that differ in sign, because subtraction measures both distance and direction on the number line.

Every subtraction carries its own proof. Since subtraction undoes addition, the difference plus the subtrahend must rebuild the minuend: 19 + 4 = 23, so the answer checks. Teachers call this the inverse-operation check, and it catches borrowing slips instantly.

Borrowing, negatives, and decimals

Column subtraction stumbles where a top digit is smaller than the one below it — that is where you regroup, trading one unit from the next column for ten in this one: 100 − 37 turns the middle 0 into 9 and the last 0 into 10, giving 63. When the subtrahend is bigger than the minuend, the answer simply goes negative: 12 − 30 = −18, a debt of 18. And subtracting a negative flips into addition — 5 − (−8) = 13 — because removing a debt is the same as gaining.

How it’s calculated

Difference = a − b, computed in double precision and cleaned to 12 significant digits so decimal artifacts vanish (5.7 − 2.9 shows 2.8, not 2.8000000000000003). Check row: (a − b) + b = a. Reversed row: b − a = −(a − b). Number-line row: subtracting a positive b moves left by b; subtracting a negative moves right.

Exact for numbers within 15-16 significant digits; beyond about 9 × 10¹⁵ the floating-point format itself rounds whole numbers.

Subtraction in every flavor

ProblemAnswerWhat happened
23 − 419plain take-away
100 − 3763two borrows across zeros
5.7 − 2.92.8decimal with a carry
12 − 30−18result goes negative
5 − (−8)13minus a negative adds

Computed with a − b; the last row uses the identity a − (−b) = a + b.

Common mistakes

  • Swapping the order: subtraction is not commutative, so 4 − 23 = −19, not 19. The number you start with goes first.
  • Borrowing across zeros incorrectly — in 100 − 37, the middle digit becomes 9 (not 10) after lending to the ones place.
  • Dropping the sign when the subtrahend is larger: 12 − 30 is −18, and quietly writing 18 reverses the meaning.
  • Treating 5 − (−8) as 5 − 8: two signs in a row flip to addition, giving 13, not −3.

Frequently asked questions

What are the minuend, subtrahend, and difference?

In a − b = c: a is the minuend (what you start with), b is the subtrahend (what you remove), c is the difference. In 23 − 4 = 19 they are 23, 4, and 19.

How do I check a subtraction answer?

Add the difference back to the subtrahend; you must recover the minuend. 19 + 4 = 23 confirms 23 − 4 = 19. This works because subtraction and addition are inverse operations.

What is 23 minus 4?

19. Start at 23 on the number line and step 4 to the left. The check: 19 + 4 returns you to 23.

Why does subtracting a negative number add?

Subtraction means removing. Removing a debt of 8 leaves you 8 richer, so 5 − (−8) = 5 + 8 = 13. Algebraically, a − (−b) = a + b.

Does order matter in subtraction?

Yes. a − b and b − a are negatives of each other: 23 − 4 = 19 but 4 − 23 = −19. Same distance on the number line, opposite direction.