Modular Exponentiation
Math CalculatorsFast power a^b mod m, BigInt, cycles
Quick Answer
Modular Exponentiation: Fast power a^b mod m, BigInt, cycles. Modular Exponentiation uses standard math formulas to compute accurate results instantly.
7^256 mod 13
9
Last 2 digits01
b mod m first7
Power cycle12
Naive b^e digits~217
Square-and-multiply steps
Calculation steps
- 1e = 256 = (100000000)₂
- 2b^256 ≡ 9 (mod 13)
- 3Square-and-multiply: only O(log e) multiplications — 256 needs ~9 squarings instead of 256 multiplications.
Fermat & Euler shortcuts
| Theorem | Statement | Use |
|---|---|---|
| Fermat's little | a^(p−1) ≡ 1 (mod p), p prime | Reduce huge exponents mod prime |
| Euler's theorem | a^φ(m) ≡ 1 (mod m), gcd(a,m)=1 | General modulus cycles |
| Last digit cycles | cycle length divides 4 (2,3,7,8) or 1 (0,1,5,6) | Mental last-digit tricks |
| CRT | solve x ≡ aᵢ (mod mᵢ) system | Split big moduli |
💡 Modular exponentiation is the heart of RSA: encrypting c = m^e mod n is easy with square-and-multiply, but reversing it (finding e-th roots mod n) is believed hard without the private key — that asymmetry secures the internet.
Was this tool helpful?
How to Use
- Enter values or expressions: type directly into the Modular Exponentiation — keyboard friendly.
- Instant results: everything computes live as you type, no button needed.
- Follow the steps: the result panel shows full working and formula substitution.
- Copy or recompute: one-click copy; change any input to recalculate instantly.
Key Points
- Modular Exponentiation is a free online math tool — open and use, no sign-up.
- All calculations run locally in your browser; your data never leaves the device.
- Key capability: Fast power a^b mod m, BigInt, cycles.
- Results come with formulas and reference tables so you can verify every number.
Formula & How It Works
Modular Exponentiation formula
Modular Exponentiation uses standard math formulas to compute accurate results instantly.
FAQ
How do I use the Modular Exponentiation?
Open the page and fill in the input fields — results update automatically. Fast power a^b mod m, BigInt, cycles.
Are the results accurate?
Yes. All calculations use standard mathematical formulas and are verified for accuracy.
Is it free? Do I need to sign up?
Completely free. No registration, login or download required — just open and use.
Does it work on mobile?
Yes. The responsive design works on phones, tablets and desktops.
Is my data saved?
No. All calculations run locally in your browser. Nothing is uploaded or stored.
Related Tools
HOT
Basic Calculator
Add, subtract, multiply, divide with full keyboard supportHOTScientific Calculator
Trig, log, exponent, factorial · DEG/RAD modesHOTPercentage Calculator
Percent of, percentage share, and percent changeFraction Calculator
Add, subtract, multiply, divide fractions with simplificationHOTNumber Base Converter
Convert between binary, octal, decimal and hexadecimalPermutation & Combination Calculator
Permutations A(n,m) and combinations C(n,m)Random Number Generator
Custom range, integers or decimals, batch generationPrime Number Tools
Primality test, prime factorization and prime listsRelated Guides
Source & Updates
Standard mathematical formulas. All logic verified. Last updated: 2025-07
Last updated:
Formulas and content on this page are reviewed by the YiJianSuan team. For reference only — official sources prevail.
Maintained and periodically reviewed by the YiJianSuan editorial team — review process in ourEditorial Policy.
Cite this page: YiJianSuan. Modular Exponentiation[EB/OL]. https://www.yijiansuan.com/en/c/math/modpow
Results provided by this tool are for reference only and do not constitute professional advice.