acalculator

How do I add or multiply integers?

Type two integers and pick an operation. The integer calculator gives the exact answer and says which sign rule it used.

Your numbers

Operation
Result
−3

−8 + 5 = −3.

Problem
−8 + 5 = −3
Sign rule
different signs: subtract 8 − 5 = 3 and take the sign of −8: −3

Result: −3. −8 + 5 = −3.

How to calculate

Adds, subtracts, multiplies or divides positive and negative integers of any size, exactly, and explains the sign rule for each step.

Example with the default inputs (First integer -8, Operation +, Second integer 5): −8 + 5 = −3.

Method: Addition: same signs, add the absolute values and keep the sign; different signs, subtract the smaller absolute value from the larger and take the sign of the larger. Subtraction: a − b = a + (−b). Multiplication and division: same signs give a positive answer, different signs a negative one.

  • Integers can have any number of digits; the arithmetic is exact.
  • A quotient that is not a whole number is shown as a fraction in lowest terms and as a decimal to 10 significant figures. Dividing by 0 has no answer.

Machine-readable copies: Markdown, JSON.

Worked examples

Each example is checked against the calculator on every build.

  1. First integer -8, Operation +, Second integer 5 gives Result −3, Problem −8 + 5 = −3, Sign rule different signs: subtract 8 − 5 = 3 and take the sign of −8: −3.Source: OpenStax, Prealgebra 2e, §3.2 Add Integers (same signs: add and keep the sign; different signs: subtract, take the sign of the larger absolute value), https://openstax.org/books/prealgebra-2e/pages/3-2-add-integers (retrieved 2026-10-05)
  2. First integer -7, Operation +, Second integer -4 gives Result −11, Sign rule same signs: add 7 + 4 = 11 and keep the sign: −11.Source: OpenStax, Prealgebra 2e, §3.2 Add Integers (same signs: add and keep the sign; different signs: subtract, take the sign of the larger absolute value), https://openstax.org/books/prealgebra-2e/pages/3-2-add-integers (retrieved 2026-10-05)
  3. First integer 3, Operation −, Second integer -6 gives Result 9, Problem 3 − (−6) = 9.Source: OpenStax, Prealgebra 2e, §3.3 Subtract Integers (a − b = a + (−b)), https://openstax.org/books/prealgebra-2e/pages/3-3-subtract-integers (retrieved 2026-10-05)
  4. First integer -9, Operation ×, Second integer -4 gives Result 36, Sign rule same signs, so the answer is positive: 9 × 4 = 36, so 36.Source: OpenStax, Prealgebra 2e, §3.4 Multiply and Divide Integers (same signs give a positive, different signs a negative), https://openstax.org/books/prealgebra-2e/pages/3-4-multiply-and-divide-integers (retrieved 2026-10-05)
  5. First integer -63, Operation ÷, Second integer 7 gives Result −9, Decimal −9.Source: OpenStax, Prealgebra 2e, §3.4 Multiply and Divide Integers (same signs give a positive, different signs a negative), https://openstax.org/books/prealgebra-2e/pages/3-4-multiply-and-divide-integers (retrieved 2026-10-05)
  6. First integer 10, Operation ÷, Second integer -4 gives Result −5/2, Decimal −2.5.Source: OpenStax, Prealgebra 2e, §3.4 Multiply and Divide Integers (same signs give a positive, different signs a negative), https://openstax.org/books/prealgebra-2e/pages/3-4-multiply-and-divide-integers (retrieved 2026-10-05)
  7. First integer 123456789012345678901234567890, Operation ×, Second integer -2 gives Result −246913578024691357802469135780.Source: OpenStax, Prealgebra 2e, §3.4 Multiply and Divide Integers (same signs give a positive, different signs a negative), https://openstax.org/books/prealgebra-2e/pages/3-4-multiply-and-divide-integers (retrieved 2026-10-05)

How it works

The two integers a and b can have any number of digits. The arithmetic is exact.

  • Add, a + b. If either is 0, the sum is the other number. Same signs: add |a| + |b| and keep the sign. Different signs: subtract the smaller absolute value from the larger and take the sign of the number with the larger absolute value; opposites (|a| = |b|) add to 0.
  • Subtract, a − b = a + (−b), then the addition rule.
  • Multiply, a × b. Same signs give a positive product, different signs a negative one; anything times 0 is 0.
  • Divide, a ÷ b. The same sign rule. b = 0 has no answer. A quotient that is not whole is shown as a fraction in lowest terms (−5/2) and as a decimal rounded half up to 10 significant figures (−2.5).

Output format. Negative numbers use the true minus sign (−), with no thousands separators. "Problem" reads a <op> b = <answer>, with b in parentheses when it is negative: 3 − (−6) = 9. The sign rule line names the rule in words, as in the examples below.

Worked examples by hand

−8 + 5. Different signs: 8 − 5 = 3; −8 has the larger absolute value, so −3.

−7 + (−4). Same signs: 7 + 4 = 11, keep the minus: −11.

3 − (−6). = 3 + 6 = 9.

−9 × (−4). Same signs, positive: 9 × 4 = 36.

−63 ÷ 7. Different signs, negative: 63 ÷ 7 = 9, so −9.

10 ÷ (−4). Different signs: 10/4 = 5/2, so −5/2 = −2.5.

123456789012345678901234567890 × (−2) = −246913578024691357802469135780.

Other questions people ask

How do you add integers with different signs?

Subtract the smaller absolute value from the larger, then take the sign of the number with the larger absolute value. −8 + 5: 8 − 5 = 3, and −8 is larger, so the answer is −3.

How do you add two negative integers?

Add their absolute values and keep the minus sign: −7 + (−4) = −11.

How do you subtract a negative integer?

Add its opposite. 3 − (−6) = 3 + 6 = 9.

What is the rule for multiplying and dividing integers?

Same signs give a positive answer; different signs give a negative answer. −9 × −4 = 36 and −63 ÷ 7 = −9.

What if the division does not come out even?

The answer is a fraction, not an integer. 10 ÷ (−4) = −5/2 = −2.5. The page shows the fraction in lowest terms and the decimal.

How big can the integers be?

Any size. The page works with exact whole numbers, so 123456789012345678901234567890 × −2 keeps every digit.