Divisor Function Calculator - Find Sigma & Tau of n

Any whole number from 1 to 10¹⁸. Commas and spaces are ignored.

n = 360 24 divisors from just three primes — the classic highly composite number.

σ(360) — the sum of all 24 divisors of 360

1,170

τ(360) — how many divisors

24

4 × 3 × 2 = 24, one factor for each prime, each exponent plus one.

Prime factorization

360 = 2^3 × 3^2 × 5

3 distinct primes (ω), counted with multiplicity 6 (Ω). Every divisor is one of the 24 ways to pick exponents from these.

Proper divisor sum s(n)

810

σ(n) − n, the aliquot sum

Abundancy σ(n)/n

3.2500

2.0000 exactly = perfect

Verdict

abundant

450 above 2n

Divisor density

15

average gap between divisors

How both answers are built, one prime power at a time

τ multiplies the exponents plus one. σ multiplies the geometric series each prime contributes. Nothing here depends on the other primes — that independence is what “multiplicative” means.

Prime powerτ factor (a + 1)σ factor 1 + p + … + pᵃValue
2341 + 2 + 4 + 815
3231 + 3 + 913
521 + 56
Productτ = 2415 × 13 × 6σ = 1,170

σ(n) against the 2n line — deficient, perfect or abundant

n itself = 360proper divisors = 810the 2n line = 720

The bar overshoots the marker by 450, so 360 is abundant. Roughly a quarter of all integers are, and every multiple of a perfect or abundant number is abundant too.

The divisors themselves (24 of them)

1234568910121518202430364045607290120180360

They pair off around √n: 1 × 360 = 360, 2 × 180 = 360, and so on inward. That pairing is why you only ever have to search up to √n ≈ 18 to find them all.

σ2(360) — each divisor raised to the power 2, then added

201,110

Same product rule, one change: every prime p becomes p2 in the series. σ2(n) is still multiplicative, still needs only the factorization, and still never touches an individual divisor.

Aliquot chain — keep replacing each number by its proper divisor sum

3608101,3682,5323,4042,9803,3204,2405,804

Still climbing after 8 steps. Whether every chain eventually stops is the Catalan–Dickson conjecture, open since 1888 — 276 is the smallest number whose fate is unknown.

How the neighbors compare — divisor counts do not change smoothly

358
τ 4 · σ 540
359
τ 2 · σ 360
360
τ 24 · σ 1,170
361
τ 3 · σ 381
362
τ 4 · σ 546

Consecutive integers are coprime, so nothing about τ(n) constrains τ(n + 1). A number with dozens of divisors can sit right beside a prime with two.

How to Use This Calculator

  1. Type the number in n. Anything up to 19 digits works, and commas are ignored, so pasting 963,761,198,400 straight out of a spreadsheet is fine.
  2. Read σ(n) at the top for the sum of all divisors and the s(n) card for the sum of the proper ones. Textbook problems switch between the two without warning — the difference is always exactly n.
  3. Use the per-prime table to show your work. The τ column is each exponent plus one; the σ column is the geometric series that prime contributes.
  4. Check the 2n line to classify n as deficient, perfect or abundant without doing a second calculation.
  5. Change the σₖ dropdown when a problem asks for the sum of squares or cubes of the divisors rather than the divisors themselves — same rule, with p replaced by pᵏ.

Share this calculator

Help others solve their calculations

Found this calculator helpful? Share it with your friends, students, or colleagues who might need it!

How a Divisor Function Calculator Finds sigma(n) and tau(n) from Factors

About the Author

Marko Šinko - Co-Founder & Lead Developer

Marko Šinko

Co-Founder & Lead Developer, AI Math Calculator

Lepoglava, Croatia
Advanced Algorithm Expert

Croatian developer with a Computer Science degree from University of Zagreb and expertise in advanced algorithms. Co-founder of award-winning projects, ensuring precise mathematical computations and reliable calculator tools.

📅 Published:
Divisor Function Calculator showing a prime factor tree with each divisor counted by tau and added up by sigma into the divisor sum

A divisor function calculator gets two answers out of one factorization. Give it 60, it writes 60 = 2² · 3 · 5, and from those three exponents alone it reports τ(60) = 12 divisors adding up to σ(60) = 168 — without ever checking whether 7 divides 60, or 8, or 59.

That trade is the entire subject. Factor once, and every divisor question becomes a product of small terms. Skip the factorization and you are back to testing candidates one at a time, which is fine for 60 and hopeless for a quintillion: 10¹⁸ = 2¹⁸ · 5¹⁸ has exactly 361 divisors, and finding them by division would take a billion tests to reach √n.

Five Functions, One Factorization — Which One Answers Your Question

