Euler Totient Calculator – φ(n) Coprimes
φ(n) counts integers ≤n coprime to n: φ(12)=4 (1,5,7,11), φ(9)=6, φ(p)=p−1.
- Multiplicative rules and RSA links explained.
Figures are estimates from this calculator’s standard formula — adjust the inputs in the tool below for your exact number.
How the Euler Totient Calculator Works
Euler’s totient counts how many integers from 1 to n share no factor with n. For 12 = 2²×3: φ(12) = 12×(1−½)×(1−⅓) = 12×½×⅔ = 4 — the coprimes 1, 5, 7, 11, which the calculator lists. For prime powers, φ(9) = 9−3 = 6 (removing multiples of 3). Primes are maximal: φ(13) = 12 since nothing below shares a factor. The function is multiplicative on coprime factors: φ(10) = φ(2)×φ(5) = 1×4 = 4. The tool factorizes n, applies the product formula with each (1−1/p) shown, lists the coprimes for small n, and displays Euler’s theorem: a^φ(n) ≡ 1 (mod n) for gcd(a,n)=1 — the engine behind RSA, where ed ≡ 1 (mod φ(n)) pairs keys. For n = 1, φ(1) = 1 by convention.
- 1
Enter n
Any positive integer
- 2
Factorize
Distinct primes of n are extracted (12 → 2, 3)
- 3
Apply the product formula
n·Π(1−1/p) with each factor evaluated
- 4
List the coprimes
Small n show the actual coprime set (1, 5, 7, 11)
Use Cases
RSA Key Generation
Private exponent d solves e·d ≡ 1 (mod φ(n))
Number Theory
Verify multiplicativity: φ(10) = φ(2)·φ(5) = 4
Euler’s Theorem
Powers reduce mod n via exponents mod φ(n)
Tips
- 1
φ(p) = p−1 for every prime p
- 2
Product formula: φ(12) = 12·(1−½)·(1−⅓) = 4
- 3
φ is multiplicative on coprime inputs
Common Mistakes
Computing φ(pᵏ) as pᵏ−1 instead of pᵏ−pᵏ⁻¹
Using all prime factors with multiplicity — only distinct primes enter the formula
Assuming φ is additive: φ(m+n) ≠ φ(m)+φ(n) in general
Forgetting φ(1) = 1
FAQs
What is φ(12)?
What is φ(9)?
Why is φ(p) = p−1?
Is φ multiplicative?
Where is φ used in cryptography?
Related tools
Pick another tool to continue your calculation.
Fibonacci Calculator – Any Term & Sequence
Calculate any Fibonacci number and display the sequence.
Hyperbolic Functions Calculator – sinh, cosh
Calculate hyperbolic trigonometric functions.
Laplace Transform Calculator – Basic Functions
Calculate Laplace transform of basic functions.
Modulo Calculator – Remainder of Division
Calculate the remainder of dividing two numbers.
Significant Figures Calculator – Sig Figs
Calculate significant figures and round numbers accordingly.
Simpson’s Rule Integration Calculator
Calculate numerical integration using Simpson's rule.