Skip to main content

Divisor Count Calculator

Mathematics - Divisor Count Function

Divisor Count Calculator

Count the total number of divisors of any positive integer with step-by-step explanation. Learn the divisor function formula, understand how prime factorization determines divisor count, and explore properties of the tau function.

Count the Divisors

Enter a positive integer to find how many divisors (factors) it has. Click Calculate for step-by-step working using the prime factorization method.

Divisor count will appear here.
Note: The divisor function d(n) (also called τ(n) or tau) counts how many positive integers divide evenly into n. Using prime factorization n = p₁ᵃ¹ × p₂ᵃ² × ..., the formula is: d(n) = (a₁ + 1)(a₂ + 1)...(aₖ + 1). This multiplies one more than each exponent.

Divisor Count – Complete Explanation

The divisor count (also called the divisor function d(n) or τ(n)) tells you how many positive integers divide evenly into a given number. Instead of manually listing every divisor, number theory provides an elegant formula based on prime factorization: multiply one more than each exponent. This reveals deep connections between a number's prime structure and its divisibility properties.

Divisor Count Formula

If n = p₁a₁ × p₂a₂ × ... × pₖaₖ

d(n) = (a₁ + 1)(a₂ + 1)...(aₖ + 1)

Example: 36 = 2² × 3² → d(36) = (2+1)(2+1) = 3 × 3 = 9 divisors.

1. What Is the Divisor Count?

The divisor count d(n) answers the question: "How many different numbers divide evenly into n?" It's one of the most fundamental arithmetic functions in number theory.

Key facts:

  • d(1) = 1: 1 has exactly one divisor (itself).
  • d(p) = 2: Prime numbers have exactly two divisors (1 and p).
  • d(n) is odd ⇔ n is a perfect square: Perfect squares have an odd number of divisors because the square root pairs with itself.
  • d(n) is multiplicative: If a and b are coprime, d(ab) = d(a) × d(b).

2. The Divisor Count Formula Explained

The formula works by counting all possible ways to construct a divisor from the prime factorization:

For n = 36 = 2² × 3²:

Any divisor of 36 must have the form 2ˣ × 3ʸ where:

• x can be 0, 1, or 2 (3 choices for the power of 2)

• y can be 0, 1, or 2 (3 choices for the power of 3)

Total combinations: 3 × 3 = 9 possible divisors.

The 9 divisors: 2⁰3⁰=1, 2⁰3¹=3, 2⁰3²=9, 2¹3⁰=2, 2¹3¹=6, 2¹3²=18, 2²3⁰=4, 2²3¹=12, 2²3²=36.

3. How to Calculate the Divisor Count

The systematic approach:

  1. Prime factorize the number: n = p₁ᵃ¹ × p₂ᵃ² × ...
  2. For each exponent, add 1: (a₁ + 1), (a₂ + 1), ...
  3. Multiply all these values together — the product is d(n).
Why add 1? For each prime factor pᵉ, you can include p⁰, p¹, p², ..., or pᵉ in your divisor — that's (e + 1) distinct choices. The "+1" accounts for the option of not including that prime at all (the exponent 0 choice).

4. Step-by-Step Examples

Example 1: Counting Divisors of 36

Find d(36) — the number of divisors of 36.

Step 1: Prime factorize 36:
        36 = 2 × 2 × 3 × 3 = 2² × 3²

Step 2: For each exponent, add 1:
        Exponent of 2: 2 → 2 + 1 = 3
        Exponent of 3: 2 → 2 + 1 = 3

Step 3: Multiply:
        d(36) = 3 × 3 = 9

Verification — The 9 divisors of 36:
        1, 2, 3, 4, 6, 9, 12, 18, 36 ✓

Result: d(36) = 9 divisors.

Example 2: Counting Divisors of 48

Find d(48) — the number of divisors of 48.

Step 1: 48 = 2⁴ × 3¹

Step 2: Exponents + 1:
        2⁴ → 4 + 1 = 5
        3¹ → 1 + 1 = 2

Step 3: d(48) = 5 × 2 = 10

Verification — The 10 divisors of 48:
        1, 2, 3, 4, 6, 8, 12, 16, 24, 48 ✓

Result: d(48) = 10 divisors.

5. More Divisor Count Examples

d(12) = 6: 12 = 2² × 3¹ → (2+1)(1+1) = 3×2 = 6 (1,2,3,4,6,12)

d(100) = 9: 100 = 2² × 5² → (2+1)(2+1) = 3×3 = 9

d(17) = 2: 17 is prime → (1+1) = 2 (1, 17)

d(1) = 1: By definition, 1 has exactly 1 divisor.

6. Divisor Count of Perfect Squares

A number has an odd number of divisors if and only if it is a perfect square. This is because in a perfect square, every exponent in the prime factorization is even:

