How to use the Prime Factorization Calculator
- Type a whole number from 1 to 1018 into the box, or tap one of the examples.
- Read the prime factorisation in exponent form, for example 360 = 2³ × 3² × 5. It updates as you type.
- Follow the factor tree and the division ladder to see how the number was broken down, smallest prime first.
- Check the number of divisors, their sum, the prime check and the perfect square/cube test, then copy the full list of divisors.
What is prime factorisation?
A prime number has exactly two divisors: 1 and itself (2, 3, 5, 7, 11, …). Every whole number greater than 1 is either prime or can be written as a product of primes. The Fundamental Theorem of Arithmetic, which you meet in the Real Numbers chapter of NCERT Class 10, says this product is unique apart from the order of the factors. So 360 is 2 × 2 × 2 × 3 × 3 × 5 and nothing else, written in exponent form as 2³ × 3² × 5.
This calculator finds that product for any number up to 1018. It uses exact whole-number (BigInt) arithmetic, so there is no rounding. Small factors are removed by trial division. A deterministic Miller–Rabin test checks whether what is left is prime, and Pollard's rho algorithm splits large composite numbers. That makes even an 18-digit number with two large prime factors take a fraction of a second.
Two school methods
Factor tree
Write the number at the top and split it into two factors. Keep splitting every branch that is not prime. The leaves at the bottom are the prime factors. The tree above always splits off the smallest prime first, which is the neatest way to draw it in an exam.
Division (ladder) method
Divide by the smallest prime that goes in exactly, write the quotient underneath and repeat until you reach 1. The primes down the left side are the factors.
Divisors from the factorisation
Once you have n = p1a × p2b × p3c × …, you do not need to hunt for divisors one by one. Every divisor picks an exponent from 0 to a for p1, from 0 to b for p2, and so on.
Worked example (n = 360 = 2³ × 3² × 5¹)
- Number of divisors = (3 + 1)(2 + 1)(1 + 1) = 4 × 3 × 2 = 24.
- Sum of divisors = (2⁴ − 1)/1 × (3³ − 1)/2 × (5² − 1)/4 = 15 × 13 × 6 = 1170.
- 360 is not a perfect square, because the exponents 3 and 1 are odd. It is not a perfect cube, because 2 and 1 are not multiples of 3.
Reading the results
| What you see | What it means |
|---|---|
| Only one prime with exponent 1 | The number is prime: exactly 2 divisors |
| All exponents even | Perfect square: √n = product of pe/2 |
| All exponents multiples of 3 | Perfect cube: ∛n = product of pe/3 |
| Odd number of divisors | Always a perfect square, because divisors pair up as d and n/d except √n |
| 1 | Neither prime nor composite; it has no prime factors |
Common mistakes
- Calling 1 a prime. It is not. A prime needs exactly two different divisors.
- Stopping at a composite leaf. 4, 9, 15, 21, 49 and 91 (= 7 × 13) are not prime. Keep splitting.
- Forgetting the exponent + 1. The number of divisors of 2³ × 3² is (3 + 1)(2 + 1) = 12, not 3 × 2 = 6. The +1 counts the choice of using a prime zero times.
- Testing too far. To check whether n is prime by hand you only need to try primes up to √n. For 97, try 2, 3, 5 and 7; none divide it, so 97 is prime.
Exam tips
- CBSE Class 10 asks you to "express as a product of prime factors". Show the tree or ladder, then the exponent form.
- HCF and LCM come straight from the factorisation. HCF takes the lowest power of each common prime and LCM takes the highest power of every prime. Try the LCM and HCF calculator to see this as a table.
- To prove a number like √6 is irrational, the standard NCERT argument uses the fact that if a prime p divides a², then p divides a, which comes from unique factorisation.
- Divisor counting appears in permutations and combinations problems too. See the permutation and combination calculator.
Frequently asked questions
What is the prime factorisation of 360?
Is 1 a prime number?
How do you find the number of factors of a number?
How large a number can this calculator factorise?
How can I tell if a number is a perfect square from its prime factors?
What is the difference between a factor tree and the division method?
Last reviewed November 2026. Results are estimates for information only — see our disclaimer.