Calculated
Modulo Calculator
Sign up to favourite this calculatorEnter a dividend and a divisor to get the modulo. Both sign conventions are shown, so negative numbers are unambiguous.
Sign in to keep your calculationsSaved · View in My dashboard
Saving…Saved to My dashboardCouldn't save. We'll try again.That saved calculation isn't available.
Share result
Compare scenarios
Keep this calculation as a scenario, change any input above, and the Now column shows how the result moves. Keep up to three, A to C; Open puts one back in the calculator.
Explain my result
Assumptions and limits
- An estimate from the numbers you entered, for guidance only. It is not financial, tax or medical advice.
- Calculator version 1, last updated 25 October 2026.
Was this calculator useful?
Report a problem
Saved to your account. Go to My dashboard to view your calculations.Link copied. Paste it wherever you want to share it.Your link is ready: open Share result and choose Copy link.
How to use this calculator
- Enter the dividend — the number being divided.
- Enter the divisor, also called the modulus.
- Read the result. The check line multiplies the quotient back out and adds the remainder, so you can confirm it lands on your dividend.
The truncated row is worth a glance whenever either number is negative. It says whether the other convention would have given a different answer, which is the usual cause of a disagreement between two tools.
What do I need to enter?
- Dividend (a) — the number being divided, from −1,000,000,000,000 to 1,000,000,000,000. It starts at 250.
- Divisor (n) — the modulus, the number you divide by, within the same range. It starts at 24, and zero has no modulo.
What do the results show?
- a mod n — the main figure, using the floored convention, so it takes the sign of the divisor.
- Truncated remainder — what most programming languages return, marked "same" or "differs" from the floored result.
- Quotient (floored) — the whole number of times the divisor goes in, rounded down.
- Check — the divisor times the quotient plus the result, which lands back on the dividend.
- Congruence — the same answer written as a ≡ r (mod n).
- Working — the substitution into the formula, and a note of the convention used.
How modulo is calculated
Modulo is division with the quotient thrown away and the leftover kept. The definition is a rearrangement of ordinary division.
- a — the dividend, e.g. 250
- n — the divisor or modulus, e.g. 24
- floor — round down, toward negative infinity
Equivalently, a = qn + r: there is a whole number q such that the divisor times q plus the remainder gives the dividend back. For 250 and 24 that is24 × 10 + 10 = 250.
Modulo with negative numbers
This is where the two conventions split. Flooring rounds the quotient down; truncating rounds it toward zero. For positive numbers those are the same thing, so the disagreement only appears once a minus sign does.
| Expression | Floored | Truncated |
|---|---|---|
| 10 mod 3 | 1 | 1 |
| 250 mod 24 | 10 | 10 |
| 100 mod 7 | 2 | 2 |
| −9 mod 4 | 3 | −1 |
| 9 mod −4 | −3 | 1 |
The first three rows agree. The last two are the same two numbers with a minus sign moved, and the two conventions give different answers to both. Under flooring the result always takes the sign of the divisor, which is the behaviour clock arithmetic needs: three hours before 12 o'clock should be 9, not −3.
Modulo vs remainder
For positive numbers, modulo and remainder are the same thing. They only part company once a negative is involved: modulo follows the sign of the divisor, the remainder follows the sign of the dividend. For the long-division framing with a quotient beside the leftover, see the Remainder Calculator.
Frequently asked questions
What does mod mean?
How do I calculate a modulo by hand?
What is −9 mod 4?
Why do calculators disagree about negative numbers?
What is the difference between modulo and remainder?
What is modulo used for?
Last updated 25 October 2026.