Prime Factorization Calculator
Enter a whole number from 2 to 1,000,000,000 and get its unique prime factorization in exponent form — for example 360 into 2^3 × 3^2 × 5.
Unique decomposition
Every integer greater than 1 has exactly one prime factorization — the Fundamental Theorem of Arithmetic guarantees it.
Integers from 2 upward only
The number 1 has no prime factors, and 0 and negatives are excluded. The tool accepts whole numbers between 2 and 1,000,000,000.
What is prime factorization?
Expressing a number as a product of primes
Prime factorization expresses a whole number as a product of prime numbers — the indivisible building blocks of arithmetic. A prime is any integer greater than 1 that cannot be divided evenly by anything except 1 and itself (2, 3, 5, 7, 11, …). Every whole number ≥ 2 can be broken down into primes in exactly one way, and that unique combination is its prime factorization.
Enter any whole number from 2 to 1,000,000,000 to see its prime factors in exponent form, ready to use in GCD, LCM, or cryptography calculations.
The calculator uses trial division: it repeatedly tries to divide the number by candidate divisors, starting with 2 and then odd numbers from 3 upward, until the divisor squared exceeds the remaining value.
n = p1^e1 × p2^e2 × … × pk^ekTake 360. Divide by 2 three times (360 → 180 → 90 → 45) — that gives the factor 2^3. Divide 45 by 3 twice (45 → 15 → 5) — that gives 3^2. The remaining value 5 is prime, so the factorization is 2^3 × 3^2 × 5. The exponents (3, 2, 1) add up to 6, which is the total factor count with multiplicity. The algorithm stops checking divisors once d² exceeds the remaining number, because any remaining value larger than 1 must itself be prime.
The factorization string tells you exactly which primes make up the number and how many times each one appears. A prime number like 17 or 97 produces a single-term result with no exponent (just "17" or "97"), because it cannot be divided further — the total factor count is 1. A highly composite number like 360 produces several terms with larger exponents, reflecting how divisible it is: the more prime factors a number has, the more divisors it has in total. The total factor count (with multiplicity) is the sum of all exponents. For 360 that sum is 3 + 2 + 1 = 6, meaning you need six prime numbers multiplied together — 2 × 2 × 2 × 3 × 3 × 5 — to build 360 from scratch. This count is used directly in formulas for the number of divisors and in Euler's totient function, and it lets you compare how smooth or prime-rich different numbers are.
Trial division is fast for everyday numbers but has practical limits.
Large numbers with big prime factors slow down trial division
Trial division checks every odd candidate up to the square root of the remaining value. For numbers close to 1,000,000,000 that happen to be the product of two large primes — for example 999,999,937 × 3 — the inner loop runs tens of thousands of steps. That is why the input is capped at 1,000,000,000. The tool factors integers of 2 and above only: 1 has no prime factors by convention, and 0 and negative numbers are excluded from the definition of prime factorization.