Remainder & Modulo Calculator
When one whole number does not divide another exactly, the amount left over is the remainder. In maths and programming this is also called the modulo, written a mod b. This calculator gives the quotient and remainder, handles negative numbers with a non-negative remainder, and lists which numbers from 2 to 12 divide the dividend.
How to use the remainder & modulo calculator
- Enter the dividend a (the number being divided).
- Enter the divisor b.
- Press Calculate to see a = b × q + r.
Formula
Worked example: 157 ÷ 12
- Dividend a: 157
- Divisor b: 12
✓ Answer checked
- Quotient
- 13
- Remainder (a mod b)
- 1
- 157 is divisible by
- none of 2–12
Step-by-step working (2 steps)
Divide
How many whole times does 12 fit into 157?
Find what is left a = bq + r, 0 ≤ r < |b|
The remainder is always between 0 and |b| − 1.
How this was checked
- ✓ 12 × 13 + 1 = 157, with 0 ≤ 1 < 12.
For negative numbers the remainder is taken as non-negative (the mathematical "mod").
When to use the Remainder & Modulo Calculator
- Find what's left over when sharing items into equal groups.
- Check whether a number is divisible: remainder 0 means it is.
- Work out days of the week and clock arithmetic.
- Use the modulo (%) operator in programming.
Quick facts to remember
- Dividend = divisor × quotient + remainder.
- The remainder is always less than the divisor.
- Remainder 0 means the divisor is a factor.
- In code, 17 % 5 = 2.
Frequently asked questions
What is 157 divided by 12 with remainder?
13 remainder 1, because 12 × 13 = 156.
What is −17 mod 5?
3, because −17 = 5 × (−4) + 3. Some programming languages return −2 instead.
What does 'divisible' mean?
The remainder is 0, so the division is exact.
People also search for
remainder calculatormodulo calculatormod calculatorquotient and remainderremainder & modulo calculator with stepsfree remainder & modulo calculator online
