Calculate with Long Subtraction
Your result will appear here.
Formula and variables
- a
- the minuend
- b
- the subtrahend
- d
- the difference
Align place values and subtract from right to left. When a top digit is too small, regroup one unit from the place to its left as ten units in the current place.
Domain note: Enter two non-negative whole numbers containing up to 30 digits each. A smaller minuend is allowed and produces a negative difference.
How to use this calculator
- 1
Enter the minuend and subtrahend.
- 2
Align the values by their ones digits.
- 3
Subtract each column from right to left, borrowing across places when necessary.
- 4
Apply a negative sign when the original minuend is smaller.
A complete example
Problem: Subtract 3,768 from 8,002.
Substitution: 8002 − 3768
Result: 8002 − 3768 = 4234
Regrouping across the zeros gives an exact difference of 4,234.
Understand the result
Each step reports the working top digit after any incoming borrow and whether another unit must be regrouped from the next place.
Common mistakes
- Failing to carry a borrow through consecutive zeros.
- Reversing the original inputs when the answer should be negative.
- Misaligning digits with different place values.
Frequently asked questions
What happens when the minuend is smaller?
The calculator subtracts the magnitudes in the workable order and then attaches a negative sign to the exact difference.
How does borrowing across a zero work?
The borrow continues leftward until a nonzero place can be regrouped; each intervening zero effectively becomes 9 for its subtraction step.
Can I enter decimal numbers?
No. This tool demonstrates the whole-number long-subtraction algorithm. Use the regular Subtraction Calculator for decimals.