Free to use, no account

Modulo Calculator

Calculate the Euclidean quotient and remainder for whole numbers. Negative inputs are handled consistently, and the division identity shows how the answer is formed.

The number to divide; it may be negative.

Use any non-zero whole number; its absolute value defines the modulus.

Check whether this value is congruent to the dividend modulo the divisor.

Accepts signed whole numbers up to 50 digits. No fractions or decimals. The result uses Euclidean modulo; some programming languages use a different remainder rule for negatives.

How do you calculate a modulo with a negative number?

This calculator uses a non-negative remainder smaller than the absolute divisor. For example, −7 mod 3 is 2 because −7 = (−3 × 3) + 2.

Frequently asked questions

How do you calculate a modulo with a negative number?

This calculator uses a non-negative remainder smaller than the absolute divisor. For example, −7 mod 3 is 2 because −7 = (−3 × 3) + 2.

Are my numbers uploaded?

No. The exact calculation runs in this browser. Numbers are not uploaded or saved.

What is −7 mod 3?

Using the Euclidean convention, −7 mod 3 is 2: −7 = (−3 × 3) + 2, and 0 ≤ 2 < 3.

What does congruent modulo m mean?

Two integers are congruent modulo m when their difference is divisible by |m|. The optional comparison checks this exactly.

Why can this differ from a programming language’s % operator?

Some languages keep the sign of a negative dividend in the remainder. This calculator instead returns a remainder from 0 up to, but not including, the absolute divisor.