Modulo Calculator
Compute a mod b — the remainder after dividing one integer by another — with both the mathematical (always non-negative) and truncated results.
Inputs explained
- Dividend (a) — The integer being divided.
- Divisor (b) — The integer to divide by. Cannot be zero.
How to use it
- Fill in the fields above — each input has a hint describing exactly what to enter
- Press Calculate to get your result instantly, right on this page
- Copy the result, save the tool to favorites, or share and embed it anywhere
Understanding the result
Example: 17 mod 5 = 2, because 17 = 3 × 5 + 2.
Frequently asked questions
Why does this calculator show two different results for the same inputs? It shows both the mathematical modulo (always non-negative) and the truncated remainder used by many programming languages, which differ when the dividend is negative.
What does a mod b mean if a is smaller than b? If a is smaller than b (and non-negative), the remainder is just a itself, since b doesn't divide into it even once.
Is the Modulo Calculator free to use? Yes — it is completely free, with no sign-up, no download and no usage limits. You can use it as often as you need.
Is my data private? Yes. The calculation runs entirely in your browser — the values you enter are never sent to our servers, stored or shared with anyone.
What information do I need? Just the following: Dividend (a), Divisor (b). Each field includes a hint explaining exactly what to enter.
Can I use it on my phone? Yes — the tool is fully responsive and works on any device, and the same calculator is available in the EasyWorkCalcs mobile app.
Privacy
Everything you enter into the Modulo Calculator is processed entirely in your browser. Nothing is uploaded, stored or shared — your data stays on your device.