Modulo Calculator
Enter a number and a modulus to find the remainder, or add an exponent for a power mod n.
Any whole number, positive or negative.
A whole number other than 0.
Result
You entered
Quotient
Truncated remainder
Congruence
Show the work
Division algorithm
Dividing by and rounding the quotient down to a whole number leaves a remainder that is never negative. Here and .
Using
Remainder from the quotient
The remainder is what is left of after taking away whole copies of . Here , so lands between and .
Result
So .
Worked examples
Division algorithm, Remainder from the quotient
Division algorithm, Remainder from the quotient
Division algorithm, Remainder from the quotient
Division algorithm, Remainder from the quotient
Binary form of the exponent, Square and multiply
Binary form of the exponent, Square and multiply
Binary form of the exponent, Square and multiply