Skip to main content
Mathovia

Math / Arithmetic & Integers

Integer Calculator (Step by Step)

Enter two integers and pick an operation. The calculator gives the answer, rewrites the problem the way you'd actually work it, names the sign rule it used, and lists each step underneath, with a number line for addition and subtraction.

Answer
-5
Worked as
-8 + 3
Sign rule used
Add the opposite. Different signs: subtract, keep the sign of the larger
-9-8-7-6-5-4-3-2-101+3-5
  1. Rewrite subtraction as adding the opposite (keep, change, change): -8 − (-3) = -8 + 3.
  2. The signs are different, so subtract the smaller absolute value from the larger: 8 − 3 = 5.
  3. -8 has the larger absolute value, so the answer takes its sign: -5.
  4. On a number line: start at -8 and move 3 to the right to land on -5.
  5. Answer: -8 − (-3) = -5.

Subtraction is rewritten as adding the opposite, then the addition sign rules apply. For multiplication and division, work with the absolute values and then attach the sign: same signs give a positive, different signs give a negative.

Written by
MPhil in Mathematics, Founder of Mathovia
Published

Mathematics verification: Mathematical formulas, calculations, worked examples and solutions are reviewed for accuracy before publication. How we check our work

Negative numbers are where a lot of people’s confidence with arithmetic quietly falls apart. The operations aren’t any harder, but the signs follow rules that feel arbitrary until you’ve seen why they work. This calculator handles any pair of integers and shows its reasoning, so you can check homework, see where an answer went wrong, or just trust a bank balance that dipped below zero.

Integer rules: a minus b equals a plus negative b; negative a times negative b equals a b; negative a times b equals negative a b
The integer sign rules

The integer rules in one place

Every integer problem uses one of a handful of rules. Subtraction gets converted into addition first, so in practice you only need two sets: one for adding and one for multiplying or dividing.

OperationSignsWhat to doExample
AddsameAdd the absolute values, keep the sign-8 + (-3) = -11
AdddifferentSubtract the absolute values, take the sign of the larger one5 + (-12) = -7
SubtractanyAdd the opposite, then use the addition rules-8 - (-3) = -8 + 3 = -5
MultiplysamePositive(-7) × (-6) = 42
MultiplydifferentNegative(-7) × 6 = -42
DividesamePositive(-24) ÷ (-6) = 4
DividedifferentNegative(-24) ÷ 6 = -4

The absolute value is just the distance from zero, with the sign stripped off. The absolute value of -8 is 8, and the absolute value of 8 is 8 too.

How to subtract integers (step by step)

The calculator opens on the problem that trips up the most students: -8 - (-3). Two minus signs in a row look like they should cancel into something negative, and they don’t.

Step One: Rewrite the subtraction as adding the opposite

Teachers call this “keep, change, change”. Keep the first number, change the operation to addition, and change the sign of the second number.

a − b = a + (−b)
-8 − (-3) = -8 + 3

Step Two: Compare the signs

-8 is negative and 3 is positive. Different signs mean you’re really finding the distance between two absolute values.

different signs → subtract the absolute values
8 − 3 = 5

Step Three: Give the answer the sign of the larger absolute value

8 is bigger than 3, and the 8 came from -8, so the answer is negative.

-8 − (-3) = -5

On a number line, you start at -8 and move 3 to the right, which lands you on -5. That’s the picture the calculator draws under the result, and it’s a quick sanity check. Adding a positive always moves right, adding a negative always moves left.

Keep, change, change applied to -8 minus negative 3: it becomes -8 plus 3, and since 8 is the larger absolute value and negative, the answer is -5
A visual read of the worked example above — the same numbers the calculator returns for its default inputs.

Adding integers with the same or different signs

With the same signs, nothing tricky happens. Add the sizes and keep the sign. Two debts of $8 and $3 make a debt of $11, so -8 + (-3) = -11.

-8 + (-3):  same signs → 8 + 3 = 11 → keep the minus → -11

With different signs, the two numbers pull in opposite directions, and the stronger one wins. Have $5 and owe $12 and you’re $7 short.

5 + (-12):  different signs → 12 − 5 = 7 → 12 is larger, so negative → -7

When the absolute values match, the numbers are opposites and cancel to zero: -15 + 15 = 0.

Multiplying and dividing integers

These are easier than they look, because the size and the sign are separate questions. First do the arithmetic as though both numbers were positive. Then count the negative signs.

