numvana

Prime Factorization Calculator

Break any whole number down into its prime factors, and see whether it's prime and how many divisors it has.

Prime factorization
2^2 × 3 × 5
Is prime?
No
Number of positive divisors
12

How it works

This uses trial division: starting at 2, it repeatedly checks whether the smallest not-yet-tried number divides evenly into whatever's left, dividing it out (and counting how many times) whenever it does, up to the square root of what remains. Anything still left over once no divisor up to that square root works is itself a final prime factor, since a composite number always has a prime factor no larger than its own square root.

The number of positive divisors follows directly from the factorization: if n = p₁^a × p₂^b × ..., it has (a+1)(b+1)... divisors, since each divisor is formed by independently choosing a power from 0 up to each prime's own exponent.

A number is prime exactly when this process finds no factor at all before reaching its square root — the whole number itself is the only prime factor, to the first power.

FAQ

Why does the divisor count formula add 1 to each exponent?

Each prime factor pᵢ with exponent aᵢ can appear in a divisor raised to any power from 0 to aᵢ — that's aᵢ+1 choices — and every combination of those independent choices across all prime factors produces one distinct divisor, so the total divisor count is the product of (exponent + 1) across every prime factor.

Is 1 considered prime?

No — 1 has no prime factors at all (it's the empty product), so it's conventionally excluded from both 'prime' and 'composite' and isn't accepted as input here. The number 2 is the smallest prime.

Related calculators