Half the wrong answers in this topic are the right calculation applied to the wrong function. Here is the whole family, evaluated on n = 60 so you can see them side by side.

You wantFunctionProduct rulen = 60
How many divisorsτ(n) = d(n) = σ₀(n)Π (aᵢ + 1)12
Sum of all divisorsσ(n) = σ₁(n)Π (p^(a+1) − 1)/(p − 1)168
Sum of proper divisorss(n) = σ(n) − nsubtract n at the end108
Sum of squared divisorsσ₂(n)Π (p^(2a+2) − 1)/(p² − 1)5,460
Count of coprimes below nφ(n)Π p^(a−1)(p − 1)16

Two traps live in that table. The first is the phrase “sum of divisors”, which some courses use for σ(n) = 168 and others for the proper-divisor sum s(n) = 108. Perfect-number problems always mean the second; formula sheets almost always mean the first. The gap is exactly n, so a 60-off answer is nearly always this and not an arithmetic slip.

The second is φ(n), which counts numbers coprime to n rather than numbers dividing n. It shares the same multiplicative machinery and nothing else — the Euler phi calculator handles that one. If a question mentions fractions in lowest terms or modular inverses, it wants φ; if it mentions factors, remainders or divisibility, it wants τ or σ.

Exponents Plus One: Where τ(n) Comes From

Write n = 2³ · 3² · 5 — that is 360. Any divisor of 360 is built by choosing how many 2s to take (0, 1, 2 or 3), how many 3s (0, 1 or 2) and how many 5s (0 or 1). The choices are independent, so multiply them: 4 × 3 × 2 = 24 divisors. That is the whole derivation, and it is why the rule is exponents plus one rather than exponents.

Run it on the neighbors and the spikiness of divisor counts becomes obvious. 360 has 24 divisors; 361 = 19² has 3; 362 = 2 · 181 has 4. Nothing about a number’s size predicts its divisor count — only its prime factorization does. A factor calculator that lists divisors one by one is doing 360 units of work to learn what the exponents give away in three multiplications.

One consequence is worth memorizing: τ(n) is odd exactly when n is a perfect square. Divisors normally pair up as d and n/d, so they come in twos; only when d = n/d does a divisor stand alone. 36 has 9 divisors, 1024 has 11, and any number with an odd divisor count is a square, no exceptions.

Inside a Divisor Function Calculator: One Geometric Series Per Prime

σ works the same way, except each prime contributes a sum instead of a count. All the powers of 2 dividing 360 are 1, 2, 4, 8; all the powers of 3 are 1, 3, 9; the powers of 5 are 1, 5. Multiply out (1+2+4+8)(1+3+9)(1+5) and every term of the expansion is a distinct divisor of 360, each appearing once. So:

σ(360) = 15 × 13 × 6 = 1,170

s(360) = 1,170 − 360 = 810

Each bracket is a geometric series, so it has the closed form σ(pᵃ) = (pa+1 − 1)/(p − 1). For a bigger case take 5040 = 2⁴ · 3² · 5 · 7:

τ(5040) = 5 × 3 × 2 × 2 = 60

σ(5040) = 31 × 13 × 6 × 8 = 19,344

Sixty divisors, and not one of them was listed. Now the caveat that catches people: σ is multiplicative only across coprime pieces. σ(4) = 1 + 2 + 4 = 7, but σ(2) · σ(2) = 3 × 3 = 9. Splitting 4 into 2 × 2 double-counts, because the two halves share a prime. Split by prime powers — 360 into 8, 9 and 5, never into 6 and 60 — and the rule holds every time. When you need to check whether two numbers share a factor before applying it, a GCF calculator settles it in one step.

The 2n Line: Deficient, Perfect, Abundant

Compare σ(n) with 2n and every integer sorts into one of three classes. The reason 2n is the threshold is that σ(n) already includes n itself, so σ(n) = 2n means the other divisors rebuild n exactly.

nσ(n)σ(n)/nClass
1024 = 2¹⁰2,0471.9990deficient by 1
28562.0000perfect
945 = 3³·5·71,9202.0317smallest odd abundant
3601,1703.2500abundant
504019,3443.8380strongly abundant

Powers of two are the near-misses of number theory: σ(2ᵏ) = 2k+1 − 1, one short of 2n every single time. 12 is the smallest abundant number, and odd abundant numbers are rare enough that the first is 945 — everyone guesses smaller.

Perfect numbers come from a two-line argument. If 2ᵖ − 1 is prime, then n = 2p−1(2ᵖ − 1) has σ(n) = (2ᵖ − 1) · 2ᵖ = 2n, because the two pieces are coprime. That is Euclid’s construction; Euler proved every even perfect number looks like this. With p = 13 you get 2¹² · 8191 = 33,550,336, and the search for more is the same search that hunts Mersenne primes. Whether an odd perfect number exists is still open after 2,000 years — it has been ruled out below 10¹⁵⁰⁰.

