Education Tools
Prime Factorization
Prime Factorization is part of Toolspire and is ready as soon as this page loads. The result is the product of primes, with repeats written out. 84 is 2 × 2 × 3 × 7, not 2² × 3 × 7, so you can check the multiply yourself.
On this page
What you can do here
Odd candidates only after 2
Once twos are removed, the loop steps by 2, so it never tests an even divisor again.
Stops at the square root
If a factor larger than the square root existed, its pair would already have been found.
Prime called out
A single-factor result is labelled prime instead of looking like a failed tree.
The sequence
How to use the Prime Factorization
- 1
Start from an integer greater than 1
1, 0 and negatives are not factored. Decimals are rejected.
- 2
Multiply the factors back
The product of the numbers in the headline should equal the integer you typed.
- 3
Use the factors for HCF by hand
Shared primes, taking the smaller power, are the HCF. The LCM page does that without a factor list.
Worth knowing
- Prime Factorization on Toolspire: trial division strips factors of 2, then odd primes up to the square root of what remains.
- 84 factors as 2 × 2 × 3 × 7. A prime such as 17 is returned as itself with the word prime.
- The input must be an integer from 2 to 1,000,000,000,000. 1 is not a prime and is not factored.
- Repeats stay written out. 12 is 2 × 2 × 3, so the exponents are visible as copies.
What trial division skips
After the factors of two are gone, only odd divisors are tested, and only while the square of the candidate is still at most the remaining value. A remaining value above 1 at the end is itself prime. This is the classroom method, not a sieve, so a 12-digit prime can take a moment. Numbers above one trillion are refused so the loop stays bounded.
FAQ
Questions about Prime Factorization
Where does Prime Factorization run?
Is 1 a prime number?
Why are repeated primes written twice?
Can this factor a very large prime?
How do I use this to find an HCF?
Keep going
Related tools
Last updated Report a problem or suggest a feature