CalcWorldHub
Free online calculator · no signup

Euler totient calculator

Euler’s totient φ(n) counts positive integers up to n that are relatively prime to n.

Euler totient calculator — Positive integer n and calculation method
Euler totient calculator: inputs and calculation method.

How to use this calculator

Euler’s totient φ(n) counts positive integers up to n that are relatively prime to n.

  1. Enter Positive integer n. Match the units shown beside each field and review the result together with the assumptions below.
  2. Read the worked example below to check the expected input format and result.
  3. Compare another scenario by changing one input at a time. Use Reset to return to the starting values.
Calculation guide

How Euler totient calculator works

Euler’s totient φ(n) counts positive integers up to n that are relatively prime to n.

Inputs and units

  • Positive integer n: n must be a positive whole number from 1 to 10¹².

Formula and method

φ(n)=n∏ₚ|ₙ(1−1/p), where the product ranges over distinct prime divisors p of n.

Worked example

For n=36=2²·3², φ(36)=36(1−1/2)(1−1/3)=12.

Interpreting the result

There are 12 integers in {1,…,36} with greatest common divisor 1 with 36.

Assumptions and limits

The input is limited to 10¹² for practical factorization. φ(1)=1 because the single integer 1 is relatively prime to itself.

Frequently asked questions

What does relatively prime mean?

Two integers are relatively prime when their greatest common divisor is 1.

Why does n=1 return one?

The set {1} contains one integer and gcd(1,1)=1.

How do I use the Euler totient calculator?

Enter Positive integer n. Match the units shown beside each field and review the result together with the assumptions below.

What is a worked example of Euler totient?

For n=36=2²·3², φ(36)=36(1−1/2)(1−1/3)=12.

What does the Euler totient calculator calculate?

Euler’s totient φ(n) counts positive integers up to n that are relatively prime to n.

Related calculators