Prime Factorization Calculator

Math Updated 30 Oct 2026

Breaks a whole number down into the prime numbers that multiply to give it, such as 360 = 2³ × 3² × 5, for any number up to one trillion. The step-by-step division table shows how the number is divided by its smallest prime factor again and again until 1 is left. You also learn whether the number is prime, how many divisors it has, their sum, and the full list of divisors for numbers that do not have too many.

  • Whole numbers from 2 to 10¹².

Formula

n = p₁^a₁ × p₂^a₂ × … × pₖ^aₖ; number of divisors = (a₁ + 1)(a₂ + 1)…(aₖ + 1)
  • Every whole number greater than 1 has exactly one prime factorization (the fundamental theorem of arithmetic).
  • The factors are found by trial division up to √n.
  • Sum of divisors = Π (pᵃ⁺¹ − 1) ÷ (p − 1).
  • All divisors are listed when there are at most 120 of them.

Prime factorization of 360

Inputs
  • Enter a number: 360

360 ÷ 2 = 180, ÷ 2 = 90, ÷ 2 = 45, ÷ 3 = 15, ÷ 3 = 5, ÷ 5 = 1. So 360 = 2³ × 3² × 5, with (3 + 1)(2 + 1)(1 + 1) = 24 divisors.

Sources & references

Frequently asked questions

What is prime factorization?
Writing a number as a product of prime numbers. For example 84 = 2 × 2 × 3 × 7 = 2² × 3 × 7.
Is 1 a prime number?
No. A prime has exactly two divisors, 1 and itself; 1 has only one. Excluding 1 keeps every factorization unique.
What is prime factorization used for?
Finding the GCD and LCM, simplifying fractions and roots, counting divisors, and in cryptography, where factoring very large numbers is deliberately hard.

Related calculators