Divisor Count and Sum of Divisors Calculator

Find τ(n), σ(n), the proper-divisor sum, prime factorization, and exact product steps. Your input stays in your browser.

Enter a positive integer

Commas, spaces, or underscores may group digits in threes. Decimals, zero, and negative integers are not accepted.

Divisor results

Your result will appear here.

Try 36 to see τ(36) = 9, σ(36) = 91, and every prime-power step.

Advertisement

Divisor count and divisor sum formulas

Write a positive integer as a product of prime powers: n = p1a₁p2a₂⋯pkaₖ. A positive divisor chooses an exponent from 0 through ai for each prime independently.

Number of positive divisors: τ(n) = ∏(ai + 1)

Sum of positive divisors: σ(n) = ∏(1 + pi + pi2 + ⋯ + piaᵢ)

Geometric form: σ(n) = ∏[(piaᵢ+1 − 1) / (pi − 1)]

The sum of proper divisors is σ(n) − n because proper divisors exclude the number itself. If that sum is less than, equal to, or greater than n, the number is deficient, perfect, or abundant.

Worked divisor examples

Composite number: n = 36

36 = 22 × 32, so τ(36) = (2 + 1)(2 + 1) = 9.

σ(36) = (1 + 2 + 4)(1 + 3 + 9) = 7 × 13 = 91

The proper-divisor sum is 91 − 36 = 55, so 36 is abundant.

Perfect number: n = 28

28 = 22 × 7, giving τ(28) = 3 × 2 = 6.

σ(28) = (1 + 2 + 4)(1 + 7) = 7 × 8 = 56

The proper divisors sum to 56 − 28 = 28, so 28 is perfect.

Prime number: n = 13

13 = 131, so τ(13) = 1 + 1 = 2.

σ(13) = 1 + 13 = 14

Every prime has exactly two positive divisors and proper-divisor sum 1.

Special case: n = 1

The prime factorization of 1 is an empty product.

τ(1) = 1 and σ(1) = 1

Its only positive divisor is 1, and it has no proper positive divisors.

Common divisor-function values

nPrime factorizationτ(n)σ(n)Proper sum
1Empty product110
62 × 34126
1222 × 362816
162453115
2822 × 765628
10022 × 529217117

Divisor count and sum FAQ

How do you calculate the number of divisors?

Factor n into prime powers. Add 1 to each exponent and multiply: if n = p1a₁⋯pkaₖ, then τ(n) = (a₁ + 1)⋯(aₖ + 1). The added 1 includes choosing exponent zero.

How do you calculate the sum of all positive divisors?

For every prime power pa, form 1 + p + p2 + ⋯ + pa, then multiply those sums. This calculator uses exact BigInt arithmetic throughout, so the result has no floating-point rounding.

Do 1 and n count as divisors?

Yes. “Positive divisors” includes both 1 and n. “Proper divisors” includes 1 but excludes n, so their sum is σ(n) − n.

What makes a number perfect, abundant, or deficient?

Compare the sum of proper divisors with the number. Equality means perfect, a larger sum means abundant, and a smaller sum means deficient. For example, 28 is perfect, 12 is abundant, and 16 is deficient.

Is there a shortcut for prime numbers?

Yes. A prime p has divisors 1 and p, so τ(p) = 2 and σ(p) = p + 1. Conversely, a positive integer greater than 1 with exactly two positive divisors is prime.

How large a number can this calculator use?

The accepted range is 1 through 1 trillion. Prime factorization runs in a background worker with a five-second limit so a difficult large prime or semiprime cannot leave the page unresponsive.

Is my input private?

Yes. The input is factored and evaluated locally in your browser. This calculator does not upload, store, or add it to the page URL.

Explore more tools