All tools · 📊 Math
% Modulo / Remainder Calculator
Modulo (or "mod") gives the remainder after integer division. 17 mod 5 = 2 because 17 = 5×3 + 2. Used in cryptography, hashing, clock arithmetic, and parity checks. We handle negative numbers using the mathematical (non-negative remainder) convention.
Examples
17 mod 52 (quotient 3, remainder 2)-7 mod 32 (mathematical convention)JS % returns -1 here; math mod returns 2.
25 mod 121 (5pm + 8 hours = 1am)Frequently asked questions
Why does JS give a different answer for negatives?
JavaScript % returns a remainder with the same sign as the dividend (-7 % 3 = -1). Mathematical mod always returns non-negative (-7 mod 3 = 2). Add the divisor if you need the math version.
Modulo vs remainder — same thing?
For positive numbers yes. For negatives they differ by language convention. Python and Ruby use math mod; C, JS, Java use sign-of-dividend remainder.
About this tool
Modulo / Remainder Calculator runs entirely in your browser using standard Web APIs. No data is sent to any server. The source for this tool is in our public GitHub repository.
Related tools
- 🔢 Number Base Converter — Convert between binary, octal, decimal, and hexadecimal.
- ➗ GCD / LCM Calculator — Find greatest common divisor and least common multiple of any numbers.
- ^ Exponent & Root Calculator — Compute powers (a^b) and nth roots. Real and complex.
Why this tool
vs typical free web-tool sites
| 1vw | Typical free site | |
|---|---|---|
| Price | Free | Free |
| Signup required | No | Often (for premium features) |
| Ads inside the tool | No | Yes (banner + video) |
| Data sent to server | No (browser-only) | Yes (inputs analyzed for ads) |
| Total tools | 96 | Often <20 or scattered across sites |
| Bookmarkable URL per tool | Yes | Mixed |
| Loads in under 1s | Yes (static) | Often slow (ad tracking) |
| Multilingual | EN / ES / PT / FR / DE | Usually EN only |
| Open source | Yes | No |