Skip to content
School

Integer Calculator

This integer calculator with steps adds, subtracts, multiplies, and divides positive and negative whole numbers and shows the absolute values, the sign rule, and the arithmetic.

A whole number, positive or negative. Decimals are not integers.

A whole number, positive or negative.

Add, subtract, multiply, or divide.

Result

12 + (−5) = 7

  1. Absolute values: |12| = 12 and |−5| = 5.
  2. Sign rule: the signs are different, so subtract the smaller absolute value from the larger and keep the sign of the number with the larger absolute value.
  3. Arithmetic: 12 − 5 = 7. Because |12| is larger, the result is 7.

Steps show the absolute values, the sign rule, then the arithmetic. Division by zero is undefined. The math stays in your browser.

How to use

  1. Enter integer A and integer B. Use a minus sign for a negative number. Decimals are rejected.
  2. Choose add, subtract, multiply, or divide.
  3. Read the result. The steps list the absolute values, the sign rule, and then the arithmetic.
  4. Division by zero shows an error instead of a number. Nothing is uploaded.

How it works

Addition uses absolute values. Same signs: add the absolute values and keep the sign. Different signs: subtract the smaller absolute value from the larger and keep the sign of the larger absolute value. Subtraction is addition of the opposite. Multiplication and division use the absolute values, then the sign rule: same signs give a positive result and different signs give a negative result. Division by zero is undefined.

Example. 12 + (−5) = 7. The absolute values are 12 and 5. The signs differ, so 12 − 5 = 7 and the result stays positive.

Example. −7 + 3 = −4. The absolute values are 7 and 3, and −7 has the larger absolute value.

Example. 12 × (−5) = −60 because different signs make the product negative. 12 ÷ (−4) = −3. 12 ÷ 0 is undefined.

Frequently asked questions

What is an integer?

A whole number with no fraction: …, −2, −1, 0, 1, 2, …. Decimals and fractions are not integers.

How do you add integers with different signs?

Subtract the smaller absolute value from the larger, and keep the sign of the number with the larger absolute value. −7 + 3 = −4.

How do you multiply or divide integers?

Multiply or divide the absolute values, then apply the sign rule: same signs give a positive result; different signs give a negative result.

What about dividing by zero?

Division by zero is undefined. The calculator shows an error instead of a number.

Is this the same as long division?

No. This page is for integer add/subtract/multiply/divide with sign steps. A long-division page walks through the long-division algorithm for larger dividends.

Is my data uploaded?

No. Numbers stay in your browser.