Skip to main content

How to Find All the Divisors of a Number (Count, Sum, and Factor Pairs)

Learn to list every factor of a number, count and sum its divisors, and tie it back to prime factorization, perfect numbers, and primes — with a worked example for 36.

Published By Li Lei
#math #divisors #factors #number theory #homework

How to Find All the Divisors of a Number (Count, Sum, and Factor Pairs)

A divisor of a whole number is any integer that divides it evenly, leaving no remainder. People also call these factors, and the two words mean the same thing here. The divisors of 12 are 1, 2, 3, 4, 6, and 12. The number 5 is not a divisor of 12, because 12 ÷ 5 leaves a remainder of 2.

This sounds simple, and for small numbers it is. But the moment a homework problem asks for "every factor of 360" or "the sum of all divisors of 48," doing it by hand gets slow and error-prone. This guide walks through how divisors actually work, the one trick that makes finding them fast, and how the whole topic connects to prime factorization, prime numbers, and perfect numbers.

What counts as a divisor

Every whole number greater than 1 has at least two divisors: 1 and itself. The number 1 divides everything, and a number always divides itself exactly once. So the factor list of 7 is just 1 and 7 — two entries, nothing in between. A number whose only divisors are 1 and itself is prime. The number 7 is prime; so are 2, 3, 5, 11, and 13.

A number with more than two divisors is composite. The number 12 is composite because it has six divisors, not two. The number 1 is the odd one out: it has exactly one divisor (itself), so it is neither prime nor composite.

One mistake I see constantly in graded homework is leaving 1 or the number itself off the list. If a worksheet says "list the factors of 9" and a student writes only "3," they have lost two of the three real factors (1, 3, 9). The count is wrong, and any later step that uses the count — like the divisor-counting formula below — falls apart.

The square root trick: divisors come in pairs

Here is the single most useful idea in this whole topic. Divisors come in pairs. If a divides N, then N ÷ a also divides N, and together they form a factor pair a × (N ÷ a) = N.

For 36, the factor pairs are 1×36, 2×18, 3×12, 4×9, and 6×6. Notice that the smaller member of each pair never goes above 6, and 6 is the square root of 36. That is not a coincidence. In every pair, one number is at most √N and the other is at least √N. So to find all divisors of N, you only need to test the integers from 1 up to √N. For each one that divides evenly, you get its partner for free by dividing.

This is exactly how a good divisors calculator stays fast even on large numbers. Instead of testing all 360 candidates below 360, it tests only the 18 or so up to √360 ≈ 18.97 and reads off each partner. The work shrinks from N steps to about √N steps, which is the difference between instant and sluggish once your numbers get big.

There is a neat side effect: a number has an odd number of divisors only when it is a perfect square, because that middle pair (like 6×6 for 36) is a single repeated number rather than two distinct ones. Every other number has divisors in clean two-by-two pairs, giving an even count.

Worked example: the divisors of 36

Let me do 36 fully by hand, the way the square-root trick says to.

Test each integer from 1 up to 6 (since √36 = 6):

  • 1 divides 36 → partner 36. Pair: 1×36
  • 2 divides 36 → partner 18. Pair: 2×18
  • 3 divides 36 → partner 12. Pair: 3×12
  • 4 divides 36 → partner 9. Pair: 4×9
  • 5 does not divide 36 (remainder 1) → skip
  • 6 divides 36 → partner 6. Pair: 6×6

Collecting both members of each pair and sorting gives the full divisor list:

1, 2, 3, 4, 6, 9, 12, 18, 36 — nine divisors.

Now the two summary numbers teachers love to ask for:

  • Number of divisors: 9. It is odd, which confirms 36 is a perfect square.
  • Sum of divisors: 1 + 2 + 3 + 4 + 6 + 9 + 12 + 18 + 36 = 91.

That is the whole job for 36, done in six division checks instead of thirty-five.

How prime factorization gives you the count and sum

You do not always have to list every divisor to count them. Prime factorization gives you a shortcut.

Write the number as primes raised to powers. For 36, that is 2² × 3². To find how many divisors it has, take each exponent, add 1, and multiply:

(2 + 1) × (2 + 1) = 3 × 3 = 9.

That matches the nine divisors we found by hand. The logic is that every divisor is built by choosing how many 2s to include (0, 1, or 2) and how many 3s (0, 1, or 2), which is 3 × 3 = 9 combinations.

The sum of divisors has a similar formula. For each prime power, add up its powers from the zeroth on up, then multiply those running totals:

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

Again it matches. If you want the prime breakdown to feed into these formulas, a dedicated prime factorization tool gives you the exponents directly, and from there the divisor count and sum are a couple of small multiplications. This is the cleanest way to handle a number too big to list factors for comfortably, like 720 = 2⁴ × 3² × 5, which has (4+1)(2+1)(1+1) = 30 divisors.

Perfect numbers and why divisor sums matter

The sum of divisors leads straight to one of the prettiest ideas in elementary number theory: perfect numbers.

A perfect number equals the sum of its proper divisors — every divisor except the number itself. The smallest is 6: its proper divisors are 1, 2, and 3, and 1 + 2 + 3 = 6. The next is 28, since 1 + 2 + 4 + 7 + 14 = 28. After that come 496 and 8128, and they get rare fast.

Watch the wording carefully, because it trips people up. The sum of all divisors of 6 is 1 + 2 + 3 + 6 = 12, which is twice 6. The sum of proper divisors is 12 − 6 = 6. A problem that says "sum of divisors" usually means all of them; "perfect number" tests the proper ones. Mixing the two up is the third classic homework mistake, right after dropping 1 and confusing factors with multiples (factors divide into a number, multiples are built by multiplying it — they run in opposite directions).

Putting it to work on homework

When you sit down with a factor problem, the routine is short:

  1. Test integers from 1 to √N; each one that divides cleanly gives a factor pair.
  2. Collect and sort both members of every pair — that is your full divisor list.
  3. Count them (odd count means perfect square).
  4. Add them for the divisor sum, or use the prime-factorization formulas if the number is large.
  5. Check the flags: two divisors means prime; proper divisors summing to N means perfect.

Whether you grind it out by hand to learn the mechanics or check your answer in one click, the structure is always the same. Find the pairs, read off the count and sum, and the prime and perfect questions answer themselves.


Made by Toolora · Updated 2026-06-13