Find the prime factorization of any whole number up to one quadrillion, with exponent form, division steps, number of divisors and perfect square checks.
Division method (repeated division by primes)
| Divide by | Number | Result |
|---|
Works for whole numbers from 2 up to 1,000,000,000,000,000 (1015). Every whole number greater than 1 has exactly one prime factorization, apart from the order of the factors.
A prime factorization calculator breaks a whole number down into the prime numbers that multiply together to make it, and writes the result in exponent form. It shows the step-by-step division method, tells you whether the number is prime, and uses the factorization to give the number of divisors, the sum of the divisors and whether the number is a perfect square or cube.
For example, 360 = 2³ × 3² × 5, 3,600 = 2⁴ × 3² × 5², and 600,851,475,143 = 71 × 839 × 1,471 × 6,857. The number 97 is prime, so its factorization is just 97.
A prime number is a whole number greater than 1 with exactly two factors: 1 and itself. The first few are 2, 3, 5, 7, 11, 13, 17, 19, 23 and 29. Every whole number greater than 1 is either prime or can be written as a product of primes. Writing a number this way is called its prime factorization, and the primes are its prime factors.
The fundamental theorem of arithmetic says that this factorization is unique: apart from the order, there’s only one way to write a number as a product of primes. That’s why primes are often called the building blocks of the whole numbers.
For 360: 360 ÷ 2 = 180, 180 ÷ 2 = 90, 90 ÷ 2 = 45, 45 ÷ 3 = 15, 15 ÷ 3 = 5 and 5 ÷ 5 = 1. The divisors are 2, 2, 2, 3, 3 and 5, so 360 = 2³ × 3² × 5. You only need to test primes up to the square root of what’s left; if nothing divides, the remaining number is itself prime.
Split the number into any two factors, then keep splitting each factor until every branch ends in a prime. For 360, you might split it into 36 × 10, then 36 into 6 × 6 and 10 into 2 × 5, then each 6 into 2 × 3. The prime leaves are 2, 3, 2, 3, 2 and 5, which give the same answer, 2³ × 3² × 5. Different trees always lead to the same primes, which is the uniqueness theorem in action.
When a prime appears more than once, write it with an exponent. Instead of 2 × 2 × 2 × 3 × 3 × 5, write 2³ × 3² × 5. Exponent form is shorter, easier to read and makes the properties of the number obvious, as the next sections show.
Add 1 to each exponent and multiply. For 360 = 2³ × 3² × 5¹, the number of divisors is (3 + 1) × (2 + 1) × (1 + 1) = 24.
A number is a perfect square if every exponent is even, and a perfect cube if every exponent is a multiple of 3. 3,600 = 2⁴ × 3² × 5² is a perfect square, and halving the exponents gives its square root: 2² × 3 × 5 = 60. 216 = 2³ × 3³ is a perfect cube, with cube root 2 × 3 = 6.
To find the greatest common factor of two numbers, take each shared prime at its lowest power. For the least common multiple, take every prime at its highest power. For 360 = 2³ × 3² × 5 and 84 = 2² × 3 × 7, the GCF is 2² × 3 = 12 and the LCM is 2³ × 3² × 5 × 7 = 2,520.
Cancelling common prime factors simplifies fractions: 84/360 = (2² × 3 × 7) ÷ (2³ × 3² × 5) = 7/30. Pairs of primes come out of square roots: √360 = √(2² × 3² × 2 × 5) = 6√10.
Factorize 5,148. It’s even, so divide by 2: 2,574, and again: 1,287. That’s odd, so try 3; its digits add to 18, so 3 divides it: 429, and again: 143. The digit sum of 143 is 8, so 3 no longer works, and 143 doesn’t end in 0 or 5, so 5 doesn’t either. Trying 7 leaves a remainder, but 11 works: 143 ÷ 11 = 13, which is prime. So 5,148 = 2² × 3² × 11 × 13. Divisibility rules such as these make the division method quick even by hand.
A few quick tests save a lot of trial division. A number is divisible by 2 if it ends in an even digit, by 3 if its digits add to a multiple of 3, and by 5 if it ends in 0 or 5. For 11, alternately add and subtract the digits; if the result is a multiple of 11, including 0, so is the number. For 143, 1 − 4 + 3 = 0, so 11 divides it. For 7 and 13 there are rules too, but direct division is usually just as fast.
Multiplying primes together is easy, but working backwards from a large product to its prime factors is very hard. This calculator uses trial division, which is fast for numbers up to about 10¹⁵. Numbers used in internet security have hundreds of digits and are the product of two huge primes; even the best known methods and powerful computers can’t factor them in any practical amount of time. This difficulty is what keeps RSA encryption secure.
Prime numbers have fascinated mathematicians for thousands of years. Around 300 BC, Euclid proved that there are infinitely many primes, and that every number can be built from them. Eratosthenes devised a simple sieve for listing primes by crossing out multiples. In the 1800s, Gauss formally proved that the factorization of every number is unique. Today, primes power the encryption that protects online banking and shopping, and the search for ever larger primes continues with the help of thousands of volunteers’ computers around the world.
2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89 and 97. There are 25 of them. Note that 2 is the only even prime, and 1 is not prime.
Two other tools work well alongside this one: the factor calculator, to list all the factors and factor pairs of a number, and the common factor calculator, to list all the common factors of two or more numbers.
2³ × 3² × 5, which is 2 × 2 × 2 × 3 × 3 × 5.
Divide repeatedly by the smallest prime that goes in exactly, starting with 2, until you reach 1. The primes you used are the factors.
No. A prime has exactly two factors, and 1 has only one. It has no prime factorization.
Yes. The fundamental theorem of arithmetic guarantees that every number greater than 1 has exactly one prime factorization, apart from the order.
A diagram that splits a number into factors, then splits those factors, until every branch ends in a prime.
Just the number itself. For example, the prime factorization of 97 is 97.
Add 1 to each exponent and multiply. 360 = 2³ × 3² × 5 has 4 × 3 × 2 = 24 divisors.
All the exponents in its prime factorization are even. 3,600 = 2⁴ × 3² × 5² is a perfect square.
Up to 10¹⁵, one quadrillion. Results appear almost instantly.
It's used to simplify fractions and roots, find GCFs and LCMs, and it underpins modern cryptography.
2² × 5², which is 2 × 2 × 5 × 5. Both exponents are even, so 100 is a perfect square.
25, from 2 up to 97.
2. Every other even number is divisible by 2, so it can't be prime.