Static calculatorLiveMath Calculators

Modulo Calculator

Calculate the remainder of a division (modulo).

Privacy note. Runs in your browser. The values you enter stay on this page and aren't sent anywhere.
The number being divided.
The number you divide by. Cannot be zero.
When a or b is negative, the truncated (JavaScript %), floored (Python), and Euclidean results differ.
a mod b (truncated, JS %)2
a mod b (floored, Python)2
a mod b (Euclidean, always ≥ 0)2
Quotient (a ÷ b, truncated)3

Recommended next steps

Related tools

Frequently asked questions

The modulo is the remainder left after dividing one number by another. For example, 17 mod 5 is 2, because 17 = 5 x 3 + 2. This calculator works entirely in your browser.

Last updated 2026-06-23.