What is prime factorization?
Prime factorization is the process of breaking a whole number down into the set of prime numbers that multiply together to produce it. A prime is a number greater than 1 whose only divisors are 1 and itself (2, 3, 5, 7, 11, …). The Fundamental Theorem of Arithmetic guarantees that every integer greater than 1 has exactly one prime factorization, apart from the order of the factors.
How to use this calculator
Enter any whole number from 2 upward and press calculate. The tool returns the factorization in two formats: an expanded product (every prime listed individually) and a compact exponent form that groups repeated primes as powers. It also reports how many distinct primes appear, the total count of prime factors counted with multiplicity, and whether the number itself is prime.
The formula explained
The calculator uses trial division. Starting at the smallest prime, 2, it repeatedly divides the number by each candidate divisor d while the division is exact, counting how many times each divides. It only needs to test divisors up to \(\sqrt{n}\), because if no factor is found below the square root, whatever remains must itself be prime. The result is expressed as $$n = p_1^{a_1} \times p_2^{a_2} \times \cdots \times p_k^{a_k}$$
Worked example
Take \(n = 360\). Divide by 2 three times: \(360 \to 180 \to 90 \to 45\) (\(2^3\)). Divide by 3 twice: \(45 \to 15 \to 5\) (\(3^2\)). Divide by 5 once: \(5 \to 1\) (\(5^1\)). So $$360 = 2^3 \times 3^2 \times 5$$ Expanded that is \(2 \times 2 \times 2 \times 3 \times 3 \times 5\): three distinct primes and six total factors.
FAQ
Why must the number be at least 2? The numbers 0 and 1 have no prime factorization — 1 is neither prime nor composite.
What does "with multiplicity" mean? It counts each prime as many times as it appears. For 360, the total is 6 (three 2s, two 3s, one 5).
Is 1 prime? No. By definition a prime must have exactly two distinct positive divisors, and 1 has only one.