Prime factorization calculator
Type a whole number. We write it as a product of primes, for example 360 = 2³ × 3² × 5.
Result
2³ × 3² × 5Prime factorization
- Number of different primes
- 3
- 2 appears 3 time(s)
- 3 appears 2 time(s)
- 5 appears 1 time(s)
Inputs
- Whole number
- 360
How it is calculated
Divide by 2 as long as possible, then by 3, 5, 7… (up to 100,000).
Result
Prime factorization
- Number of different primes
- 3
How it is calculated
- Divide by 2 as long as possible, then by 3, 5, 7… (up to 100,000).
- If a large leftover is not prime, look for a factor with Pollard’s rho method.
- Each factor is checked with the Miller–Rabin primality test.
- Work time is limited: if it is not enough, the tool says so instead of freezing.
Example
360 = 2 × 180 = 2 × 2 × 90 = … = 2³ × 3² × 5.
Good to know
- Up to 30 digits. A number made of two very large primes may be refused (“too large”).
- Above about 25 digits, a prime factor is “probable”, not proven.
When to use it
- Find prime factors to simplify a fraction or calculate an LCM.
- Check whether a whole number is prime.
Frequently asked questions
What is this tool used for?
Type a whole number. We write it as a product of primes, for example 360 = 2³ × 3² × 5.
How is the result calculated?
Divide by 2 as long as possible, then by 3, 5, 7… (up to 100,000).
What should I check before using the result?
Up to 30 digits. A number made of two very large primes may be refused (“too large”).