Euler's Totient Calculator

Enter n to find how many numbers up to n are coprime to it.

A whole number from 1 to 10^15.

Try

Result

You enteredn=100n = 100

40\displaystyle 40

Prime factorisation

22×52\displaystyle 2^{2} \times 5^{2}

Numbers from 1 to n sharing a factor with n

60\displaystyle 60
Show the work
  1. Prime factorisation

    The totient depends only on the distinct primes that divide n=100n = 100, so factor it first.

    100=22×52100 = 2^{2} \times 5^{2}
  2. Euler's product formula

    Each prime pp dividing nn removes the fraction 1/p1/p of the numbers, those that are multiples of pp, and the primes act independently.

    Using φ(n)=n∏p∣n(1−1p)\varphi(n) = n \prod_{p \mid n} \left(1 - \dfrac{1}{p}\right)

    φ(100)=100(1−12)(1−15)=100×12×45=40\begin{aligned} \varphi(100) &= 100\left(1 - \frac{1}{2}\right)\left(1 - \frac{1}{5}\right) \\ &= 100 \times \frac{1}{2} \times \frac{4}{5} \\ &= 40 \end{aligned}
  3. Result

    So φ(100)=40\varphi(100) = 40.

Worked examples