Skip to content
MasterMath

Prime Factorization Calculator

Break any number into its prime factors, and see how many divisors that gives it — the count follows directly from the exponents.

Factorisation

—

Factorisation—
How many divisors it has—
Is it prime?—
Distinct prime factors—

How this was worked out

    The rule

    n = p₁^a × p₂^b × … · number of divisors = (a+1)(b+1)…

    Why it works

    Every whole number greater than one is a product of primes, in exactly one way. That uniqueness is the fundamental theorem of arithmetic, and it is what makes the factorisation a genuine fingerprint of the number rather than one description among many.

    How to do it by hand

    1. Divide by 2 as many times as it goes
    2. Move to 3, then 5, then each prime in turn
    3. Stop when the quotient reaches 1
    4. Count the divisors by adding one to each exponent and multiplying

    What is worth knowing

    The divisor count is a neat consequence: 360 = 2³ × 3² × 5 gives (3+1)(2+1)(1+1) = 24 divisors, because each divisor picks an exponent for each prime independently. The uniqueness of the factorisation is also why 1 is excluded from the primes — allowing it would let you write 6 as 2 × 3, or 1 × 2 × 3, or 1 × 1 × 2 × 3, and the theorem would collapse. Factoring large numbers is genuinely hard, and that difficulty is what RSA encryption rests on: multiplying two 300-digit primes takes microseconds, and undoing it takes longer than the age of the universe.

    Frequently asked questions

    Is the prime factorisation unique?

    Yes. Every number greater than 1 factors into primes in exactly one way, which is the fundamental theorem of arithmetic.

    Why is 1 not a prime?

    Because allowing it would break that uniqueness: you could pad any factorisation with as many 1s as you liked.

    How do I count the divisors?

    Add 1 to each exponent and multiply the results. 2³ × 3² gives 4 × 3 = 12 divisors.

    Why is factoring large numbers hard?

    No fast general method is known, and RSA encryption depends on that. Multiplying two large primes is easy; undoing it is not.