Modulo Calculator
Last updated: June 2026 · Free · No sign-up required
Enter values above and click Calculate to see your result instantly.
Quick reference
| Expression | Result |
|---|---|
| 17 mod 5 | 2 |
| 20 mod 4 | 0 (divisible) |
| 7 mod 10 | 7 |
| -7 mod 3 | 2 (floored) or -1 (truncated) |
functions Shows the working, not just the answer
For students and teachers, the final number is only half the value. Every math tool here exposes the formula it applied, the intermediate steps, and the rounding rule, so you can follow along, check your homework, or use the answer in a proof or report with confidence.
calculate Accurate to the spec
Calculations use 64-bit floating point with sensible rounding for the domain (currency to 2 decimals, percentages to 4 decimals, algebra to 6 significant figures). Where exact rational arithmetic matters — fractions, factorials, simplification — we use a dedicated BigNumber path so 1/3 + 1/6 returns ½, not 0.49999.
school Free for classroom use
Educators are welcome to link to any math calculator on CalcaTools from a class site, Google Classroom, or worksheet. The pages are mobile-friendly, free, ad-supported (so we can keep them free) and have no sign-up wall — students just click and use them in class or at home.
tips_and_updates Pair with the spoke articles
Below the calculator we link a small set of plain-English explainer pages — "What is a percentage?", "Why does PEMDAS matter?", and so on. They cover the underlying concept in 4–6 short paragraphs. Read those before the calculator if the topic is new, or after if you want the extra context.
Interpretation guide
| Use modulo to… | Example |
|---|---|
| Test divisibility | n mod d = 0 |
| Find even/odd | n mod 2 |
| Wrap around a cycle | clock: (h + k) mod 12 |
| Hashing / cryptography | x mod p |
Formula & methodology
Formula: a mod n = a - n x floor(a / n) (the remainder of a divided by n)
How the modulo operation works
The modulo (mod) gives the remainder left over after dividing one number by another.
Example: 17 mod 5
17 / 5 = 3 with 2 left over, because 5 x 3 = 15 and 17 - 15 = 2. So 17 mod 5 = 2.
Modulo is the backbone of clock arithmetic, divisibility tests (n mod 2 tells you even or odd), hashing, and cryptography. Note that languages differ on the sign of the result for negative inputs — some "floor" toward negative infinity, others "truncate" toward zero.
Authoritative source: NIST Mathematics Encyclopedia