Uni-Sine
MathematicsNumber

Prime factorization calculator

A prime factorization calculator (prime factorisation in the UK) writes a whole number as a product of prime numbers. Every whole number above 1 has exactly one prime factorization: 360 = 2 × 2 × 2 × 3 × 3 × 5, or 2³ × 3² × 5 in index form. Our Prime Factorisation Calculator draws the factor tree for any number up to a trillion, gives the answer in index form, and says how many factors the number has.

It opens on 360. Type any positive whole number up to 1,000,000,000,000.

Try it

Prime Factorisation Calculator

Break any number into primes with a factor tree

Go to its page

How to use the prime factorization calculator

  1. Type a Whole number under Number.
  2. Under Tree, choose how to split each number: Even splits splits it into two factors as close together as possible, and Smallest prime first takes out the smallest prime each time.
  3. Read the factor tree, with the primes at the ends of the branches highlighted.
  4. Read the results: the prime factorization in index form, whether the number is prime, how many factors it has, and the sum of those factors.
  5. Follow the working, which lists each split, then the primes, then the primes collected into powers.

Both tree shapes give the same primes, because a number has only one prime factorization. Practice and help sets questions on the largest prime factor and the number of factors, with worked solutions.

How to find the prime factorization of a number

Method 1: a factor tree

Split the number into any two factors, then split each factor again, until every branch ends on a prime. Circle the primes as you go. For 84:

847123422
The circled primes give 84 = 2 × 2 × 3 × 7
84 = 2 \times 2 \times 3 \times 7 = 2^2 \times 3 \times 7

Type 84 with Even splits, and the calculator draws this same tree: 84 = 7 × 12, then 12 = 3 × 4, then 4 = 2 × 2.

Method 2: divide by the smallest prime

Divide by 2 for as long as you can, then by 3, then 5, 7 and so on, until you reach 1. For 360:

Divide byResult
2180
290
245
315
35
51

The primes down the left multiply to 360: 2³ × 3² × 5. Choose Smallest prime first and the calculator's working follows these exact steps: 360 = 2 × 180, 180 = 2 × 90, 90 = 2 × 45, 45 = 3 × 15 and 15 = 3 × 5. This is the same as the division ladder (upside-down division) taught in many US schools.

Worked examples you can check in the calculator

Example 1: a number with larger primes

Find the prime factorization of 1001. It is odd, its digits add to 2, so it is not divisible by 3, and it does not end in 0 or 5. Try 7: 1001 ÷ 7 = 143. Then 143 = 11 × 13:

1001 = 7 \times 11 \times 13

The calculator gives 7 × 11 × 13, with 8 factors.

Example 2: is it prime?

To test whether 97 is prime, try the primes up to √97 ≈ 9.8: that is 2, 3, 5 and 7. None divides 97, so it is prime. The calculator says so: no whole number from 2 up to √97 divides 97. You only need to test up to the square root, because if a number has a factor bigger than its square root, it must also have one smaller.

Example 3: a large number

600,851,475,143 is far too big to factor by hand, but the calculator finds it at once: 71 × 839 × 1471 × 6857. It handles any number up to a trillion.

Check yourself:

practice
Pick an answer, then check it.
Which is the prime factorization of 72?

How many factors does a number have?

Write the number in index form, add 1 to each power, and multiply. For 360 = 2³ × 3² × 5¹:

(3 + 1)(2 + 1)(1 + 1) = 4 \times 3 \times 2 = 24\ \text{factors}

This works because each factor uses 2 between 0 and 3 times, 3 between 0 and 2 times, and 5 either 0 or 1 time. The calculator gives 24 factors and their sum, 1,170. It counts the factors but does not list them; for 84, with 12 factors, the list is 1, 2, 3, 4, 6, 7, 12, 14, 21, 28, 42 and 84.

GCF and LCM from prime factors

Prime factors make the greatest common factor (GCF, or HCF in the UK) and the least common multiple (LCM) quick. Take 84 = 2² × 3 × 7 and 360 = 2³ × 3² × 5:

  • GCF: the primes they share, each to the lower power: 2² × 3 = 12.
  • LCM: every prime in either, each to the higher power: 2³ × 3² × 5 × 7 = 2,520.

A check: GCF × LCM = 12 × 2,520 = 30,240, which is 84 × 360. The calculator factors one number at a time, so for two numbers, factor each one, then compare. The GCF Calculator and LCM Calculator do the comparison for you. In the UK this topic is called prime factor decomposition, and the prime factor decomposition guide covers the Venn diagram method and square and cube roots.

Common mistakes

  • Stopping at a composite number. 84 = 2 × 42 is a start, not an answer. Keep going until every factor is prime.
  • Counting 1 as a prime. 1 has only one factor, so it is not prime and never appears in a prime factorization.
  • Missing a repeated prime. 360 has three 2s. Count them on the tree before writing the powers.
  • Writing the answer as a sum. A prime factorization is a product: 2³ × 3² × 5, not 2³ + 3² + 5.
  • Forgetting the power of 1. When counting factors, a prime on its own has power 1, so it adds a factor of 2.

Practise number skills in a short timed paper

Questions on primes and factors come up in Pre-Algebra & Algebra 1 practice, and in GCSE Maths Foundation in the UK. Each daily paper is a short timed paper of 8 questions worth 25 to 35 marks, and the papers mix topics. Our GCF calculator guide and LCM calculator guide go further with two numbers.

Common questions

How do you find the prime factorization of a number?
Split it into factors with a factor tree, or divide by the smallest prime again and again, until only primes are left. Then write them as a product, using powers for repeats.
What is the prime factorization of 360?
2³ × 3² × 5, which is 2 × 2 × 2 × 3 × 3 × 5.
Is 1 a prime number?
No. A prime has exactly two factors, 1 and itself. 1 has only one factor, so it is neither prime nor composite.
Is there only one prime factorization for each number?
Yes. Every whole number greater than 1 has exactly one set of prime factors, apart from the order. This is the fundamental theorem of arithmetic.
How do you write a prime factorization in index form?
Group the repeated primes into powers: 2 × 2 × 2 × 3 × 3 × 5 becomes 2³ × 3² × 5.
How do you find the number of factors from the prime factorization?
Add 1 to each power and multiply the results. 360 = 2³ × 3² × 5 has (3 + 1)(2 + 1)(1 + 1) = 24 factors.

Revision cards

Say the answer first, then flip the card to check it.

Where to go next

  • Solve it

    Prime Factorisation Calculator

    Break any number into primes with a factor tree

    Open the tool
  • Test it

    Pre-Algebra & Algebra 1

    A new exam-style paper every day, with instant marking and a mark scheme

    Start today's paper
Read next
Maths · NumberPrime factor decomposition: method, HCF and LCMHow to write a number as a product of prime factors with a factor tree or division, in index form, and use it for HCF, LCM, square roots and cube roots.