basic

Euler's Totient Function from Prime Factorisation Calculator

φ(n) = n · ∏ (1 − 1/pᵢ) over the distinct prime factors.

Compute Euler's totient φ(n) — the count of integers in 1..n coprime to n — directly from the prime factorisation. Enter up to 4 distinct primes pᵢ and their exponents aᵢ; the calculator forms n = ∏ pᵢ^aᵢ and applies φ(n) = n · ∏ (1 − 1/pᵢ). Set an exponent to 0 to skip that prime.

Published Last reviewed 1 min read

Inputs

Results

Enter values and click Calculate to see results.
Was this helpful?

How to use this calculator

  1. Fill in the inputs above using the units you already have.
  2. Values update automatically as you type — no submit button needed.
  3. Hover any result row for the underlying formula and intermediate values.

Formula

φ(n) = n · ∏ (1 − 1/pᵢ).

In depth

Compute Euler's totient φ(n) — the count of integers in 1..n coprime to n — directly from the prime factorisation. Enter up to 4 distinct primes pᵢ and their exponents aᵢ; the calculator forms n = ∏ pᵢ^aᵢ and applies φ(n) = n · ∏ (1 − 1/pᵢ). Set an exponent to 0 to skip that prime.