Skip to main content

Prime Factorization Calculator

Prime Factorization Calculator

Enter a whole number from 2 to 9,007,199,254,740,991.

or press Enter
Example

Enter a whole number to get its prime factorization in exponent form instantly, a list of all factors with their count and sum, and whether the number is prime or composite – plus the division steps. Works up to 16 digits, handy for homework and for finding factors.


How to use the prime factorization calculator​

  1. Type a whole number of 2 or more, such as 360 – up to 16 digits (9,007,199,254,740,991). Or click one of the examples 360, 1001 and 97. Then click Calculate or press Enter.
  2. The result appears instantly: Prime factorization (exponent form) such as 360 = 2³ × 3² × 5, and the Expanded form 360 = 2 × 2 × 2 × 3 × 3 × 5. A prime number is shown as “97 is a prime number.”
  3. All factors lists every factor from smallest to largest, with the number of factors, their sum and the Factor pairs (1 × 360, 2 × 180 …).
  4. Calculation steps shows the ladder (repeated division) step by step.
  5. Click the icon next to a result to copy it.

Factors, primes and prime factors​

  • Factor: a whole number that divides another exactly. 12 ÷ 3 = 4 with no remainder, so 3 is a factor of 12. The factors of 12 are 1, 2, 3, 4, 6 and 12.
  • Prime number: a number greater than 1 whose only factors are 1 and itself, such as 2, 3, 5, 7, 11 and 13.
  • Composite number: a number greater than 1 with other factors too, such as 4, 6, 9 and 12.
  • 1 is neither prime nor composite.
  • Prime factor: a factor that is also a prime. The prime factors of 12 are 2 and 3.
  • Prime factorization: writing a number as a product of primes, such as 12 = 2 × 2 × 3. Every number has exactly one prime factorization (apart from the order) – the fundamental theorem of arithmetic.

How to find the prime factorization​

Using 360 as the example, both methods give 360 = 2 × 2 × 2 × 3 × 3 × 5.

Method 1: Ladder method (repeated division)​

Start with the smallest prime, 2. When it no longer divides, move to the next prime (3, 5, 7 …) and continue until the quotient is prime:

2 ) 360
───
2 ) 180
───
2 ) 90
───
3 ) 45
───
3 ) 15
───
5

The divisors on the left and the 5 at the bottom are all the prime factors: 360 = 2 × 2 × 2 × 3 × 3 × 5.

Method 2: Factor tree​

Split the number into any two factors and keep splitting the ones that are not prime until every branch ends in a prime:

360
/ \
36 10
/ \ / \
6 6 2 5
/ \ / \
2 3 2 3

Collect the primes at the ends: 2, 3, 2, 3, 2, 5 – sorted, that is 2 × 2 × 2 × 3 × 3 × 5. However you start (for example 360 = 12 × 30), the result is always the same.

Exponent form​

Write repeated primes as powers, in increasing order: 360 = 2 × 2 × 2 × 3 × 3 × 5 = 2³ × 3² × 5.

Number and sum of factors from the prime factorization​

Number of factors: add 1 to each exponent and multiply. 360 = 2³ × 3² × 5¹, so it has (3 + 1) × (2 + 1) × (1 + 1) = 24 factors:

1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 18, 20, 24, 30, 36, 40, 45, 60, 72, 90, 120, 180, 360

Every factor has the form 2ᵃ × 3ᵇ × 5ᶜ, where a can be 0–3 (4 choices), b 0–2 (3 choices) and c 0–1 (2 choices): 4 × 3 × 2 = 24 combinations.

Sum of factors: (1 + 2 + 4 + 8) × (1 + 3 + 9) × (1 + 5) = 15 × 13 × 6 = 1170.

Tip for listing factors by hand: work in pairs from 1 – 1 × 360, 2 × 180, 3 × 120 … – and stop when the pairs meet (past the square root).

How to tell if a number is prime​

Divide only by the primes up to its square root; if none divides exactly, the number is prime. The square root of 97 is about 9.8, so you only test 2, 3, 5 and 7 – none divides, so 97 is prime.

Divisibility rules rule out most numbers quickly:

Divisible byRuleExample
2The last digit is 0, 2, 4, 6 or 8358
3The sum of the digits is divisible by 3471 (4 + 7 + 1 = 12)
5The last digit is 0 or 5925
9The sum of the digits is divisible by 9846 (8 + 4 + 6 = 18)
11The alternating sum of the digits is divisible by 11 (including 0)1001 (1 − 0 + 0 − 1 = 0)

Watch out for composites that look prime, such as 91 = 7 × 13, 221 = 13 × 17 and 1001 = 7 × 11 × 13.

Prime numbers up to 100​

There are 25 primes up to 100:

2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97

Apart from 2, every prime is odd – 2 is the only even prime.

FAQ​

How do you find the prime factorization of a number?​

Divide by the smallest prime that goes in (2, then 3, 5, 7 …) and keep dividing the quotient until it is prime. The divisors and the last quotient are the prime factors. For example, 360 = 2 × 2 × 2 × 3 × 3 × 5, or 2³ × 3² × 5 in exponent form.

Is 1 a prime number?​

No. A prime must be greater than 1 and have exactly two factors, 1 and itself. 1 has only one factor, so it is neither prime nor composite. The smallest prime is 2, which is also the only even prime.

How do you check whether a number is prime?​

Divide it by every prime up to its square root. If none divides exactly, the number is prime. For 97 you only need to try 2, 3, 5 and 7. You can also type the number into this calculator to see whether it is prime or composite.

How do you find the number of factors?​

Write the prime factorization in exponent form, add 1 to each exponent and multiply. For 360 = 2³ × 3² × 5 that is (3 + 1) × (2 + 1) × (1 + 1) = 24 factors. A prime always has exactly 2 factors.

Is the prime factorization of a number unique?​

Yes. By the fundamental theorem of arithmetic, every whole number greater than 1 can be written as a product of primes in exactly one way, apart from the order of the factors. That is why the ladder and the factor tree always give the same answer.

Other math tools