Modular Exponentiation Calculator
Compute an integer power modulo a positive modulus without constructing the enormous power.
Your result
MATHEnter your values and select calculate.
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
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.
Common questions
Which inputs should I use?
Use whole-number inputs. Negative bases are normalized to the non-negative remainder convention, with a result from zero through modulus minus one.
What does the result exclude?
Exact BigInt integer arithmetic internally. This is educational arithmetic, not a cryptographic implementation or a constant-time security primitive.