Long Addition and Subtraction Calculator

Add or subtract two numbers in columns, from the right.

A whole number or a decimal.

A whole number or a decimal.

Try

Result

You entered1789−50021789 - 5002

−3213\displaystyle -3213
Show the work
  1. Swap and make the answer negative

    The first number is smaller than the second, so the answer is below 0. Column subtraction needs the larger number on top, so subtract the smaller from the larger and give the answer a minus sign.

    1789−5002=−(5002−1789)1789 - 5002 = -\left(5002 - 1789\right)
  2. Column subtraction

    Write the larger number on top with the place values lined up, then subtract one column at a time from the right. When the top digit is too small, borrow 1 from the next column to the left: that adds 10 to this column (the small 1) and takes 1 from its neighbour.

    1115002−17893213\begin{array}{ccccc} & & \scriptstyle 1 & \scriptstyle 1 & \scriptstyle 1 \\ & 5 & 0 & 0 & 2 \\ - & 1 & 7 & 8 & 9 \\ \hline & 3 & 2 & 1 & 3 \end{array}
  3. Borrow in the ones column

    In the ones column the top digit 2 is too small to take away 9. Borrow 10 from the next column, which makes 12, and take away 9.

    10+2−9=310 + 2 - 9 = 3
  4. Borrow in the tens column

    In the tens column the top digit 0, after lending 1 to the column on its right, is too small to take away 8. Borrow 10 from the next column, which makes 9, and take away 8.

    10+(0−1)−8=110 + \left(0 - 1\right) - 8 = 1
  5. Borrow in the hundreds column

    In the hundreds column the top digit 0, after lending 1 to the column on its right, is too small to take away 7. Borrow 10 from the next column, which makes 9, and take away 7.

    10+(0−1)−7=210 + \left(0 - 1\right) - 7 = 2
  6. Result

    So 1789−5002=−32131789 - 5002 = -3213.

Worked examples