🧮
🧮 Math & statistics

Integer Calculator (add, subtract, multiply & divide with negative numbers)

Results update as you type.

Your numbers

Understanding the integer calculator — concept and principle

This calculator adds, subtracts, multiplies and divides integers, including negative numbers, and explains the sign rule it used. It rewrites subtraction as adding the opposite, shows the absolute values, and gives a decimal or whole-number quotient and remainder for division. Use it for pre-algebra practice and checking homework with negative numbers.

Integer arithmetic−12 − (−5)−14−12−10−8−6−4−20+5−7subtracting −5 = adding +5: −12 + 512 − 5 = 7, sign of −12 → −7
Subtracting a negative moves right on the number line.

How it is calculated

The principle

Integers extend the counting numbers with their opposites, like positions on a number line with zero in the middle. Adding a positive number moves right; adding a negative moves left. Subtracting a number is the same as adding its opposite, so taking away a debt (subtracting a negative) increases your balance. The sign rules for multiplication follow from keeping the distributive law true: since −1 × (1 + (−1)) = 0, the product (−1)(−1) must be +1.

Worked example

Default inputs: a = −12, subtract, b = −5.

  1. Problem: −12 − (−5) = −7.
  2. Rewritten: −12 + 5 (adding the opposite).
  3. Absolute values: 12, 5.
  4. Sign rule used: different signs: subtract the absolute values and keep the sign of the larger one: 12 − 5 = 7, sign of −12, so −7.
How Result changes with First integer aHow Result changes with First integer a05101520-3-6-9-12-15-18-24Example: −7First integer a
Each point is the calculator re-run with only “First integer a” changed; the gold point is the default example. Change the inputs above and this chart follows your numbers.
First integer aResult
-32
-6−1
-9−4
-12−7
-15−10
-18−13
-24−19

How to read the result

On a number line, start at −12 and move 5 to the right: you land on −7. A quick sense check: subtracting a negative number always makes the result larger than the first number, and here −7 > −12, as expected.

Common mistakes

Keep in mind: Division of integers may not give a whole number; the page shows a decimal and a quotient with remainder when they apply.

Frequently asked questions

What is −12 − (−5)?

−7, because subtracting −5 is the same as adding 5.

Why is a negative times a negative positive?

It keeps the distributive law consistent for all numbers.

What is −12 + (−5)?

−17: same signs, so add 12 + 5 and keep the minus sign.

Sources: OpenStax, Prealgebra 2e (2020), Chapter 3 Integers

Checked 9 Nov 2026. OpenStax, Prealgebra 2e (2020), Chapter 3 Integers — §3.1 Introduction to Integers (opposites, absolute value), §3.2 Add Integers, §3.3 Subtract Integers (a − b = a + (−b)) and §3.4 Multiply and Divide Integers (same signs give a positive result, different signs a negative one).

🧮 All math & statistics tools →🌍 Calculators by country →