Integers are the whole numbers and their negatives. The sign rules – a negative times a negative is positive, subtracting a negative is adding – are the main source of mistakes, and this calculator applies them for you.
How to use the Integer Calculator
- Operation
- a
- b
Results update as you type, and everything is calculated in your browser.
How it works
Results are exact for whole-number operations within about 15 digits. For division, the integer quotient and remainder are given as well as the exact value.
Inputs explained
| Field | What to enter |
|---|---|
| Operation | Choose one: Addition (a + b), Subtraction (a − b), Multiplication (a × b), Division (a ÷ b) … |
| a | A number |
| b | A number |
What each result means
- Integer quotient (division) = trunc([a]÷[b])
- Remainder (division) = [a] – [b]×trunc([a]÷[b])
Example values
How the main result changes when a changes and everything else stays at the example values above:
| a | Result |
|---|---|
| -8.5 | -1.7 |
| -12.75 | -2.55 |
| -17 | -3.4 |
| -21.25 | -4.25 |
| -25.5 | -5.1 |
| -34 | -6.8 |
Formula
a + b, a − b, a × b, a ÷ b (= q remainder r), aᵇ, ᵇ√a, log_a b
Worked example
Inputs — Operation: Division (a ÷ b); a: -17; b: 5.
Results — Result = -3.4; Integer quotient (division) = -3; Remainder (division) = -2.
Key terms
- Integer
- A whole number, positive, negative or zero.
Frequently asked questions
What is −17 ÷ 5?
−3.4, or −3 remainder −2 (truncated division).
What is a negative times a negative?
A positive number: (−4) × (−3) = 12.
What is subtracting a negative?
Adding: 5 − (−3) = 8.
Is zero an integer?
Yes – it is neither positive nor negative.