Long Subtraction Calculator
Test cases replayed : 3 of 3 match · Methodology · No outside source listed
Enter two whole numbers of up to 12 digits to get the difference and each borrow.
Result
Difference
The ones column borrows from the tens column
- The tens column borrows from the hundreds column
- The hundreds column borrows from the thousands column
- The thousands column borrows from the ten thousands column
- The ten thousands column borrows from the hundred thousands column
- The hundred thousands column borrows from the millions column
- Total number of borrows
Estimate for planning only, not tax, legal, financial or medical advice. This calculator uses the method explained on this page.
This browser did not allow copying. The sentence is in the box below, already selected: copy it with your keyboard or the menu.
How to use this calculator
Fill in the fields in this order; each step takes you to its field.
- First number (whole, 0 or more): enter 0 or more.
- Number to subtract (whole, 0 or more): enter 0 or more.
- Read the result: Difference; the panel also shows The ones column borrows from the tens column, The tens column borrows from the hundreds column, The hundreds column borrows from the thousands column, The thousands column borrows from the ten thousands column, The ten thousands column borrows from the hundred thousands column, The hundred thousands column borrows from the millions column and Total number of borrows.
How this calculator works
Long subtraction takes the bottom number from the top one column by column, from right to left. When the top digit is too small, 1 is borrowed from the next column to the left, which turns the top digit into itself plus 10 (regrouping).
Column k − 1 borrows from column k exactly when the number formed by the last k digits of the top number is smaller than that of the bottom number. When the first number is the smaller one, the calculator subtracts the smaller from the larger and makes the result negative, as done on paper.
The formula
| Symbol | Meaning |
|---|---|
| First number (whole, 0 or more) | |
| Number to subtract (whole, 0 or more) | |
| Difference |
Worked example
| First number (whole, 0 or more) | 5,002 |
|---|---|
| Number to subtract (whole, 0 or more) | 1,867 |
| The ones column borrows from the tens column | 1 |
|---|---|
| The tens column borrows from the hundreds column | 1 |
| The hundreds column borrows from the thousands column | 1 |
| The thousands column borrows from the ten thousands column | 0 |
| Total number of borrows | 3 |
Difference 3,135
Each step uses the unrounded value of the step before it; figures on this page are rounded for display.
Frequently asked questions
How do I subtract 1,867 from 5,002?
The ones, tens and hundreds each need a borrow (three borrows), and the difference is 3,135.
What is borrowing in subtraction?
Taking 1 from the next column to the left and adding 10 to the current top digit so the subtraction in that column can be done.