Wittlo
TodaySign in

← All calculators

Prime factorization calculator

Break a whole number into its prime factors, find out whether it is prime, and see how many divisors it has. The repeated division is shown.

Worked example

With the values shown above when the page opens:

360 = 2³ × 3² × 5

  1. 360 ÷ 2 = 180
  2. 180 ÷ 2 = 90
  3. 90 ÷ 2 = 45
  4. 45 ÷ 3 = 15
  5. 15 ÷ 3 = 5
  6. 5 ÷ 5 = 1

How it works

  • Divide by the smallest prime that goes in (2, 3, 5, 7, ...) again and again until you reach 1. The primes you divided by are the prime factors.
  • You only need to try primes up to the square root of the number: if none divide it, it is prime.
  • If n = p^a × q^b × ..., it has (a + 1)(b + 1)... divisors.

Questions

Is 1 a prime number?

No. A prime has exactly two divisors, 1 and itself, and 1 has only one.

Why is 2 the only even prime?

Every other even number is divisible by 2, so it has more than two divisors.

How are prime factors useful?

They give the GCD and LCM of numbers, simplify fractions, and count divisors.

Related

Calculators are for learning and quick checks. Check important figures yourself, and do not rely on them for tax, legal or financial decisions.