Prime Factorization Calculator
Prime factorization is the process of expressing a positive integer as a product of prime numbers. Every integer greater than 1 can be uniquely factorized into primes, a principle known as the Fundamental Theorem of Arithmetic. This calculator takes any positive integer up to 10 digits (10,000,000,000) and breaks it down into its prime factors using trial division. The result is displayed in both exponential notation (e.g., 360 = 2^3 * 3^2 * 5) and as a step-by-step breakdown showing each division. Prime factorization has practical applications in finding the greatest common divisor (GCD) and least common multiple (LCM) of two numbers, simplifying fractions to lowest terms, solving problems in number theory and cryptography, and understanding the divisibility properties of a number. For example, 360 breaks down as 2 * 2 * 2 * 3 * 3 * 5, which tells us that 360 is divisible by any combination of these prime factors.
Prime factorization formula
Find the smallest prime p that divides n.
Divide n by p to get n/p.
Repeat until the result is 1.
Write each prime factor with its exponent.
First 20 prime numbers
| Prime numbers | |||||||||
|---|---|---|---|---|---|---|---|---|---|
| 2 | 3 | 5 | 7 | 11 | 13 | 17 | 19 | 23 | 29 |
| 31 | 37 | 41 | 43 | 47 | 53 | 59 | 61 | 67 | 71 |
Prime factorization: frequently asked questions
What is prime factorization?
Prime factorization is the breakdown of a number into the product of prime numbers. Every positive integer greater than 1 can be written as a unique product of prime numbers. For example, 60 = 2^2 * 3 * 5. This unique factorization is called the Fundamental Theorem of Arithmetic.
What is a prime number?
A prime number is a natural number greater than 1 that has exactly two distinct positive divisors: 1 and itself. The first few primes are 2, 3, 5, 7, 11, 13, 17, 19, 23, and 29. The number 1 is not considered prime by modern definition.
Why is prime factorization useful?
Prime factorization is useful in many areas including finding greatest common divisors (GCD), least common multiples (LCM), simplifying fractions, cryptography, and understanding the structure of numbers. It reveals what divides a number and helps solve many number theory problems.
What is the difference between 2^3 and 2 * 3?
2^3 means 2 multiplied by itself 3 times: 2 * 2 * 2 = 8. It is called an exponent or power. 2 * 3 = 6. In prime factorization, when a prime appears multiple times, we write it as a power. For 360 = 2 * 2 * 2 * 3 * 3 * 5, we write it as 2^3 * 3^2 * 5.
What is the largest number this calculator can handle?
This calculator can factor integers up to 10 digits (9,999,999,999). For larger numbers, JavaScript's number precision becomes a limitation. The factorization algorithm uses trial division by prime numbers up to the square root of the input.
Official sources
- Fundamental Theorem of Arithmetic: NIST Special Publication 330.
Reviewed by the CalculatorHub team, edited by James Graham, 14 June 2026. See our methodology.