Worked Example: Worked Mathematical Example: Euler’s Totient φ(n) & Mod Inverse
Compute Euler’s totient φ(m), gcd(a, m), Bézout coefficients, and modular inverse a⁻¹ mod m.
- Specify the function parameters, matrix entries, or confusion matrix counts.
- Apply the closed-form or iterative formula: φ(m) = m × Π_{p|m} (1 − 1/p); a × a⁻¹ ≡ 1 (mod m) when gcd(a, m) = 1.
- Examine the primary result, error bounds, and 3 interactive SVG plots.
Result: Computes Euler’s Totient φ(n) & Mod Inverse via φ(m) = m × Π_{p|m} (1 − 1/p); a × a⁻¹ ≡ 1 (mod m) when gcd(a, m) = 1.
Mathematics & Statistics · Number Theory & Discrete Math
Euler’s Totient φ(n), Extended Euclidean GCD & Modular Multiplicative Inverse Calculator: inputs, method, and how to read the result
Compute Euler’s totient φ(m), gcd(a, m), Bézout coefficients, and modular inverse a⁻¹ mod m.
Choose inputs for the case you are checking
The defaults are illustrative. Replace them with values for your case and keep the units shown beside each field.
- Integer A: Base integer a to invert modulo m.
- Modulus M: Positive integer modulus m (≥ 2).
What the calculation includes
With the default values shown, Euler’s Totient φ(43) is 42 coprime integers. The calculation follows Euler’s Totient φ(n) & Mod Inverse Formula; the formula and variable definitions above show how the inputs combine.
One-input check: With the other defaults held constant, changing Modulus M from 43 mod m to 47 mod m changes Euler’s Totient φ(43) (42 coprime integers) to Euler’s Totient φ(47) (46 coprime integers). This is a comparison inside the calculator's stated model, not a prediction.
Where to use caution
- Uses exact analytical or standard numerical analysis formulations from NIST DLMF.
- Double-precision floating-point arithmetic has ~15–17 significant decimal digits of precision.
Scope: Global Mathematical & Statistical Standard Check the assumptions and limitations against your situation before relying on the estimate.
More in Mathematics & Statistics: Scientific Calculator, Statistics & Standard Deviation Calculator, Permutations, Combinations, Probability, Sample Size & P-Value Calculator.