Long Addition and Subtraction Calculator

Adding integers

Column addition works place by place. Consider non-negative integers.

  1. Write the numbers one below the other, aligning ones, tens, hundreds and other matching places.
  2. Start on the right. Add the digits in the current column. If the sum is less than 10, write it below the line.
  3. If the sum is at least 10, write its ones digit and carry 1 to the next column on the left.
  4. Repeat, including any carry. Write a final carry in a new column on the left.

Subtracting integers

Consider subtraction of non-negative integers. If the first number is smaller, subtract the smaller magnitude from the larger and attach a minus sign.

  1. Write the numbers one below the other, aligning matching places.
  2. Start on the right. If the upper digit is at least the lower digit, subtract and write the result.
  3. Otherwise borrow one unit from the nearest nonzero place on the left. It becomes ten units in the next place; when crossing zeros, pass one unit onward, leaving 9.
  4. Subtract the lower digit from the updated upper digit. Continue to the last column.