Skip to content
Outilix: all your free online tools, one click away, with Kroma the chameleon

Prime factorization calculator with factor tree

Prime factorization calculator with factor tree
Kroma

Enter a whole number of 2 or more and the calculator gives its prime factorization as a product of primes, for example 360 = 2³ × 3² × 5. You get the repeated division table, the factor tree, every divisor with their count and sum, and the simplified square root of the number.

  • ✅ Free
  • 🔒 No sign-up
  • 📱 Works on mobile
  • ⚡ Instant results
Loading the tool…

🔒 Everything runs in your browser. Your data and files never leave your device.

📌 Key facts

  • A prime number has exactly two divisors, 1 and itself; there are 25 primes below 100.
  • Every integer 2 or greater is a product of primes in exactly one way (the Fundamental Theorem of Arithmetic).
  • To test whether n is prime, you only need to check prime divisors up to the square root of n.
  • If n = p^a x q^b x r^c, then n has (a + 1)(b + 1)(c + 1) divisors.
  • Example: 360 = 2^3 x 3^2 x 5 has (3 + 1)(2 + 1)(1 + 1) = 24 divisors.

How to find the prime factorization of a number

A prime number has exactly two factors: 1 and itself (2, 3, 5, 7, 11…). Every whole number greater than 1 is a product of primes in exactly one way, apart from the order. To find it, divide by the smallest prime that works, then repeat with the quotient until you reach 1.

NumberPrime divisor
3602
1802
902
453
153
55
1

\[ 360 = 2 \times 2 \times 2 \times 3 \times 3 \times 5 = 2^{3} \times 3^{2} \times 5 \]

Group the repeated primes with exponents. You only need to test primes up to the square root of the number: if none of them divides n, then n is prime.

Divisibility rules that speed things up

DivisorRuleExample
2the last digit is even2,024 ends in 4
3the digit sum is a multiple of 32 + 0 + 2 + 4 = 8: no
5the last digit is 0 or 51,995: yes
9the digit sum is a multiple of 9\( 4 + 5 = 9 \), so 45 is divisible by 9
11the alternating digit sum is a multiple of 111,001: \( 1 - 0 + 0 - 1 = 0 \), yes

The primes below 50 are 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43 and 47.

What you can compute from the prime factorization

If \( n = p_{1} \)a × p₂b × …, then:

  • the number of divisors is (a + 1)(b + 1)…: for \( 360 = 2^{3} \times 3^{2} \times 5 \) that is \( 4 \times 3 \times 2 = 24 \) divisors;
  • the sum of divisors is the product of (p\( k + 1 \) − 1) ÷ (p − 1): for 360, \( 15 \times 13 \times 6 = 1{,}170 \);
  • Euler's totient φ(n), the count of integers from 1 to n that share no factor with n, is the product of p\( k - 1 \)(p − 1): \( \varphi (360) = 4 \times 6 \times 4 = 96 \);
  • the simplified square root: pull out the squares, \( \sqrt{360} = \sqrt{2^{3} \times 3^{2} \times 5} = 6 \sqrt{10} \);
  • the GCF and LCM of several numbers, by comparing exponents.

Prime factorization: the 25 primes below 100

There are 25 prime numbers below 100. Knowing them speeds up factoring.

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.

The number 2 is the only even prime. So every other even number divides by 2 at least once. Also, 1 is not prime, because it has only one divisor.

Prime factorization: testing a number with its square root

To check whether a number is prime, you do not need to try every divisor. Test the primes up to its square root.

For example, for 97, the square root is about 9.8. So you test 2, 3, 5 and 7. None divides 97, which means 97 is prime.

NumberPrimes to testResult
912, 3, 5, 77 x 13: not prime
972, 3, 5, 7Prime
2212, 3, 5, 7, 11, 1313 x 17: not prime

Prime factorization: counting divisors

The factorization tells you how many divisors a number has without listing them. Add 1 to each exponent, then multiply.

For example, 84 = 2^2 x 3 x 7. So the divisor count is (2 + 1)(1 + 1)(1 + 1) = 12. Likewise, 360 = 2^3 x 3^2 x 5 has 24.

Also, a number is a perfect square when all its exponents are even. For instance, 144 = 2^4 x 3^2 is the square of 12. That property helps you simplify square roots.

Prime factorization: links to other topics

Factoring helps compute the GCF and LCM. For the GCF, take the shared primes with the smallest exponent. For the LCM, take every prime with the largest exponent.

Try the GCF and LCM calculator, reduce a ratio with the fraction calculator, then solve an equation with the equation solver. Finally, the scientific calculator checks powers.

Factoring larger numbers by hand

For a large number, work in a steady order. First, divide by 2 as long as the result stays whole. Next, try 3, then 5, then 7. Then keep going until the quotient is 1. Finally, write the factors with exponents.

For example, 1,260 divides by 2 twice (315), by 3 twice (35), by 5 (7) and by 7. So 1,260 = 2^2 x 3^2 x 5 x 7. Also, stop testing once the divisor squared exceeds what is left. That saves a lot of time. A calculator does it instantly, but doing a few by hand builds number sense.

3 real-life examples

1

Factor 84

\( \dfrac{84}{2} = 42 \), \( \dfrac{42}{2} = 21 \), \( \dfrac{21}{3} = 7 \), and 7 is prime. So \( 84 = 2^{2} \times 3 \times 7 \). It has \( (2 + 1) (1 + 1) (1 + 1) = 12 \) divisors.

2

Factor 1,001

1,001 is not divisible by 2, 3 or 5. Try 7: \( 1{,}001 = 7 \times 143 \). Then \( 143 = 11 \times 13 \). So \( 1{,}001 = 7 \times 11 \times 13 \), three different prime factors.

3

Is 97 prime?

\( \sqrt{97} \approx 9.8 \), so you only need to test 2, 3, 5 and 7. None divides \( 97 (97 = 2 \times 48 + 1 = 3 \times 32 + 1 = 5 \times 19 + 2 = 7 \times 13 + 6) \). So 97 is prime.

Frequently asked questions

What is prime factorization?
It is writing a whole number as a product of prime numbers. The result is unique apart from the order of the factors. For example, 60 = 2² × 3 × 5.
Is 1 a prime number?
No. A prime has exactly two different factors, and 1 has only one. Excluding 1 keeps every prime factorization unique. The smallest prime is 2.
How do I tell if a number is prime?
Try dividing it by every prime up to its square root. If none divides it evenly, the number is prime. This calculator tells you directly and tests numbers up to 20 digits.
How do I use prime factorization to find the GCF and LCM?
The GCF is the product of the shared primes with the smallest exponents; the LCM is the product of all primes with the largest exponents. With 12 = 2² × 3 and 18 = 2 × 3², GCF = 2 × 3 = 6 and LCM = 2² × 3² = 36.
Why does factoring help simplify fractions and radicals?
It exposes the common factors in a numerator and denominator, and the squared factors under a radical. For example 48/36 = (2⁴ × 3)/(2² × 3²) = 4/3 and √72 = √(2³ × 3²) = 6√2.

How we calculate

Share this page