Euler Totient Calculator

Enter any positive integer and get phi(n) — the count of integers from 1 to n that share no common factor with n — with a full factorization breakdown.

Compute phi(n)

Supported range: 1 – 10,000,000

Quick examples

Enter a value and click Compute

Summary

Enter any positive integer and get phi(n) — the count of integers from 1 to n that share no common factor with n — with a full factorization breakdown.

How it works

  1. Enter a positive integer n in the input field.
  2. The calculator finds the prime factorization of n.
  3. phi(n) is computed using the product formula: n * product of (1 - 1/p) for each distinct prime p dividing n.
  4. The step-by-step breakdown shows each prime factor and its contribution.
  5. For n up to 200, the list of all coprime integers is also displayed.

Use cases

  • Verify RSA key generation steps that depend on phi(n).
  • Explore number theory problems involving Euler's theorem.
  • Check results for cryptography and discrete math coursework.
  • Find how many integers below n are coprime with n for any modulus.
  • Understand primitive roots by knowing the order of the multiplicative group.
  • Confirm that phi(p) = p - 1 for prime p.

Frequently Asked Questions

Last updated: 2026-06-13 · Reviewed by Nham Vu