Modulo Calculator
Use our modulo calculator to calculate mod (remainder) for two numbers instantly. Learn how modulo works, how to calculate modulo by hand, how to calculate mod without calculator, modulo calculation rules, and where the modulo button is on a calculator.
What is Modulo?
Modulo (often written as “mod”) is the operation that gives the remainder after division. For example, 17 mod 5 = 2 because 17 ÷ 5 leaves a remainder of 2.
If you’re asking how modulo works, think of integer division: a = q·b + r, where q is the quotient and r is the remainder. The modulo result is r.
This modulo calculator computes the modulo of two numbers (dividend and divisor) and returns the remainder.
Modulo Formula and Rules
Modulo is defined using division with remainder. There are also common modulo calculation rules that help simplify expressions.
Where q is an integer quotient and r is the remainder.
The modulo of two numbers a and b is the remainder r after dividing a by b.
You can reduce parts of a sum before taking mod n.
You can reduce factors before multiplying.
Because 29 = 4·6 + 5.
If you know q = ⌊a/b⌋, you can compute r directly.
How to Use the Modulo Calculator
- 1
Enter the dividend (a).
- 2
Enter the divisor (b).
- 3
The calculator returns a mod b (the remainder).
- 4
Use the result in modular arithmetic, cyclic counting, or remainder problems.
Frequently Asked Questions
Divide a by b, take the remainder. That remainder is a mod b.
Find the largest multiple of b that is ≤ a, then subtract it from a. Example: 29 mod 6 → 6·4=24, 29−24=5.
Use repeated subtraction or find the nearest multiple of the divisor and subtract. It’s the same process as long division for the remainder.
Write a = q·b + r. The modulo result is r, the remainder.
It’s the remainder after dividing the first number by the second.
Use division to get q = ⌊a/b⌋, then compute r = a − q·b.
Some calculators have a MOD function in a math menu. If not, do division and use the remainder: r = a − ⌊a/b⌋·b.
It depends on the model. Many scientific calculators place MOD under a MATH menu or as a secondary function. If there’s no dedicated modulo button, compute the remainder using division.
Common rules include reducing sums and products: (a+c) mod n = ((a mod n)+(c mod n)) mod n and (a·c) mod n = ((a mod n)·(c mod n)) mod n.