How this calculation works
The summatory totient adds Euler’s totient values over every positive integer through an inclusive cutoff. An exact sieve computes the total together with two equivalent counting interpretations: ordered coprime lattice pairs in the positive N-by-N square and the number of reduced fractions in the Farey sequence of order N. The table samples cumulative endpoints when N is large; the final total always includes every value.
Φ(N)=Σ_(k=1)^N φ(k); ordered positive coprime pairs=2Φ(N)−1; Farey length=Φ(N)+1.A worked example
For N=5, the totients are 1,1,2,2 and 4, giving Φ(5)=10. There are 2×10−1=19 ordered coprime positive pairs with both coordinates at most five. The Farey sequence contains eleven fractions when 0/1 and 1/1 are included. These totals refer to different objects, so the extra one and minus one must not be interchanged.
Good to know
Cutoffs are integers from 1 through 1,000,000. The convention φ(1)=1 is included. Coprime-pair coordinates run from 1 to N; axes, negative coordinates and the origin are excluded. Farey length includes both endpoints. At most 100 cumulative table endpoints are shown, with the final endpoint always retained. This is an exact finite sieve, not an asymptotic approximation.
Reference: SymPy — Euler totient (opens in a new tab) ↗
Count one triangular half of the lattice first
For a fixed denominator k>1, exactly φ(k) positive numerators below k are coprime to k. These occupy the strict lower triangular half of the square. Reflecting them across the diagonal produces the upper half. The only coprime diagonal pair is (1,1), because gcd(k,k)=k. Consequently the square count is twice the sum from k=2 through N, plus one.
Including φ(1)=1 rewrites that expression as 2Φ(N)−1. This is why subtracting one is necessary rather than optional. A picture including axis points would require a different correction, and a picture treating (a,b) and (b,a) as the same object would count only one triangular half. The labels specify ordered positive pairs to keep the counting convention unambiguous.
The Euler totient calculator evaluates one endpoint totient, while this page adds every totient through the endpoint and interprets the cumulative count.
Reduced fractions explain the Farey correction
Every reduced fraction strictly between zero and one has a unique positive denominator k and coprime numerator a<k. With denominators at most N, there are Σ from k=2 through N of φ(k) such fractions. Adding 0/1 and 1/1 gives Φ(N)+1. Merely counting all numerator-denominator pairs would include unreduced duplicates such as 1/2 and 2/4.
The Farey length is a count only. This page does not enumerate or sort a huge Farey sequence, which could require far more output than the totient computation itself. If a small list of reduced fractions is needed, the existing Farey sequence calculator serves that related task. The sum, square count and sequence length here provide independent consistency checks on their shared cutoff.
A sieve gives exact values without repeated factorization
The sieve starts each entry at its index. For every prime p, each multiple of p is multiplied by the factor 1−1/p once. The resulting entries implement φ(n)=n times the product of those factors over distinct prime divisors. Repeated prime powers do not trigger repeated applications of the same factor.
The total uses exact integer accumulation. When a million values are requested, showing every row would obscure the result and overload the page, so only sampled cumulative endpoints are displayed. Sampling affects presentation, never the sum. The N=1 boundary gives Φ=1, one positive coprime pair and two Farey endpoints, and is a useful check of the initial-value convention.
A few questions, answered
Does the table skip part of the total?
No. Every totient contributes to the exact sum. Only the displayed intermediate rows are sampled for large N.
Is this the same as φ(N)?
No. Euler’s totient at N counts integers coprime to that one N; Φ(N) adds totients for all indices from one through N.