By Zencalcy Editorial TeamLast reviewed About us
Find a mod b — the remainder of division. This tool uses floor-based (mathematical) modulo, so the result always takes the sign of the divisor, matching Python and number theory rather than C-style truncation.
Remainders with floor-based modulo (sign follows the divisor).
a mod b = a − b·⌊a/b⌋
| Symbol | Meaning |
|---|---|
| a | Dividend |
| b | Divisor (cannot be zero) |
17 mod 5 = 2. −17 mod 5 = 3 (floor-based), whereas truncated remainders would give −2.
Continue with the Percentage Calculator, all math calculators, or browse the full calculator directory.
Truncated (C/Java %) follows the dividend's sign; floor-based follows the divisor's. −7 mod 3 = 2 here, but −1 in C.
Click to use the Absolute Value Calculator and get instant results.
Click to use the Basic Calculator and get instant results.
Click to use the Scientific Calculator and get instant results.
Click to use the Exponent Calculator and get instant results.
Click to use the Square Root Calculator and get instant results.
Click to use the Cube Root Calculator and get instant results.
Content updated: September 2026