Inverse Modulo Calculator

Math Tool

Inverse Modulo Calculator

Find the modular multiplicative inverse of a number modulo a positive integer.

Main Calculator

gcd(3, 11) = 1, so an inverse exists.
Modular Inverse
4
3 x ≡ 1 (mod 11)

Validation

Both inputs must be safe integers. The modulus must be greater than 1, and the two numbers must be coprime.

Worked Example

10 mod 17 has inverse 12 because 10 x 12 = 120 and 120 mod 17 = 1.

Formula

Find x such that a x ≡ 1 (mod m).
An inverse exists only when gcd(a, m) = 1.

Frequently Asked Questions

Can a be negative?

Yes. The calculator normalizes the value into the modulus before solving.

Why might no inverse exist?

If a and m share a factor greater than 1, the inverse does not exist.

Related Tools