Numbers and data
Prime factorization calculator
Type a whole number to break it down into its prime building blocks. If the number is itself prime, you will be told.
Your answer and the full working will appear here.
The idea
A prime number has exactly two factors: 1 and itself. 2, 3, 5, 7 and 11 are primes. Every other whole number above 1 can be split into primes multiplied together, and there is only one way to do it. This fact is so important it is called the Fundamental Theorem of Arithmetic.
The solver uses the "ladder" method: divide by the smallest prime that goes in exactly, write down the result, and repeat until you reach 1. It only needs to test divisors up to the square root of the number, because any factor bigger than that would pair with one smaller.
Formula box
- n = p₁^a × p₂^b × p₃^c ...
- Number of divisors = (a + 1)(b + 1)(c + 1) ...
- To test whether n is prime, try primes up to √n
Worked problem
360: 360 ÷ 2 = 180, ÷ 2 = 90, ÷ 2 = 45, ÷ 3 = 15, ÷ 3 = 5, and 5 is prime. So 360 = 2³ × 3² × 5.
It has (3 + 1)(2 + 1)(1 + 1) = 24 divisors, which is one reason the ancient Babylonians liked 360 for degrees in a circle: it divides evenly in so many ways.
Questions
Is 1 a prime number?
No. A prime must have exactly two different factors, and 1 has only one. Leaving 1 out keeps every factorization unique.
What is a factor tree?
A drawing of the same process: split the number into any two factors, then keep splitting until every branch ends in a prime. The ladder and the tree always give the same primes.
Why are primes useful?
They are used to simplify fractions, find LCMs and GCFs, and, with very large primes, to keep internet banking and messages secure.