Adding and Subtracting Integers Calculator

Add or subtract two integers, see which sign rule applies at each step, and watch the move on a number line.

Rewritten as addition
−8 + 13
Absolute value of result
5
Direction on number line
Right 13
−8 − (−13) =5

Show the work

  1. Subtracting a number is the same as adding its opposite: −8 − (−13) = −8 + 13. (Keep, change, change.)
  2. The signs are different, so subtract the smaller absolute value from the larger: 13 − 8 = 5.
  3. Take the sign of the number with the larger absolute value (13): 5.
  4. On the number line: start at −8 and move 13 units to the right, landing on 5.
−9−8−7−6−5−4−3−2−10123456+13start −8end 5

Integers are the whole numbers and their negatives: …, −3, −2, −1, 0, 1, 2, 3, …. Adding and subtracting them takes just two sign rules, and once subtraction is rewritten as addition, everything else follows. This calculator shows which rule applies, works through it, and draws the move on a number line.

How to use the integers calculator

  1. Enter the first integer. Use a minus sign for negatives, for example −8.
  2. Choose Add or Subtract.
  3. Enter the second integer.
  4. The tape shows the answer, the problem rewritten as an addition, and the direction you move on the number line. The steps explain the sign rule, and the diagram shows the start point, the jump and where you land.

The sign rules

Same signs: add and keep the sign

If both numbers are positive or both are negative, add their absolute values and give the answer their shared sign.

(−6) + (−9) = −(6 + 9) = −15

Different signs: subtract and take the sign of the larger

If one number is positive and the other negative, subtract the smaller absolute value from the larger, then use the sign of the number that is farther from zero.

7 + (−12) → 12 − 7 = 5 → −5

Subtraction: add the opposite

Every subtraction can be rewritten as an addition: a − b = a + (−b). This is the “keep, change, change” rule. After rewriting, apply one of the two rules above.

Worked example: −8 − (−13)

  1. Keep −8, change the subtraction to addition, change −13 to +13: −8 + 13.
  2. The signs are different, so subtract the absolute values: 13 − 8 = 5.
  3. 13 is farther from zero than −8, and it is positive, so the answer is 5.
  4. On the number line: start at −8 and jump 13 units to the right, landing on 5.

Thinking with a number line

On a horizontal number line, adding a positive number moves you to the right and adding a negative number moves you to the left. Subtracting reverses the direction, which is why subtracting a negative moves you right. A few everyday versions:

Situation Integer problem Result
Temperature of −4 °F rises 10 degrees −4 + 10 6 °F
$25 in the bank, a $40 charge 25 + (−40) −$15 (overdrawn)
Elevation 30 ft below sea level, climb 12 ft −30 + 12 −18 ft
Difference between 5 °F and −7 °F 5 − (−7) 12 degrees

Common mistakes

  • Dropping the second sign change. In 6 − (−2), only changing the operation gives 6 + (−2) = 4; the correct answer is 6 + 2 = 8.
  • Taking the wrong sign. In −15 + 9, the larger absolute value belongs to −15, so the answer is −6, not 6.
  • Confusing the absolute value with the number. The absolute value is the distance from zero, so |−15| = 15. The absolute value calculator covers this in detail.

When problems mix several operations, apply these sign rules inside the order of operations, working left to right through additions and subtractions.

Frequently asked questions

What is the rule for adding a positive and a negative integer?

Subtract the smaller absolute value from the larger one and keep the sign of the number with the larger absolute value. For example, 7 + (−12): 12 − 7 = 5, and −12 has the larger absolute value, so the answer is −5.

How do you subtract a negative number?

Subtracting a negative is the same as adding its opposite, so the two minus signs become a plus: 4 − (−9) = 4 + 9 = 13. This is often remembered as keep, change, change.

What does keep, change, change mean?

Keep the first number, change subtraction to addition, and change the sign of the second number. Then follow the addition rules. For −8 − (−13) you get −8 + 13 = 5.

Is the sum of two negative integers always negative?

Yes. When both numbers are negative, add their absolute values and keep the negative sign: −6 + (−9) = −15. On a number line you start left of zero and move even further left.

Last reviewed October 2026 by the CalcFluent editorial team. How we check our calculators.