Modular Inverse Calculator

Find the modular multiplicative inverse using the extended Euclidean algorithm

Frequently Asked Questions

What is a modular inverse?

The number x with a·x ≡ 1 (mod m). It is the modular analogue of dividing by a and is central to RSA and other cryptography.

When does it exist?

Only when a and m are coprime, i.e. gcd(a, m) = 1. Otherwise no inverse exists and the calculator says so.

How is it found?

With the extended Euclidean algorithm, which returns integers x, y solving a·x + m·y = gcd(a, m); x mod m is the inverse when the gcd is 1.

Where is this used?

RSA key generation, the Chinese remainder theorem, hashing, and solving linear congruences.

Important Disclaimer: Estimates for informational purposes only.

This calculator provides estimates for informational purposes only. Results are based on assumptions and may not reflect actual outcomes. Consult qualified professionals in relevant fields before making important decisions based on these results.