(-7) × (-6):  7 × 6 = 42 → two negatives (same signs) → +42
(-24) ÷ 6:    24 ÷ 6 = 4 → one negative (different signs) → -4

This extends to long chains. An even number of negative factors gives a positive product, and an odd number gives a negative one. So (-2) × (-3) × (-1) = -6, since three negatives is odd.

Division has one wrinkle that multiplication doesn’t. Two integers don’t always divide evenly. -7 ÷ 2 is -3.5, and -7 ÷ (-3) is 7/3, a repeating decimal (about 2.3333). The calculator tells you when this happens, simplifies the fraction, and shows the remainder, since some textbooks want the answer as “2 remainder 1” instead. If you need to tidy up a fraction result further, the fraction simplifier does the reducing step on its own.

Why a negative times a negative is positive

This is the rule people most often memorise without believing. Here’s the cleanest argument. Look at a pattern where one factor drops by 1 each line:

3 × (-4) = -12
2 × (-4) = -8
1 × (-4) = -4
0 × (-4) =  0
(-1) × (-4) = ?

Each time the first number goes down by one, the answer goes up by 4. Continuing the pattern, the next line has to be +4. Any other answer would break the pattern, and with it the distributive law that the rest of algebra depends on.

Where integers show up outside class

Temperatures are the classic case. If it’s -8°F at dawn and warms by 15 degrees, it’s 7°F, which is -8 + 15. Bank accounts, golf scores, elevations below sea level and yardage lost in football all work the same way. Any time a quantity can fall below a starting line, you’re doing integer arithmetic, whether or not you call it that.

Negative numbers and exponents

Exponents add one more trap, and it’s about brackets rather than sign rules:

(−3)² = (−3) × (−3) = 9
−3²   = −(3 × 3)    = −9

Without brackets, the exponent applies only to the 3, and the minus sign is applied afterwards. The same logic explains why an even power of a negative number is positive and an odd power is negative: (−2)³ = −8, but (−2)⁴ = 16, since each pair of negatives multiplies to a positive.

Common mistakes with integers

  1. Treating “minus a negative” as negative. -8 - (-3) is -5, not -11. Rewrite it as addition before you do anything else.
  2. Taking the sign from the first number. In 5 + (-12) the answer is negative because 12 is the larger absolute value, even though 5 comes first.
  3. Applying the multiplication rule to addition. “Two negatives make a positive” is about multiplying and dividing. -8 + (-3) is still negative.
  4. Dropping the parentheses. Writing -8 - -3 is easy to misread. Keep negative numbers in parentheses after an operator.
  5. Forgetting order of operations in longer problems. This calculator handles one operation at a time. For a chain like -3 + 4 × (-2), multiply first, then add. The numbers and operations guide covers the full order.

Once the rules feel natural, speed comes from repetition. The integer problem generator makes fresh practice problems with mixed signs and checks your answers.

About the formula: Subtraction is rewritten as adding the opposite, then the addition sign rules apply. For multiplication and division, work with the absolute values and then attach the sign: same signs give a positive, different signs give a negative.

Frequently Asked Questions

What is the rule for subtracting integers?+

Add the opposite. Keep the first number, change the minus to a plus, and change the sign of the second number, so -8 - (-3) becomes -8 + 3 = -5. Then follow the addition rules.

What is a negative minus a negative?+

It turns into a negative plus a positive. -8 - (-3) = -8 + 3 = -5, and -3 - (-9) = -3 + 9 = 6. The answer can be positive or negative depending on which absolute value is larger.

Why is a negative times a negative positive?+

Multiplying by -1 flips a number to the other side of zero. Doing it twice flips it back, so (-7) × (-6) is the same as flipping 42 twice, which lands on +42. It's also the only rule that keeps the distributive property working for negative numbers.

What happens when you divide integers that don't divide evenly?+

The answer isn't an integer anymore. -7 ÷ 2 = -3.5, and -7 ÷ (-3) = 7/3, about 2.3333. The calculator shows a terminating decimal when there is one, and otherwise the simplified fraction with its decimal approximation.

Is zero positive or negative?+

Neither. Zero is an integer with no sign, which is why 0 × (-4) = 0 and not -0. Adding zero to a number leaves it unchanged.

What is the answer when you add two negative integers?+

Always a negative number. Add the absolute values and keep the minus sign: -8 + (-3) = -11.

Can I divide by zero?+

No. Division by zero is undefined, because no number times 0 can give a non-zero result. The calculator shows an error if you try.

Learn and practice this topic

Related calculators