Skip to content
Toolspire

Education Tools

Prime Factorization

Prime Factorization is part of Toolspire and is ready as soon as this page loads. The result is the product of primes, with repeats written out. 84 is 2 × 2 × 3 × 7, not 2² × 3 × 7, so you can check the multiply yourself.

Runs in this tabFreeNo account

On this page

What you can do here

Odd candidates only after 2

Once twos are removed, the loop steps by 2, so it never tests an even divisor again.

Stops at the square root

If a factor larger than the square root existed, its pair would already have been found.

Prime called out

A single-factor result is labelled prime instead of looking like a failed tree.

The sequence

How to use the Prime Factorization

  1. 1

    Start from an integer greater than 1

    1, 0 and negatives are not factored. Decimals are rejected.

  2. 2

    Multiply the factors back

    The product of the numbers in the headline should equal the integer you typed.

  3. 3

    Use the factors for HCF by hand

    Shared primes, taking the smaller power, are the HCF. The LCM page does that without a factor list.

Worth knowing

  • Prime Factorization on Toolspire: trial division strips factors of 2, then odd primes up to the square root of what remains.
  • 84 factors as 2 × 2 × 3 × 7. A prime such as 17 is returned as itself with the word prime.
  • The input must be an integer from 2 to 1,000,000,000,000. 1 is not a prime and is not factored.
  • Repeats stay written out. 12 is 2 × 2 × 3, so the exponents are visible as copies.

What trial division skips

After the factors of two are gone, only odd divisors are tested, and only while the square of the candidate is still at most the remaining value. A remaining value above 1 at the end is itself prime. This is the classroom method, not a sieve, so a 12-digit prime can take a moment. Numbers above one trillion are refused so the loop stays bounded.

FAQ

Questions about Prime Factorization

Where does Prime Factorization run?

Prime Factorization runs in this tab on Toolspire. What you type or drop in is not sent to us and is not stored on a server.

Is 1 a prime number?

No. This page rejects 1. Prime factorization is defined for integers greater than 1.

Why are repeated primes written twice?

So the line multiplies back to the original number without you having to expand exponents. 2 × 2 × 3 is 12.

Can this factor a very large prime?

Up to one trillion. Past that the page refuses rather than running a long trial loop in the tab.

How do I use this to find an HCF?

Factor both numbers and keep the primes they share, with the lower power. For a direct answer, the LCM and HCF calculator is shorter.

Keep going

Open the full directory

Last updated Report a problem or suggest a feature