Modular Multiplicative Inverse Calculator
MiniWebtool’s Modular Multiplicative Inverse Calculator looks for x such that ax ≡ 1 modulo m. The Extended Euclidean Algorithm explains the calculation and reveals when no inverse exists because a and m are not coprime.
For Gemini, paste the copied question into the chat. You can also copy it below.Need help using this tool? Ask AI
View the question
Enter a number a and a modulus m below to get the modular inverse of a (if it exists), with the Extended Euclidean steps and a clock view.
About Modular Multiplicative Inverse Calculator
What Is the Modular Multiplicative Inverse?
The modular multiplicative inverse of an integer a with respect to modulus m is an integer x in the range [0, m-1] such that:
It is written as a⁻¹ (mod m) and is analogous to the multiplicative inverse in ordinary arithmetic (i.e., 1/a), but in the world of modular arithmetic.
Key condition: The inverse exists if and only if gcd(a, m) = 1 — that is, a and m must be coprime.
At a Glance
Modular Multiplicative Inverse Calculator finds x such that a*x is congruent to 1 modulo m. It uses the Extended Euclidean Algorithm and reports when no inverse exists because a and m share a factor.
| Feature | What you get | Good for |
|---|---|---|
| Integer and modulus | Enter an integer a and a modulus m of at least 2. Negative integers are reduced modulo m first. | Inverse problems in modular arithmetic |
| Canonical result | The inverse is reported in the range 0 to m - 1, for example 3^-1 mod 7 = 5. | Getting one standard answer |
| Extended Euclid | Solves a*x + m*y = gcd(a, m) and shows the steps of the Extended Euclidean Algorithm. | Showing work in number theory classes |
| Coprime check | Computes the GCD to test whether a and m are coprime. If not, no inverse exists, as with 2 mod 9. | Understanding why an inverse is missing |
| Fermat's method | When the modulus is prime, the page supports the Fermat's Little Theorem method, a^(m-2) mod m. | Prime moduli in competitive programming |
| Example buttons | Presets cover 3 mod 7, 5 mod 11, RSA 17 mod 3120, a no-inverse case and an affine cipher 7 mod 26. | Cryptography practice problems |
How It Is Calculated: Extended Euclidean Algorithm
The most efficient method uses the Extended Euclidean Algorithm. It finds integers x and y satisfying Bézout's identity:
When gcd(a, m) = 1, taking both sides mod m gives a·x ≡ 1 (mod m), so x is the modular inverse.
Example: Find 3⁻¹ (mod 7):
Extended GCD gives: 3·(5) + 7·(-2) = 15 − 14 = 1, so 3⁻¹ ≡ 5 (mod 7). Verify: 3 × 5 = 15 = 2×7 + 1 ≡ 1 (mod 7) ✓
Applications in Cryptography & Mathematics
Frequently Asked Questions
Reference this content, page, or tool as:
"Modular Multiplicative Inverse Calculator" at https://MiniWebtool.com/modular-multiplicative-inverse-calculator/ from MiniWebtool, https://MiniWebtool.com/
by miniwebtool team. Updated: Feb 18, 2026
Chat with your favorite AI
For Gemini, paste the copied question into the chat. You can also copy it below.
View the question
Advanced Math Operations:
- Adjacency Matrix Calculator New
- Antilog Calculator
- Beta Function Calculator
- Binomial Coefficient Calculator
- Binomial Probability Distribution Calculator
- Bitwise Calculator Popular
- Boolean Algebra Simplifier Popular
- Central Limit Theorem Calculator
- Chinese Remainder Theorem Calculator
- Combination Calculator
- Complementary Error Function Calculator
- Complex Number Calculator
- Continued Fraction Calculator
- Derangement (Subfactorial) Calculator
- Dijkstra's Shortest Path Calculator
- Entropy Calculator
- Error Function Calculator
- Euler's Totient Function Calculator
- Exponential Decay Calculator Popular
- Exponential Growth Calculator
- Exponential Integral Calculator Popular
- Exponents Calculator
- Extended Euclidean Algorithm Calculator
- Factorial Calculator
- Gamma Function Calculator
- Golden Ratio Calculator
- Graph Coloring Calculator New
- Graph Degree Sequence Validator
- Group Theory Order Calculator New
- Half Life Calculator
- Hamiltonian Path Checker New
- Inclusion-Exclusion Calculator New
- Karnaugh Map (K-Map) Solver New
- Linear Programming Solver Popular
- Markov Chain Steady State Calculator
- Minimum Spanning Tree Calculator
- Modular Exponentiation Calculator New
- Modular Multiplicative Inverse Calculator
- Negative Binomial Distribution Calculator New
- Network Flow Calculator (Max Flow) New
- Percent Growth Rate Calculator Popular
- Permutation Calculator
- Permutations with Repetition Calculator New
- Pigeonhole Principle Calculator
- Planar Graph Checker New
- Poisson Distribution Calculator
- Polynomial Roots Calculator
- Primitive Root Calculator
- Probability Calculator
- Probability Distribution Calculator
- Proportion Calculator
- Quadratic Formula Calculator
- Ring and Field Calculator New
- Rounding Calculator New
- Scientific Calculator
- Scientific Notation Calculator
- Set Theory Calculator
- Significant Figures Calculator New
- Stable Marriage Problem Solver New
- Stirling Numbers Calculator
- Sum of Cubes Calculator
- Sum of Positive Integers Calculator
- Sum of Squares Calculator
- Topological Sort Calculator New
- Traveling Salesman Solver (TSP) Popular
- Truth Table Generator
- Venn Diagram Generator (3 Sets)
- Big Number Calculator New