Modular Inverse Calculator

Find the modular inverse used in RSA and modular arithmetic.

How to use

  1. Enter your values in the fields above.
  2. Press Calculate to see your result instantly.
  3. Use the Share button to copy a link to your result.

About this calculator

This calculator finds the modular multiplicative inverse of a number a modulo m — the value x such that a·x ≡ 1 (mod m) — using the extended Euclidean algorithm. An inverse exists only when gcd(a, m) = 1, i.e. a and m are coprime.

Cryptography engineers and computer science students use modular inverses constantly in RSA key generation (finding the private exponent d from the public exponent e), Diffie–Hellman variants, and other modular-arithmetic algorithms; they're also a standard topic in number theory courses. Enter a and m to get the inverse, or a note that none exists.

Was this helpful?

Comments (0)

  • Be the first to comment.

Popular calculators

All Calculators