Compute a^b mod m efficiently using the binary exponentiation (square-and-multiply) algorithm. Handles very large exponents.
Enter your values below
How this calculator works
Uses repeated squaring: compute the result bit by bit from the binary representation of the exponent b.
Common questions about this calculator