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.

x (dividend)
The number being divided.
y (divisor)
The number you divide by (non-zero).
Results
r (remainder)
r = x − y × floor(x/y)
Did we solve your problem today?

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.

Division with remainder =
a = q·b + r

Where q is an integer quotient and r is the remainder.

Modulo =
a mod b = r

The modulo of two numbers a and b is the remainder r after dividing a by b.

Modulo calculation rules =
(a + c) mod n = ((a mod n) + (c mod n)) mod n

You can reduce parts of a sum before taking mod n.

Multiplication rule =
(a · c) mod n = ((a mod n) · (c mod n)) mod n

You can reduce factors before multiplying.

a
= Dividend (number being divided)
b
= Divisor (number you divide by)
q
= Quotient (integer part of division)
r
= Remainder (the modulo result)
Calculate mod example
29 mod 6 = 5

Because 29 = 4·6 + 5.

Modulo equation calculator idea
a = q·b + r → r = a - q·b

If you know q = ⌊a/b⌋, you can compute r directly.

How to Use the Modulo Calculator

  1. 1

    Enter the dividend (a).

  2. 2

    Enter the divisor (b).

  3. 3

    The calculator returns a mod b (the remainder).

  4. 4

    Use the result in modular arithmetic, cyclic counting, or remainder problems.

Frequently Asked Questions

How to calculate mod / calculate modulo?

Divide a by b, take the remainder. That remainder is a mod b.

How to calculate modulo by hand?

Find the largest multiple of b that is ≤ a, then subtract it from a. Example: 29 mod 6 → 6·4=24, 29−24=5.

How to calculate mod without calculator?

Use repeated subtraction or find the nearest multiple of the divisor and subtract. It’s the same process as long division for the remainder.

How to calculate modulo division?

Write a = q·b + r. The modulo result is r, the remainder.

What is the modulo of two numbers?

It’s the remainder after dividing the first number by the second.

How to find modulo quickly?

Use division to get q = ⌊a/b⌋, then compute r = a − q·b.

How do I do modulo on calculator?

Some calculators have a MOD function in a math menu. If not, do division and use the remainder: r = a − ⌊a/b⌋·b.

Where is modulo in calculator / calculator modulo button?

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.

What are modulo calculation rules?

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.