Feed n and s(n) back through the same function and you get amicable pairs: s(220) = 284 and s(284) = 220, so those two numbers point at each other forever. The amicable numbers calculator chases longer chains too.

Divisor Counts Jump Around; Their Averages Don’t

Individual values of τ are erratic — 60 has 12 divisors and 61 has 2 — but the running average is so regular you can predict it. The average number of divisors of the integers up to N is about ln N + 2γ − 1, where γ = 0.5772 is the Euler–Mascheroni constant. At N = 200,000 that predicts 12.361 divisors per number. Summed directly, the true figure is 12.361. Three decimal places, from a formula with no divisors in it at all.

σ behaves the same way: the abundancy ratio σ(n)/n bounces between 1.0 for primes and 6 or more for extreme cases, yet its long-run average converges to π²/6 ≈ 1.6449. So a randomly chosen integer has, on average, divisors summing to about 1.64 times itself — which also explains why abundant numbers make up roughly a quarter of all integers rather than half.

The record-holders form their own sequence. These are the numbers with more divisors than anything smaller, and the pattern in their factorizations is the reason 60 minutes, 360 degrees and 5,040 crop up in every measurement system ever designed.

nFactorizationτ(n)
122² · 36
602² · 3 · 512
3602³ · 3² · 524
8402³ · 3 · 5 · 732
2,5202³ · 3² · 5 · 748
5,0402⁴ · 3² · 5 · 760

Notice what they never do: jump to a large prime. Exponents stay in descending order across ascending primes, because moving a unit of exponent to a smaller prime buys the same divisor count for a smaller n. That is also the fastest way to sanity-check a divisibility claim about a “highly composite” number: if its factorization has a big prime with a small exponent, it is not a record-holder.

Two Different Things Called Sigma, Two Called Tau

Searching for a “sigma calculator” turns up two unrelated tools, and the collision is worth naming. σ(n) with a single integer argument is the divisor function on this page. The capital Σ with an index underneath is summation notation, an instruction to add a sequence — that is a sigma notation calculator, and it has nothing to do with divisors. Statistics adds a third σ for standard deviation.

τ has the same problem. Here τ(n) counts divisors; in modular-forms work τ(n) is Ramanujan’s tau function, whose values run τ(2) = −24 and τ(3) = 252. If a source quotes a negative tau, you are in the wrong subject. Writers who want to avoid the clash use d(n) for the divisor count, which is why you will see d(n), τ(n) and σ₀(n) all meaning the same thing.

The subscript notation is the one that generalizes. σₖ(n) sums the k-th powers of the divisors, so σ₀ counts them (every divisor to the power zero is 1) and σ₁ adds them. The identity that ties the family together is Σ σₖ(n)/nˢ = ζ(s)ζ(s − k), which is why divisor functions turn up all over analytic number theory rather than staying in the exercises.

Four Ways the Formula Gets Misused

Multiplying the exponents instead of the exponents plus one. For 360 = 2³ · 3² · 5 that gives 3 × 2 × 1 = 6 rather than 24. The tell is that the wrong answer never counts 1 or n — those are precisely the choices you delete when you drop the +1.

Applying multiplicativity to a non-coprime split. σ(12) is σ(4) · σ(3) = 7 × 4 = 28, not σ(2) · σ(6) = 3 × 12 = 36. Only splits into powers of distinct primes are safe.

Forgetting that n divides itself. Every perfect-number definition, aliquot sequence and amicable-pair check runs on s(n) = σ(n) − n. Every product formula produces σ(n). Mixing them is the single most common source of “my answer is off by exactly n”.

Trial division past √n. Divisors pair as d ↔ n/d, so scanning to the square root finds all of them: for 10¹⁸ that is 10⁹ tests instead of 10¹⁸. Factoring first beats both — the tool above reaches 963,761,198,400 and its 6,720 divisors in a couple of milliseconds.

Three checks catch most errors before they propagate. τ(n) = 2 if and only if n is prime. τ(n) is odd if and only if n is a perfect square. And σ(n) is odd only when n is a square or twice a square — σ(18) = 39 is odd because 18 = 2 · 3², while σ(20) = 42 is even. Any result that fails one of these is wrong before you check the arithmetic.

For the raw sequences, OEIS A000005 lists τ(n) and A000203 lists σ(n) for thousands of terms, and the Wikipedia divisor function article carries the full Dirichlet-series statements and the growth bounds.

Frequently Asked Questions

Still Have Questions?

The detailed content on this page provides comprehensive explanations and examples to help you understand better.