Modular Exponentiation Calculator
Compute an integer power modulo a positive modulus without constructing the enormous power.
Your result
MATHExample values are prefilled. Results update automatically when JavaScript is available.
What this tool calculates
Compute an integer power modulo a positive modulus without constructing the enormous power.
Inputs used: Integer base, Non-negative integer exponent, Positive integer modulus.
On this page How it works & practical examples
How to use the Modular Exponentiation Calculator
Use whole-number inputs. Negative bases are normalized to the non-negative remainder convention, with a result from zero through modulus minus one.
The calculation
Compute base^exponent mod modulus using repeated squaring
Worked example
7 raised to the fourth power modulo 13 gives remainder 9.
Assumptions and limits
Exact BigInt integer arithmetic internally. This is educational arithmetic, not a cryptographic implementation or a constant-time security primitive.