Numbers, Units & Calculators
Modular Inverse Calculator
Calculate a result with Modular Inverse from the values you enter. Enter the required values, adjust the options, and review the calculated result.
This tool runs open-source code from CyberChef by GCHQ (Apache License 2.0). See open-source credits.
Modular Inverse Calculator finds x where a×x equals 1 modulo m.
It returns 4 because 3×4 mod 11 equals 1. The calculation runs in your browser. Processing runs in the browser.
Instructions
- Provide values for this tool.
- Enter a and modulus m.
- Check that an inverse exists.
- Verify a×x modulo m.
Example
Input: a = 3; m = 11
Settings: Modular Inverse Calculator: Value a: 3; modulus m: 11.
Result: It returns 4 because 3×4 mod 11 equals 1.
Limits
- Modular Inverse Calculator: An inverse exists only when a and m are coprime.
- Modular Inverse Calculator: Inputs must use the accepted integer form.
- Modular Inverse Calculator: It does not factor large numbers for you.