Toolstia / Prime factorization calculator
Prime factorization calculator
Enter a whole number and get it written as a product of primes, such as 360 = 2³ × 3² × 5. If the number is prime you are told so. You also see how many divisors it has.
Enter a number to break it into primes.
Every whole number above 1 is either prime or can be written as a product of primes in exactly one way. This tool tries divisors up to the square root of your number.
How it works
- Enter a whole number of 2 or more.
- Read the prime factorization.
- Check the number of distinct factors and divisors.
Unique factorization
Every whole number above 1 is either prime or can be written as a product of primes in exactly one way, apart from the order. This is called the fundamental theorem of arithmetic.
How it is found
The tool divides by 2, then by odd numbers 3, 5, 7 and so on, only up to the square root of what is left. Anything remaining after that is itself prime.
Counting divisors
Add 1 to each exponent and multiply the results. 360 = 2³ × 3² × 5¹ has (3 + 1)(2 + 1)(1 + 1) = 24 divisors.
Size limit
Numbers up to one quadrillion (10^15) work quickly. Very large numbers with two big prime factors are the basis of modern encryption because they are hard to factor.
Questions
Is 1 a prime number?
No. A prime has exactly two divisors, and 1 has only one.
Is 2 prime?
Yes, and it is the only even prime.
Is anything uploaded?
No. Your number stays in your browser and is never sent anywhere.