Modular Inverse Calculator
Find the modular multiplicative inverse of an integer modulo m with an Extended Euclidean Algorithm check.
Find a modular multiplicative inverse
English SERP intent for this topic is modular arithmetic: users want the value x that makes a times x leave remainder 1 modulo m. The reciprocal fraction mode is secondary; the modular inverse mode is the primary tool.
The inverse exists exactly when a and m are coprime.
- Enter the integer a.
- Enter the modulus m, at least 2.
- Use the result and the product-remainder check to verify the inverse.
When no inverse exists
If gcd(a,m) is greater than 1, no modular inverse exists. The Extended Euclidean Algorithm exposes that condition and supplies the coefficient that becomes the inverse when the gcd is 1.
| Input | Result |
|---|---|
| 3 mod 11 | 4, because 3 x 4 leaves remainder 1 |
| 17 mod 3120 | 2753 |
| 6 mod 9 | No inverse because gcd(6,9)=3 |
Frequently Asked Questions
Sources and References
- Modular Multiplicative Inverse CalculatorBoxentriq
- Modular Multiplicative Inverse CalculatorMiniWebtool
- Modular Inverse CalculatordCode
- Modular Multiplicative InverseWikipedia
Calculations are based on the listed reference sources. Links open in a new tab.
Related Tools
Calculate a mod b and compare JavaScript-style remainder with Python-style modulo for positive, negative, integer, and decimal inputs.
Calculate the greatest common divisor, also called GCF or HCF, for two or more positive integers with Euclidean algorithm steps and Bezout coefficients for pairs.
Find the greatest common divisor and least common multiple for two to six nonzero integers, with Euclidean algorithm steps and prime factorization.
Break an integer into prime factors, see repeated factors, canonical exponent form, trial-division steps, and the total number of positive factors.
Calculate with very large integers using arbitrary precision. Add, subtract, multiply, divide, find remainders, powers, GCD, LCM, and factorials.