What this calculator does
Euler's totient, written φ(n), counts how many integers from 1 to n share no common factor with n. It is a core function in number theory and appears in modular arithmetic, cryptography, and the structure of the multiplicative group modulo n. The direct way to compute it is to factor n, then multiply n by (1 - 1/p) for each distinct prime factor p. That is much faster than testing every integer for coprimality, especially for large n. This calculator does the factorisation, reports the distinct primes, the radical, the divisor count, and whether n is prime. It also shows φ(n) as a share of n, which makes the effect of small prime factors easy to see.
How to use it
- Enter a whole number from 1 to 1,000,000,000.
- Read the totient φ(n) as the count of coprime integers.
- Check the distinct prime factors used in the formula.
- Use the radical to see the product of the distinct primes.
- Compare φ(n) with n to see how much the prime factors reduce the count.
- Use the prime check for a quick primality screen, not a proof for every use.
How it works
Example calculations
Example 1: φ(36) = 12
36 factors as 2² × 3². The distinct primes are 2 and 3, so φ(36) = 36 × 1/2 × 2/3 = 12. The integers 1, 5, 7, 11, 13, 17, 19, 23, 25, 29, 31, and 35 are coprime with 36. The totient is one third of 36.
Example 2: φ(100) = 40
100 = 2² × 5², so φ(100) = 100 × 1/2 × 4/5 = 40. The number has 9 positive divisors and a radical of 10. The totient is 40% of n, which shows how the two small prime factors remove a large share of the integers.
Example 3: φ(97) = 96
97 is prime, so its only distinct prime factor is 97. φ(97) = 97 - 1 = 96. Every integer from 1 to 96 is coprime with 97. The calculator reports the number as prime, the radical as 97, and two positive divisors, 1 and 97.
What the result means
The totient is a count, so it is always a whole number. For a prime p, φ(p) = p - 1; for a prime power p^a, φ(p^a) = p^a - p^(a-1). The ratio φ(n)/n shows how much the distinct prime factors reduce the count, and it depends only on which primes divide n, not on their exponents. The radical is the product of the distinct primes, which is useful when comparing numbers with the same prime support. The prime check is reliable for the integer entered, but for cryptographic or proof-level work you should use a dedicated primality test and exact arithmetic.
Common mistakes
- Counting prime factors with multiplicity instead of distinct primes.
- Using n - 1 for a composite number.
- Forgetting that φ(1) = 1 by convention.
- Assuming φ(ab) = φ(a)φ(b) without checking that a and b are coprime.
- Confusing the totient with the divisor count or the radical.
- Relying on a single primality screen for a security-critical decision.
Assumptions and limits
- n is a whole number in the supported range.
- The factorisation is exact for the integer entered.
- The formula uses distinct prime factors, not exponents.
- φ(1) is treated as 1 by convention.
- The prime check is a simple factor-based screen.
- Very large n beyond the supported range is clamped, not computed exactly.
Frequently asked questions
What does Euler's totient count?
It counts the integers from 1 to n that are coprime with n, meaning they share no common factor greater than 1. For example, φ(10) = 4 because 1, 3, 7, and 9 are coprime with 10.
Why is φ(p) = p - 1 for a prime?
Every integer from 1 to p - 1 is coprime with p, because a prime has no divisors other than 1 and itself. So all p - 1 of them count.
Is φ(1) equal to 1?
Yes, by convention. The only integer from 1 to 1 is 1, and gcd(1, 1) = 1, so it counts as coprime.
What is the radical?
The radical of n is the product of its distinct prime factors, each taken once. For 36 = 2² × 3², the radical is 2 × 3 = 6.
Does the calculator work for very large numbers?
It supports whole numbers up to 1,000,000,000. Larger inputs are clamped to that limit. Exact computation for much larger numbers needs a different factorisation approach.
Where is the totient used?
It appears in modular arithmetic, Euler's theorem, RSA key generation, and the study of cyclic groups. It is a foundational number-theory function rather than a everyday measurement.
Sources
2026 update
How to use the professional output
This page is not just a formula box. The result is designed to be checked, compared, and taken away.
- Professional worksheet. The result includes the inputs used, the method and scope, and a one-variable sensitivity check for finance calculators.
- A/B scenarios. Save two input sets in the browser and compare the primary, secondary, and breakdown figures side by side.
- Print / PDF and CSV. Print a branded worksheet, or export the year-by-year table when the calculator produces one.
The formulas and assumptions above still govern the number. The worksheet makes the estimate auditable; it does not make it a lender quote, tax return, or personalized advice.