Divisor Sum Calculator

Enter a positive integer to get the sum and count of its divisors.

Result

1,170
24

How it is calculated

The tool finds every positive divisor of n by testing each i from 1 up to √n. Whenever i divides n, both i and its partner n / i are added, counting a perfect-square root only once. This gives σ(n), the sum of all divisors including 1 and n, and τ(n), how many divisors there are. Equivalently, if n = pa × qb × … then σ(n) is the product of (1 + p + … + pa) for each prime. The input must be a whole number from 1 to 100,000,000; decimals, zero, negatives and larger numbers give no result.

Worked example

Take n = 360. Its prime factorisation is 23 × 32 × 5. The divisor sum multiplies the parts: (1+2+4+8) × (1+3+9) × (1+5) = 15 × 13 × 6 = 1,170. The divisor count is (3+1) × (2+1) × (1+1) = 24. Since 1,170 is greater than 2 × 360 = 720, 360 is an abundant number.

Try this example →

Common mistakes

  • Expecting the sum to exclude n itself. This σ(n) includes n, so a perfect number such as 28 shows 56, which is 2n, not 28.
  • Comparing σ(n) with n instead of 2n when classifying. Perfect means σ(n) = 2n, abundant means more than 2n.
  • Entering a decimal or a negative number; only positive whole numbers up to 100,000,000 are accepted.
  • Mixing up the divisor count and the divisor sum, which are the two results shown. 360 has 24 divisors but they add up to 1,170.
  • Counting only prime divisors. Every divisor is included, composite ones like 12 and 36 as well as 1 and n.

About this calculator

The divisor sum function, σ(n), adds up every positive divisor of an integer n, including 1 and n itself — for example, σ(12) = 1+2+3+4+6+12 = 28. It's a foundational function in elementary number theory, alongside the related divisor-count function τ(n).

σ(n) is central to classifying numbers by how their divisors compare to n itself: a perfect number satisfies σ(n) = 2n (like 6 or 28), an abundant number has σ(n) > 2n, and a deficient number has σ(n) < 2n. This calculator returns both σ(n) and the count of divisors for any positive integer.

Was this helpful?

You can pick up to 3 reactions.

Comments (1)

  • Editorial team

    A quick sanity check: for a prime p the sum is p + 1 and the count is 2, and subtracting n from the sum gives the sum of its proper divisors. That is how amicable numbers show up: 220 gives 504, so its proper divisors total 284, while 284 gives 504 and returns 220. The perfect numbers 6, 28, 496, 8,128 and 33,550,336 all fit under the tool's 100,000,000 limit. Which number or family of numbers are you exploring?

Popular calculators

All Calculators