n = 36 = 2² × 3²:

d(36) = (2+1)(2+1) = 3 × 3 = 9 (odd)

n = 100 = 2² × 5²:

d(100) = (2+1)(2+1) = 3 × 3 = 9 (odd)

n = 144 = 2⁴ × 3²:

d(144) = (4+1)(2+1) = 5 × 3 = 15 (odd)

Why? When all exponents are even, each (exponent + 1) is odd. The product of odd numbers is odd. For non-squares, at least one exponent is odd, making at least one factor even — and any product with an even factor is even.

7. The Divisor Function d(n)

d(n) is a multiplicative arithmetic function — it's the foundation for understanding other divisor functions:

d(n) — Divisor Count: How many divisors? d(12) = 6

σ(n) — Sum of Divisors: What is the sum? σ(12) = 1+2+3+4+6+12 = 28

σₖ(n) — Sum of k-th Powers of Divisors: σ₂(12) = 1²+2²+3²+4²+6²+12²

The divisor count d(n) is equivalent to σ₀(n).

8. Highly Composite Numbers

Highly composite numbers are numbers with more divisors than any smaller positive integer. They're the "anti-primes" — designed to have as many divisors as possible relative to their size.

First few highly composite numbers:

• 1: d(1) = 1

• 2: d(2) = 2 (more than 1)

• 4: d(4) = 3 (more than 2)

• 6: d(6) = 4 (more than 3)

• 12: d(12) = 6 (more than 4)

• 24: d(24) = 8 (more than 6)

• 36: d(36) = 9 (more than 8)

• 48: d(48) = 10 (more than 9)

• 60: d(60) = 12 (more than 10)

9. Common Mistakes to Avoid

  • Forgetting to add 1 to the exponent: For 2³, the divisor count contribution is (3+1)=4, not 3. The possible powers are 0, 1, 2, 3 — four choices.
  • Adding instead of multiplying: d(2² × 3²) = (2+1) × (2+1) = 9, not (2+1) + (2+1) = 6. The formula uses multiplication.
  • Confusing d(n) with σ(n): d(n) counts the number of divisors; σ(n) sums them. d(12)=6 but σ(12)=28.
  • Thinking prime numbers have 1 divisor: Primes have exactly 2 divisors: 1 and the number itself. d(p) = 2 for all primes p.
  • Forgetting that d(1) = 1: This is a special case — the empty product gives 1.

10. Real-World Applications

  • Arranging Objects: The number of ways to arrange n identical objects into a rectangular grid equals d(n). For 12 objects, you can arrange them in 6 different rectangular configurations.
  • Cryptography: Understanding divisor counts helps in analyzing the structure of numbers used in RSA and other number-theoretic cryptographic systems.
  • Divisibility Tests: Knowing the divisor count helps verify that you've found all factors of a number.
  • Mathematics Competitions: Divisor count problems frequently appear in math olympiads and competitions.
  • Computer Science: Divisor functions are used in algorithms for primality testing and integer factorization.

11. Practice Problems with Solutions

Problem 1: How many divisors does 72 have?

Solution: 72 = 2³ × 3² → d(72) = (3+1)(2+1) = 4×3 = 12 divisors

Problem 2: How many divisors does 120 have?

Solution: 120 = 2³ × 3 × 5 → d(120) = (3+1)(1+1)(1+1) = 4×2×2 = 16 divisors

Problem 3: Why does 64 have fewer divisors than 60?

Solution: d(64) = d(2⁶) = 7. d(60) = d(2²×3×5) = 3×2×2=12. Having more distinct primes (even with smaller exponents) produces more divisors than a single large exponent.

Problem 4: Find a number with exactly 6 divisors.

Solution: Many possibilities. One is 12 = 2²×3 → (2+1)(1+1)=6. Another is 18 = 2×3² → 6. Another is 20 = 2²×5 → 6.

12. Tips for Mastering Divisor Count

  • Memorize the formula: d(n) = Π(eᵢ + 1) — multiply one more than each exponent.
  • For prime numbers, d(p) = 2 — instant and simple.
  • Perfect squares always have an odd divisor count — a quick check for squareness.
  • The number of distinct prime factors tends to increase divisor count more than large exponents on a single prime.
  • Use prime factorization as your foundation — it unlocks divisor count, sum, and many other properties.

13. Final Thoughts

The divisor count d(n) is one of the most elegant functions in number theory — a simple formula that reveals the multiplicative structure hidden within every integer. From determining whether a number is a perfect square (odd divisor count) to finding highly composite numbers that maximize divisibility, understanding d(n) opens the door to deeper number-theoretic concepts.

Master the formula — multiply one more than each exponent — and you'll be able to count divisors without ever listing them, even for numbers in the millions or billions. Use this calculator to verify your manual calculations, but practice applying the formula until it becomes second nature.