Euler's Totient Function (Phi φ(n)) Calculator

Euler's Totient Function (Phi φ(n)) Calculator

Local Processing

Calculate Euler totient φ(n) counting integers up to n that are relatively prime to n.

How It Works & Processing Standards

Enter values above to calculate results automatically. Check each input field for guidance and units.

Tool processing runs in your browser. If you create a calculator or conversion share link, its values are included in the URL. See the privacy policy for account, analytics and advertising data.

φ(n) = n × Π(1 − 1/p) over the distinct prime factors p of n. For a prime p, φ(p) = p − 1.

How to Use Euler's Totient Function (Phi φ(n)) Calculator

  1. 1
    Enter nAn integer of 1 or more.
  2. 2
    Read the resultThe count of integers up to n that are coprime to n.
  3. 3
    Use itIn RSA examples, check that φ(p × q) = (p − 1)(q − 1).

Examples

φ(36)
Input: n 36
Result: 12
Prime 97
Input: n 97
Result: 96

Common Use Cases

  • Checking number theory homework
  • Studying how RSA works
  • Counting reduced fractions with denominator n

Frequently Asked Questions (FAQ)

What is φ(1)?

1 (by convention 1 is coprime to itself).

Does it handle large numbers?

Yes, as long as the number can be factored; very large numbers can take a while.

Have feedback or ideas for this tool? Suggest & Inquire →