Prime Factorization Calculator

Prime Factorization Calculator

Growing AI Skill PRO

Enter Calculation

Formula

Number=p1a1×p2a2×⋯×pkak\text{Number} = p_1^{a_1} \times p_2^{a_2} \times \cdots \times p_k^{a_k}
Usage stats

Advertisement

Results

Prime Factorization of 360
2^3 × 3^2 × 5
in exponent form
Number 360
Expanded form 2 × 2 × 2 × 3 × 3 × 5
Distinct prime factors 3
Total prime factors (with multiplicity) 6
Is prime? No

Report an error on this page

What is prime factorization?

Prime factorization is the process of breaking a whole number down into the set of prime numbers that multiply together to produce it. A prime is a number greater than 1 whose only divisors are 1 and itself (2, 3, 5, 7, 11, …). The Fundamental Theorem of Arithmetic guarantees that every integer greater than 1 has exactly one prime factorization, apart from the order of the factors.

Factor tree breaking 60 into prime factors 2, 2, 3, 5
A factor tree repeatedly splits a number until only primes remain.

How to use this calculator

Enter any whole number from 2 upward and press calculate. The tool returns the factorization in two formats: an expanded product (every prime listed individually) and a compact exponent form that groups repeated primes as powers. It also reports how many distinct primes appear, the total count of prime factors counted with multiplicity, and whether the number itself is prime.

The formula explained

The calculator uses trial division. Starting at the smallest prime, 2, it repeatedly divides the number by each candidate divisor d while the division is exact, counting how many times each divides. It only needs to test divisors up to \(\sqrt{n}\), because if no factor is found below the square root, whatever remains must itself be prime. The result is expressed as $$n = p_1^{a_1} \times p_2^{a_2} \times \cdots \times p_k^{a_k}$$

Advertisement
Number expressed as a product of prime powers with exponents
Exponent form groups repeated primes into prime powers.

Worked example

Take \(n = 360\). Divide by 2 three times: \(360 \to 180 \to 90 \to 45\) (\(2^3\)). Divide by 3 twice: \(45 \to 15 \to 5\) (\(3^2\)). Divide by 5 once: \(5 \to 1\) (\(5^1\)). So $$360 = 2^3 \times 3^2 \times 5$$ Expanded that is \(2 \times 2 \times 2 \times 3 \times 3 \times 5\): three distinct primes and six total factors.

Prime Numbers and Common Factorizations Reference

A prime is a whole number greater than 1 whose only positive divisors are 1 and itself. There are exactly 25 primes below 100. The number 1 is neither prime nor composite, and 2 is the only even prime.

Range Primes Count
1–9 2, 3, 5, 7 4
10–19 11, 13, 17, 19 4
20–29 23, 29 2
30–39 31, 37 2
40–49 41, 43, 47 3
50–59 53, 59 2
60–69 61, 67 2
70–79 71, 73, 79 3
80–89 83, 89 2
90–99 97 1

Prime factorizations of common numbers, in exponent form:

Number Prime factorization Number of divisors
12 2² × 3 6
24 2³ × 3 8
36 2² × 3² 9
48 2⁴ × 3 10
60 2² × 3 × 5 12
100 2² × 5² 9
120 2³ × 3 × 5 16
144 2⁴ × 3² 15
210 2 × 3 × 5 × 7 16
360 2³ × 3² × 5 24
1000 2³ × 5³ 16
1024 2¹⁰ 11
Advertisement

Interpreting Your Result

The exponent form \(n = p_1^{a_1} \times p_2^{a_2} \times \cdots \times p_k^{a_k}\) lists each distinct prime \(p_i\) with how many times it divides \(n\).

  • Number of divisors: it equals \((a_1+1)(a_2+1)\cdots(a_k+1)\). For \(360 = 2^3 \times 3^2 \times 5\), that is \((3+1)(2+1)(1+1) = 24\) divisors.
  • Prime test: a single prime with exponent 1 means the number is prime and its only divisors are 1 and itself.
  • Perfect square: if every exponent is even, the number is a perfect square. For \(144 = 2^4 \times 3^2\), halving the exponents gives \(2^2 \times 3 = 12\), so \(\sqrt{144} = 12\).
  • GCD and LCM: for the GCD take each shared prime with the smaller exponent, and for the LCM take every prime with the larger exponent. With \(360 = 2^3 \times 3^2 \times 5\) and \(84 = 2^2 \times 3 \times 7\): GCD = \(2^2 \times 3 = 12\) and LCM = \(2^3 \times 3^2 \times 5 \times 7 = 2520\). Check: \(12 \times 2520 = 30240 = 360 \times 84\).
  • Simplifying fractions: divide the numerator and denominator by their GCD. \(\frac{84}{360} = \frac{84 \div 12}{360 \div 12} = \frac{7}{30}\).

Large numbers. Multiplying two large primes is easy, but recovering them from the product (a semiprime) is believed to be very hard for classical computers. Trial division becomes impractical long before numbers reach the hundreds of digits. RSA encryption relies on this asymmetry, using moduli of 2048 bits or more. Note that 1 has no prime factors and 0 has no prime factorization.

FAQ

Why must the number be at least 2? The numbers 0 and 1 have no prime factorization — 1 is neither prime nor composite.

What does "with multiplicity" mean? It counts each prime as many times as it appears. For 360, the total is 6 (three 2s, two 3s, one 5).

Is 1 prime? No. By definition a prime must have exactly two distinct positive divisors, and 1 has only one.

Last updated:

Most popular in Math and Statistics

View all Math and Statistics calculators