Arithmetic & Numbers · Grades 5–9

Prime Numbers Explained: Test, Factor and Count Divisors

Prime Numbers Explained: Test, Factor and Count Divisors — illustration
Short answer: A prime has exactly two divisors: 1 and itself. To factor a number, divide by the smallest prime that fits until only 1 remains: 84 = 2² × 3 × 7.

Primes and composites

2, 3, 5, 7, 11 and 13 are prime. 1 is not prime (it has one divisor), and 2 is the only even prime. A number with more than two divisors is composite.

Factor a composite number

Divide by 2 while you can, then 3, then 5, and so on. The primes you collect are the prime factorization: 84 = 2² × 3 × 7.

84
Answer84 = 2² × 3 × 7
  • Divisors: 12
  • Sum of divisors: 224
Step-by-step working 3 steps
  1. 1
    Divide by the smallest prime that fits, again and again
    84 ÷ 2 = 42
    42 ÷ 2 = 21
    21 ÷ 3 = 7
    7 ÷ 7 = 1

    Stop when the quotient reaches 1.

  2. 2
    Collect the primes
    84 = 2 × 2 × 3 × 7
    84 = 2² × 3 × 7
  3. 3
    Count the divisors
    (3 × 2 × 2) = 12 divisors

    Add 1 to each exponent and multiply.

Test for a prime

Test divisibility by primes up to the square root. If none divide the number, it is prime: 97 is prime.

97
Answer97 is prime
  • Divisors: 2
  • Sum of divisors: 98
Step-by-step working 3 steps
  1. 1
    Divide by the smallest prime that fits, again and again
    97 ÷ 97 = 1

    Stop when the quotient reaches 1.

  2. 2
    Check

    Only 97 itself divides 97 without a remainder (besides 1), so 97 is prime.

  3. 3
    Count the divisors
    (2) = 2 divisors

    Add 1 to each exponent and multiply.

A number that only looks prime

1001 has no obvious small factors, but it equals 1001 = 7 × 11 × 13.

Common mistakes

Treating 1 as prime

Primes need exactly two divisors.

Stopping at a composite factor

Keep factoring until every factor is prime.

Testing too many divisors

You never need to test beyond the square root.

Put it into practice. Try your own numbers in the Prime Factorization Calculator and compare each step with the method above.

Frequently asked questions

Are there infinitely many primes?

Yes. Euclid proved it over two thousand years ago.

How many divisors does a number have?

Add 1 to each exponent in its prime factorization and multiply.

Written and reviewed by Mateuss M.

Mateuss M. writes and reviews mathematical content for CalcSolver, focusing on online calculators, formulas, equations, and practical math tools. He reviews calculator functionality, calculation methods, formulas, examples, and explanations to help ensure that each tool is clear, useful, and easy to understand.

Related articles