Modular multiplicative inverse calculator
Find a⁻¹ mod m — the number x with a·x ≡ 1 (mod m) — using the extended Euclidean algorithm. An inverse exists exactly when gcd(a, m) = 1; otherwise the tool reports that none exists. The modular inverse is what lets you 'divide' in modular arithmetic and is the step that produces the RSA private exponent d from the public exponent e.
Related tools
All Numbers & arithmetic tools →Enter a, Modulus m and the Modular multiplicative inverse calculator works out a⁻¹ mod m, gcd(a, m), Verification straight away. For instance, with a = 3 and Modulus m = 7 it returns a⁻¹ mod m = 5, gcd(a, m) = 1 and Verification = 3 × 5 = 15 ≡ 1 (mod 7).
How to use it
- Enter your values: a, Modulus m.
- Read the result instantly: a⁻¹ mod m, gcd(a, m), Verification.
Frequently asked questions
What does the Modular multiplicative inverse calculator actually compute?
It takes a and Modulus m and derives a⁻¹ mod m, gcd(a, m) and Verification from them. The calculation is live as you type, so the result updates on every change.
What information do I need to provide?
2 values: a and Modulus m. Nothing else is required — no account, no file upload.
Can you show a worked example?
With a = 3 and Modulus m = 7, the calculator returns a⁻¹ mod m = 5, gcd(a, m) = 1 and Verification = 3 × 5 = 15 ≡ 1 (mod 7). Those figures come from running this exact tool, so you can reproduce them by entering the same values.
What happens if I enter larger values?
It moves a lot. Using a = 6 and Modulus m = 14 instead, gcd(a, m) goes from 1 to 2 — which is why it is worth testing a few scenarios rather than trusting a single figure.
When would I actually use this?
Reading a number written another way: a Roman numeral on a monument, a hexadecimal colour, a binary byte, or a fraction that needs reducing.
What is the most common mistake?
Assuming a decimal fraction survives a change of base. A tenth is exact in decimal and infinitely repeating in binary, which is why 0.1 + 0.2 is not 0.3 in most programming languages.
What is the difference between the Modular multiplicative inverse calculator and the Modular exponentiation calculator?
This one returns a⁻¹ mod m and gcd(a, m); the Modular exponentiation calculator returns aᵇ mod n and Base reduced (a mod n). That is the whole difference — open the one whose figure you need.
Is there a tool for the next step?
Antilog Calculator (inverse logarithm) is the closest one after this: The antilogarithm undoes the logarithm: antilog_b(y) = bʸ, so log_b(bʸ) = y. Pick base 10, e, 2 or your own, enter the exponent, and the result comes back with the inverse relationship spelled out and the round trip checked. Bases of zero or less, and base 1, are rejected with the reason.
What else is worth having open alongside it?
Inverse Function Calculator and Inverse Laplace Transform Calculator — they come up in the same task often enough to be worth a second tab.
Where do the figures come from, and how current are they?
Base conversion and number-theory results are exact. Roman numerals follow the standard subtractive form used since the Middle Ages, which is not the only one the Romans themselves used.