Multiplicative Inverse Modulo Calculator
Compute the multiplicative inverse of a modulo m: the integer x in [0, m) satisfying a · x ≡ 1 (mod m). Shows the full extended Euclidean derivation and verifies the result.
Reduce a into [0, m)
Confirm gcd(a mod m, m) = 1 (inverse exists)
Extended Euclidean gives Bezout coefficient x
Normalize x into [0, m)
Verify: 7 × 15 mod 26
How does this calculator work?
The multiplicative inverse of a mod m is the integer x in [0, m) where a · x ≡ 1 (mod m). It exists only when gcd(a, m) = 1 and is found via the extended Euclidean algorithm (Bezout identity), then normalized to a positive residue. Uses: RSA key derivation, multiplicative cipher reversal, solving linear congruences.
Formula
How this is calculated
The multiplicative inverse of a modulo m is the integer x (in the range [0, m)) satisfying a · x ≡ 1 (mod m). It is the modular equivalent of the reciprocal 1/a — multiplying a by its inverse and reducing by m always gives 1. The inverse exists if and only if a and m are coprime, i.e. gcd(a, m) = 1. If they share any common factor, no solution exists.
The extended Euclidean algorithm finds the inverse efficiently. Starting from gcd(a mod m, m), it traces back through the Bezout identity — integers x and y such that a·x + m·y = gcd(a, m) = 1 — and the coefficient x is then normalized into [0, m) to give the final inverse. Negative values of a are reduced into [0, m) first so the algorithm always operates on non-negative inputs.
Common applications include RSA cryptography (finding the private exponent d where e·d ≡ 1 mod φ(n)), reversing multiplicative ciphers (with m = 26 for the English alphabet), and solving linear congruences a·x ≡ b (mod m) by multiplying both sides by the modular inverse of a.
Frequently asked questions
It exists precisely when a and m are coprime — gcd(a, m) = 1. If they share any common factor greater than 1, no integer x satisfies a · x ≡ 1 (mod m). When m is prime, every a from 1 to m−1 has an inverse because all are coprime to m.
RSA key generation requires finding the private exponent d such that e · d ≡ 1 (mod φ(n)), where φ(n) is Euler's totient of the key modulus. The private key d is exactly the multiplicative inverse of the public exponent e modulo φ(n), computed via the extended Euclidean algorithm.
The 26 letters of the English alphabet are numbered 0–25. A multiplicative cipher encodes each letter by multiplying its number by a key k modulo 26. Decoding requires the multiplicative inverse of k mod 26. Not all keys are invertible — only those coprime to 26 work (not multiples of 2 or 13).
Also known as
TG we-Calculate Editorial Team. (2026). Multiplicative Inverse Modulo Calculator [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/multiplicative-inverse-modulo-calculator
TG we-Calculate Editorial Team. "Multiplicative Inverse Modulo Calculator." TG we-Calculate. 2026. https://we-calculate.com/calculator/multiplicative-inverse-modulo-calculator.
TG we-Calculate Editorial Team, "Multiplicative Inverse Modulo Calculator," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/multiplicative-inverse-modulo-calculator
@misc{wecalculate_multiplicative_inverse_modulo_calculator, title = {Multiplicative Inverse Modulo Calculator}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/multiplicative-inverse-modulo-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
