⚡ 2026 Edition · Free Forever

Prime Factorization Calculator with an animated factor tree

Break any whole number into its prime factors. See the division steps, the tidy exponent form, an animated factor-tree diagram, and an AI explanation of why the factorization is unique.

Step-by-step Visual diagram AI insights Private & free

Prime Factorizer

Live · BigInt-safe
Tip: enter one whole number (2 or more). Press Enter to factorize.
Quick answer

What is prime factorization?

Prime factorization expresses a number as a product of prime numbers. For example, 360 = 2³ × 3² × 5. Every integer greater than 1 has exactly one prime factorization (the Fundamental Theorem of Arithmetic), which is why it is the foundation of fractions, GCD/LCM and cryptography.

Why this tool

More than an answer — a learning tool

Designed so students actually see how a factor tree forms and why each branch ends on a prime.

Animated factor tree

Each composite splits into a small prime and the rest until only primes remain.

Clean exponent form

Repeated primes are grouped automatically, e.g. 2 × 2 × 2 → 2³.

Prime detection

If the number is already prime, the tool tells you instantly and explains why.

How it works

Factorize in three steps

1

Enter a number

Type any whole number from 2 upward, e.g. 360.

2

Trial division runs

We divide by the smallest prime that fits, again and again.

3

Read the tree & form

Get the factor tree, exponent form, divisor count and an AI explanation.

Worked examples

Prime factorization examples

Tap any row to load it into the calculator.

NumberPrime factorizationNote
122² × 32 distinct primes
3602³ × 3² × 524 divisors
1002² × 5²perfect-square form
9797already prime
10242¹⁰power of two
23102 × 3 × 5 × 7 × 11primorial
182 × 3²2 distinct primes
242³ × 32 distinct primes
302 × 3 × 53 distinct primes
362² × 3²perfect square
482⁴ × 32 distinct primes

How prime factorization works

To factorize a number, divide it by the smallest prime that goes in evenly, then keep dividing the result the same way until you are left with 1. The primes you divided by — listed with their powers — are the prime factorization.

Worked example: 360

360 ÷ 2 = 180, ÷ 2 = 90, ÷ 2 = 45, ÷ 3 = 15, ÷ 3 = 5, ÷ 5 = 1. Collecting the primes gives 360 = 2³ × 3² × 5.

Why it is unique

The Fundamental Theorem of Arithmetic guarantees every integer above 1 has one and only one prime factorization (ignoring order). That uniqueness is what makes primes the "atoms" of arithmetic.

Tip: the number of divisors equals the product of (each exponent + 1). For 360 = 2³×3²×5¹, that's (3+1)(2+1)(1+1) = 24 divisors.

Why prime factorization matters

  • Simplifying fractions and finding the GCD/LCM quickly.
  • Cryptography — RSA security relies on factoring being hard for huge numbers.
  • Number theory — divisor counts, perfect numbers and more start here.
FAQ

Frequently asked questions

What is the prime factorization of a number?

It is the number written as a product of prime numbers, such as 360 = 2³ × 3² × 5. Each integer above 1 has exactly one prime factorization.

How do you do prime factorization with a factor tree?

Split the number into any two factors, then keep splitting each composite branch until every leaf is a prime. The leaves, multiplied together, are the prime factorization.

Is 1 a prime number?

No. 1 is a unit, not a prime, so it has no prime factorization. Primes start at 2.

How can I tell if a number is already prime?

If trial division by every integer up to its square root finds no divisor, the number is prime. This calculator detects that automatically.

What is the largest number this can factorize?

It comfortably factorizes numbers up to around 18 digits quickly using trial division. Extremely large semiprimes (as used in cryptography) are intentionally hard to factor.