How this calculator works
Every whole number greater than 1 factors into primes in exactly one way. This calculator uses trial division: divide out 2 as many times as possible, then odd candidates up to the square root of what remains. Any leftover greater than 1 is itself prime. The input is capped at one trillion, which keeps the search under about one million divisions; within that range the method is fast and exact.
Formula
n = p₁^e₁ × p₂^e₂ × ... × pₖ^eₖ, with primes p in ascending order and exponents e counting repetitions.
Worked example
360 = 2 × 2 × 2 × 3 × 3 × 5, written as 2^3 × 3^2 × 5. The number 97 is itself prime, and 1 has no prime factors.
Advertisement
Frequently asked questions
Why does 1 have no prime factors?
A prime must be greater than 1, and 1 divides everything without being a product of primes, so its factorization is written simply as 1.
How can I check the answer?
Multiply the listed prime powers back together; the product is your original number. Each listed factor can also be tested for primality.
Can the result contain a composite factor?
No. Every factor listed is prime. A prime that appears several times is shown once with an exponent, such as 2^3 for three twos.