Free Mathematics tool

Long Subtraction Calculator

Subtract large whole numbers exactly and inspect every place-value subtraction and borrow.

Calculator

Calculate with Long Subtraction

Enter non-negative whole numbers containing no more than 30 digits. A smaller minuend produces a negative result.

Difference

Your result will appear here.

Formula

Formula and variables

a−b=da - b = d
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 it works

How to use this calculator

  1. 1

    Enter the minuend and subtrahend.

  2. 2

    Align the values by their ones digits.

  3. 3

    Subtract each column from right to left, borrowing across places when necessary.

  4. 4

    Apply a negative sign when the original minuend is smaller.

Worked examples

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.

Interpretation

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.
FAQ

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.

References

References & technical sources

Keep calculating

Related calculators