Multiplicative Inverse Calculator

Find an ordinary reciprocal or an integer modular inverse with the appropriate method.

Find a multiplicative inverse
Choose reciprocal division for real numbers or modular arithmetic for coprime integers.

About the multiplicative inverse calculator

A multiplicative inverse is a value that reverses multiplication. In ordinary arithmetic, the inverse of a nonzero number a is its reciprocal, 1 divided by a, because multiplying a by 1 divided by a gives 1. The reciprocal of 8 is 0.125, the reciprocal of one half is 2, and the reciprocal of a negative number is also negative. Zero has no multiplicative inverse because no finite value multiplied by zero can produce 1. Modular arithmetic uses a related but distinct definition. The modular inverse of an integer a modulo m is an integer x for which a times x leaves remainder 1 when divided by m. For example, 7 has inverse 15 modulo 26 because 7 times 15 is 105 and 105 mod 26 is 1. Modular inverses are not generally the same as decimal reciprocals. They belong to a finite system of residue classes, and adding or subtracting any multiple of the modulus gives another representative of the same modular answer. A modular inverse exists exactly when the number and modulus are coprime, meaning their greatest common divisor is 1. The calculator checks this condition with the Extended Euclidean Algorithm. That algorithm finds coefficients connecting the inputs to their greatest common divisor. When the greatest common divisor is 1, the coefficient attached to the number can be reduced modulo m to obtain the least nonnegative inverse. If the inputs share a factor greater than 1, no multiplication can produce remainder 1, so the calculator reports that the requested inverse does not exist. Choose the reciprocal mode for fractions, scaling, algebraic division, rates, and real-number calculations. Choose modular inverse for congruences, number theory, cryptography, checksums, and integer algorithms. Modular inputs must be safe integers and the modulus must be greater than 1. Negative integers are accepted as the number because they can be reduced to an equivalent residue before the inverse is interpreted. Multiplicative inverses are central to solving equations. Multiplying both sides of an ordinary equation by a reciprocal isolates a nonzero coefficient. In a modular equation, multiplying by a modular inverse isolates a variable only when that inverse exists. Public-key cryptography uses this idea with much larger integers, although production cryptographic work requires specialized arbitrary-precision and constant-time software. This calculator is intended for learning, checking homework, and solving moderate-sized arithmetic examples with a clear distinction between the two inverse concepts.

Multiplicative inverse examples

The examples contrast ordinary reciprocals with inverses in modular arithmetic.

InputInverseVerification
Reciprocal of 80.125Eight times 0.125 equals 1.
Reciprocal of -4-0.25Negative four times negative 0.25 equals 1.
Inverse of 7 modulo 2615Seven times 15 is 105, which has remainder 1 modulo 26.
Inverse of 3 modulo 114Three times 4 is 12, which has remainder 1 modulo 11.

How to find a multiplicative inverse

  1. Choose Reciprocal for ordinary arithmetic or Modular inverse for integer congruences.
  2. Enter the number whose inverse you need.
  3. For a modular inverse, also enter an integer modulus greater than 1.
  4. Select Find inverse and verify the displayed multiplication rule.

Multiplicative inverse calculator FAQ

Is a multiplicative inverse always a reciprocal?

In ordinary real-number arithmetic, yes, the inverse of a is 1 divided by a. In modular arithmetic, the inverse is instead an integer whose product has remainder 1 under a modulus.

Why does zero have no reciprocal?

Every finite value multiplied by zero equals zero rather than 1. Division by zero is therefore undefined, so a reciprocal cannot be assigned.

When does a modular inverse exist?

It exists when the number and modulus have greatest common divisor 1. This coprime condition guarantees that the Extended Euclidean Algorithm can produce the needed coefficient.

Can a modular inverse be negative?

Equivalent inverse representatives can be negative, because values differing by a multiple of the modulus are congruent. This calculator displays the least nonnegative representative.

What is the Extended Euclidean Algorithm?

It extends the ordinary greatest-common-divisor algorithm by tracking integer coefficients. When the gcd is 1, one coefficient directly yields the modular inverse.