Checking divisor counts and sums from a known factorization
If you know the prime factorization of a number, you can count its positive divisors and add them up without listing them. This guide builds both formulas from the divisors of 12 and then applies them to larger numbers.
Divisors as choices of exponents
Every positive divisor of a number is built from the same primes as the number itself, using each prime no more times than it appears. Take 12, which factors as 2 squared times 3. A divisor can contain the prime 2 zero, one or two times, which is three choices, and the prime 3 zero or one time, which is two choices. Every combination of the two choices gives a different divisor, and every divisor arises from exactly one combination. That is why the choices multiply: three times two is 6 positive divisors. Listing them confirms the count: 1, 2, 3, 4, 6 and 12. This idea is the whole basis of the method, and it works because the factorization into primes is unique, which is the fundamental theorem of arithmetic.
The counting rule in general
For a number n whose prime factorization is p1 to the a1, times p2 to the a2, and so on, a divisor picks an exponent between 0 and a1 for the first prime, between 0 and a2 for the second, and so on. The first prime offers a1 plus 1 choices, because zero counts. The number of positive divisors is the product of (a1 plus 1), (a2 plus 1) and so on. For 12 that is (2 plus 1) times (1 plus 1), which is 6. A prime has exponent 1 and so exactly 2 divisors, itself and 1. A prime power such as 32, which is 2 to the fifth, has 5 plus 1, or 6 divisors. The common slip is to multiply the exponents themselves instead of adding one to each, which would give 2 for 12 and miss the divisors that use a prime zero times.
Summing the divisors
The sum follows from the same product structure. Group the divisors by the power of 2 they use. The sum of the powers of 2 available is 1 plus 2 plus 4, which is 7. The sum of the powers of 3 available is 1 plus 3, which is 4. When you multiply those two sums out, each term of the expansion is a power of 2 times a power of 3, and every divisor appears exactly once. So the sum of all divisors of 12 is 7 times 4, or 28, which matches 1 plus 2 plus 3 plus 4 plus 6 plus 12. The worked cases use the Basic calculator for each product: 3 times 2 for the count and 7 times 4 for the sum. In general, the factor for a prime p to the a is 1 plus p plus p squared and so on up to p to the a.
Checking the list with a second tool
For a small number you can confirm the result by listing divisors and examining the list. Enter 1, 2, 3, 4, 6, 12 into the Average calculator and it reports a count of 6, a minimum of 1 and a maximum of 12. The count agrees with the exponent rule, and the extremes show that the list runs from 1 to the number itself. This is only a check on the list, and it does not prove that the list is complete. A missing divisor would simply give a smaller count, so the list must come from systematic testing or from the exponent method. Pairing helps: divisors come in pairs that multiply to 12, namely 1 and 12, 2 and 6, and 3 and 4. A complete list should pair off with no leftover. The average of the list is not needed for this check. Only the count and the range matter, and the other statistics the tool reports can be ignored.
A larger example: 360
Consider 360, an illustrative number often used in geometry. Its factorization is 2 cubed times 3 squared times 5. The divisor count is (3 plus 1) times (2 plus 1) times (1 plus 1), which is 4 times 3 times 2, or 24. The sum is (1 plus 2 plus 4 plus 8) times (1 plus 3 plus 9) times (1 plus 5). That equals 15 times 13 times 6, which is 195 times 6, or 1,170. So 360 has 24 positive divisors that add to 1,170. Listing 24 numbers by hand is tedious and error-prone, while the formulas take a line each. This is one reason 360 is useful for dividing a circle: it has many divisors, so many equal splits come out in whole degrees. The calculator can verify each product.
When the divisor count is odd
Divisors usually come in pairs, d and n divided by d, so the count is normally even. A number has an odd count exactly when it is a perfect square, because then one pair collapses to a single divisor, the square root. In the formula this shows up as every exponent being even, which makes every factor (a plus 1) odd and their product odd. The number 36, which is 2 squared times 3 squared, has (2 plus 1) times (2 plus 1), or 9 divisors: 1, 2, 3, 4, 6, 9, 12, 18 and 36. The number 12 is not a square and has 6, an even count. This parity test gives a quick check on any result. If the exponents are not all even, the count must be even, and if the count is odd, the number must be a square.
Perfect numbers and the sum of divisors
The divisor sum connects to an old topic. A perfect number equals the sum of its proper divisors, meaning its divisors other than itself. Equivalently, the sum of all its divisors equals twice the number. The number 28 factors as 2 squared times 7, so its divisor sum is (1 plus 2 plus 4) times (1 plus 7), which is 7 times 8, or 56. Since 56 is twice 28, the number 28 is perfect. The number 6 works too: its divisor sum is 3 times 4, or 12. Compare 12 itself. Its divisor sum is 28, which is more than twice 12, so 12 is called abundant. Euclid proved that numbers of the form 2 to the (p minus 1) times (2 to the p minus 1) are perfect when the second factor is prime, and 6 and 28 are the first two examples.
Finding the factorization first
The formulas assume you already know the prime factors and their exponents. They do not factor a number for you. For small numbers, test the primes 2, 3, 5, 7 and so on in turn, dividing out each one repeatedly, and stop when the prime exceeds the square root of what remains. For larger numbers, factoring becomes difficult, and the difficulty of factoring very large numbers underlies some public-key cryptography. If an exponent is wrong, both results are wrong. A factorization is easy to verify by multiplying the pieces back together. For 360, 8 times 9 times 5 is 360. Doing that check costs little and catches the most common error, which is stopping while a composite factor, such as 9 or 4, is still left unreduced.
What counts as a divisor here
The rule counts positive divisors only. If negative divisors were included, each positive divisor d would have a partner of minus d, and the count would double: 12 would have 12 divisors in total, from minus 12 to 12 excluding zero. The sum of all of them would be zero. Most number theory texts and most practical problems use the positive convention, which is also what the calculator formulas assume. Check which convention a problem intends before comparing answers. Some problems also ask for proper divisors, which exclude the number itself, and then the count is one less and the sum is the total minus n. For 12, the proper divisors number 5 and add to 16, and the figures 6 and 28 in this guide include 12 itself.
Numbers with many divisors
Because the count multiplies one factor per prime, numbers built from several small primes collect divisors quickly. The number 60, which is 2 squared times 3 times 5, has 3 times 2 times 2, or 12 divisors. The number 360 has 24, and 720, which is 2 to the fourth times 3 squared times 5, has 5 times 3 times 2, or 30. The number 840, which is 2 cubed times 3 times 5 times 7, has 4 times 2 times 2 times 2, or 32. Numbers that have more divisors than any smaller positive integer are called highly composite, and Srinivasa Ramanujan studied them in a paper published in 1915. The sequence begins 1, 2, 4, 6, 12, 24, 36, 48, 60, 120, 180, 240, 360, 720 and 840. Calendars, clock faces and measurement systems often favor such numbers because they split evenly in many ways.
Why the formulas split across coprime parts
Both the count and the sum are multiplicative, which means that for two numbers with no shared prime factor, the value for their product is the product of the values. Since 4 and 3 are coprime and multiply to 12, the divisor count of 12 is the count for 4, which is 3, times the count for 3, which is 2. The sum is the sum for 4, which is 7, times the sum for 3, which is 4. This is exactly the calculation in the worked cases. The shortcut fails for parts that share a prime. Splitting 12 as 2 times 6 gives a divisor sum of 3 times 12, or 36, which does not equal 28, because 2 and 6 both contain the prime 2. Always split a number into the prime powers themselves, so the pieces are guaranteed to be coprime.
Try your own values with the Positive divisor report calculator.
Reproduce the checks
Divisor count
Open the Basic calculator and enter:
- First number
3- Operation
multiply- Second number
2
Expected output:
Result
6Each independent prime exponent has its own choice count.
Divisor sum
Open the Basic calculator and enter:
- First number
7- Operation
multiply- Second number
4
Expected output:
Result
28The two geometric factor sums expand to all positive divisors.
Enumerated divisor list
Open the Average calculator and enter:
- Values
1,2,3,4,6,12
Expected output:
Number of values
6Minimum
1Maximum
12The complete small list confirms the count.
References and implementation scope
The examples describe the behavior of the linked Computandum tools. A successful local check does not establish that another application accepts the same format or applies the same limits.
Sources
- NIST: Measures of location ↗ · 2026-10-08