Multiplicative Inverse Modulo Calculator
Find a modular inverse for coprime integers using the Extended Euclidean Algorithm.
About the multiplicative inverse modulo calculator
Modular inverse examples
Each result is the least nonnegative integer whose product leaves remainder 1.
| Number and modulus | Inverse | Verification |
|---|---|---|
| 3 modulo 11 | 4 | Three times 4 equals 12, and 12 mod 11 equals 1. |
| 7 modulo 26 | 15 | Seven times 15 equals 105, and 105 mod 26 equals 1. |
| 17 modulo 3120 | 2753 | Seventeen times 2753 leaves remainder 1 modulo 3120. |
| 10 modulo 17 | 12 | Ten times 12 equals 120, and 120 mod 17 equals 1. |
How to calculate a modular inverse
- Enter the integer whose multiplicative inverse you want.
- Enter an integer modulus greater than 1.
- Select Calculate modular inverse to run the Extended Euclidean Algorithm.
- Confirm that the displayed product has remainder 1 under the modulus.
Multiplicative inverse modulo FAQ
When does a multiplicative inverse modulo exist?
An inverse exists exactly when the number and modulus are coprime. Equivalently, their greatest common divisor must equal 1.
Why are there multiple-looking inverse answers?
Adding any whole multiple of the modulus produces a congruent representative. The calculator standardizes the result by displaying the least nonnegative inverse.
How does the Extended Euclidean Algorithm find the inverse?
It computes the gcd while tracking coefficients for the original numbers. When the gcd is 1, the coefficient of the input number becomes a modular inverse.
Can I calculate an inverse for a negative number?
Yes, a negative integer can first be reduced to its equivalent residue modulo m. The calculator handles that reduction and returns a least nonnegative inverse.
How are modular inverses used in cryptography?
They help reverse modular multiplication in algorithms such as RSA and elliptic-curve systems. Security applications require big-integer and constant-time implementations beyond this educational calculator.