standarddeviationcalculator.net

Updated Free · runs in your browser

Integer calculator

--- --- Methodology

An integer is a whole number that may be negative: −3, 0, 12. This integer calculator adds, subtracts, multiplies and divides any two of them and shows which sign rule decided the answer, so it also works as a negative numbers calculator for homework. Pick an operation, type the numbers with a minus sign where needed, and read the working underneath.

Negative numbers: type a minus sign, for example −17.

(−17) + 9 −8
Result−8
Sign of the resultnegative
Absolute value of the result8
Show the working, step by step
  1. One is positive and one is negative: subtract the smaller size from the larger, and keep the sign of the number with the larger size (−17).

    17 − 9 = 8 (−17) + 9 = −8

Integers are the whole numbers and their opposites: …, −2, −1, 0, 1, 2, …. Results are exact for any size you can type here.

The sign rules for integers

Every integer problem reduces to the size of the numbers plus a rule for the sign. Sizes are the absolute values, the numbers with the minus signs dropped.

Which sign does the result get?
OperationSignsWhat to doExample
AddsameAdd the sizes, keep the sign−4 + (−6) = −10
AdddifferentSubtract the smaller size from the larger; keep the sign of the larger−17 + 9 = −8
SubtractanyAdd the opposite of the second number5 − (−8) = 5 + 8 = 13
Multiply or dividesameResult is positive(−6) × (−7) = 42
Multiply or dividedifferentResult is negative(−6) × 7 = −42

Subtraction needs no rule of its own. The sign of the second number is flipped, and the problem becomes an addition. That is why subtracting a negative number makes the total go up: taking away a debt of 8 leaves you 8 better off.

Worked examples

Adding with different signs: −17 + 9

  1. The signs differ, so subtract sizes: 17 − 9 = 8.
  2. The larger size belongs to −17, so the answer is negative: −8.

Subtracting a negative: 5 − (−8)

  1. Change to adding the opposite: 5 + 8.
  2. Same signs (both positive): 13.

Multiplying: (−6) × 7

  1. Multiply the sizes: 6 × 7 = 42.
  2. The signs differ, so the product is negative: −42.

Dividing without a remainder, and with one

−45 ÷ 9: 45 ÷ 9 = 5, different signs, so −5. For −17 ÷ 5, 5 does not divide 17 evenly. The decimal is −3.4, and as quotient and remainder, −17 = (−4) × 5 + 3.

Absolute value

The absolute value |a| is the distance of a from zero, so |−23| = 23 and |23| = 23. Choose “Absolute value” in the operation list to get it with the opposite of the number alongside. For the absolute value of a difference, as in |a − b|, subtract first, then take the absolute value.

Common mistakes with negative numbers

  • Reading − as “minus” when it means “negative”. In 5 − (−8) the first dash is an operation and the second is part of the number. Brackets around a negative number keep the two apart.
  • Applying the multiplication rule to addition. (−3) + (−4) = −7, not 7. “Two negatives make a positive” only holds for multiplication and division.
  • Losing the sign of the larger number when the signs differ: −9 + 4 is −5, not 5.
  • Treating a remainder as negative. With the usual convention the remainder of −17 ÷ 5 is 3, with a quotient of −4, not a remainder of −2.

To combine several integers and powers in one expression, use the order of operations calculator. It handles negative numbers and parentheses.

Integer calculator: the worked example on this page, with its result and chart
Integer calculator: the worked example above, at a glance.

Common questions

How do I add and subtract negative numbers?

To add two numbers with the same sign, add their sizes and keep the sign: −4 + (−6) = −10. With different signs, subtract the smaller size from the larger and keep the sign of the larger: −17 + 9 = −8. To subtract, change the subtraction into addition of the opposite: 5 − (−8) = 5 + 8 = 13.

What is a negative times a negative?

A positive. Multiplying or dividing two numbers with the same sign gives a positive result, and with different signs a negative one: (−6) × (−7) = 42, but (−6) × 7 = −42. A zero factor always gives 0, which has no sign.

What is the absolute value of a negative number?

The same number without its minus sign: |−23| = 23. Absolute value is the distance from 0 on the number line, and a distance is never negative. The absolute value of 0 is 0.

What happens when you divide integers that do not divide evenly?

The result is not an integer. The calculator gives the decimal (−17 ÷ 5 = −3.4) and also the quotient and remainder, written as a = q × b + r with the remainder r between 0 and |b| − 1: −17 = (−4) × 5 + 3. The remainder is never negative in this form.

Is zero an integer, and is it positive or negative?

Zero is an integer, and it is neither positive nor negative. The integers are …, −3, −2, −1, 0, 1, 2, 3, …: the whole numbers together with their negatives. Fractions and decimals such as 1/2 or −3.4 are not integers.