Prime Factorization Calculator
Prime factorisation with factor tree and division method; prime check and divisors
Divide by the smallest prime that goes exactly, and repeat with the quotient until you reach 1.
So 360 = 2 × 2 × 2 × 3 × 3 × 5 = 2³ × 3² × 5
Split the number into a prime × another factor; keep splitting until every branch ends in a prime (green).
Number of divisors = (3 + 1) × (2 + 1) × (1 + 1) = 24. Prime divisors are in green.
- 360 = 2³ × 3² × 5 is not a perfect square (some prime has an odd power). Multiply by 10 to get the perfect square 3,600, or divide by 10 to get 36.
- Not a perfect cube. Smallest number to multiply by for a perfect cube: 75; smallest number to divide by: 45 (gives 8).
Runs entirely in your browser. Nothing you type or upload is sent to us or stored.
Results are for general guidance. Please check anything important before relying on it. Terms of use
How to Use
- Type a whole number, for example 360 (commas and spaces are fine), or tap an example.
- The prime factorisation appears at once in power form (360 = 2³ × 3² × 5), or the tool tells you the number is prime. Use copy result or copy divisors to paste it into your notes.
- Scroll down for the division method (ladder) and the factor tree, drawn the way you would in your notebook.
- Below that are all the divisors, the factor pairs, and whether the number is a perfect square or cube, with its square root by prime factorisation.
Prime factorisation with the division method and a factor tree
Prime factorisation means writing a number as a product of prime numbers, such as 360 = 2 × 2 × 2 × 3 × 3 × 5 = 2³ × 3² × 5. This prime factorization calculator does it for any whole number up to 1015. It shows the working by both methods taught in school (the division ladder and the factor tree), tells you whether a number is prime, and lists every divisor.
Prime, composite, and the number 1
- A prime number has exactly two divisors, 1 and itself: 2, 3, 5, 7, 11, 13 …. 2 is the only even prime.
- A composite number has more than two divisors: 4, 6, 8, 9, 10 ….
- 1 is neither prime nor composite, because it has only one divisor.
The Fundamental Theorem of Arithmetic says every composite number can be written as a product of primes in exactly one way, apart from the order of the factors. That's why the factor tree always ends with the same primes, however you split the number.
Method 1: Division (ladder) method
Divide by the smallest prime that divides the number exactly, write the quotient below, and repeat until you reach 1. The primes down the left side are the prime factors.
2 | 180
2 | 90
3 | 45
3 | 15
5 | 5
| 1 → 360 = 2³ × 3² × 5
Method 2: Factor tree
Split the number into two factors, then keep splitting every branch that is not prime. The tool splits off the smallest prime each time (360 → 2 × 180 → 2 × 90 → …), which gives a tidy tree for any size of number. If you split 360 as 36 × 10 in your notebook instead, you still end with the same primes: 2, 2, 2, 3, 3, 5.
Number and sum of divisors
number of divisors = (a + 1)(b + 1)(c + 1) …
For 360 = 2³ × 3² × 5¹, the number of divisors is (3 + 1)(2 + 1)(1 + 1) = 24, and they add up to 1,170. A number whose divisors other than itself add up to the number is a perfect number: 6, 28, 496 and 8,128.
Square roots and cube roots by prime factorisation
A number is a perfect square when every prime appears an even number of times. Pair the primes and take one from each pair: 7744 = 2⁶ × 11², so √7744 = 2³ × 11 = 88. If a prime is left without a partner, the number is not a perfect square, and multiplying (or dividing) by the unpaired primes makes it one: 2352 = 2⁴ × 3 × 7², so 2352 × 3 = 7056 = 84². For cubes, the primes are grouped in threes instead.
How the prime check works
If n is composite, it has a factor no bigger than √n. So to prove that n is prime, you only need to divide by every prime up to √n. For 97, √97 ≈ 9.8, and none of 2, 3, 5 or 7 divides 97, so 97 is prime. The tool uses the same idea, which is why even a 15-digit number such as 999,999,999,999,989 (the largest prime below 1015) is checked in a moment.
| Range | Primes |
|---|---|
| 1–50 | 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47 |
| 51–100 | 53, 59, 61, 67, 71, 73, 79, 83, 89, 97 |