Prime Factorization Calculator
Enter a positive integer and see which prime numbers it's built from.
How to use the calculator
- Enter a positive integer (2 or higher).
- The calculator shows which prime numbers the number is composed of, and how many times each prime occurs.
What is prime factorization?
The fundamental theorem of arithmetic states that every integer greater than 1 can be written as a unique product of prime numbers (numbers only divisible by 1 and themselves). For example, 360 = 2³ × 3² × 5. Prime factorization is used for finding least common multiples and greatest common factors, simplifying fractions, and is central to cryptography.
Easy to multiply, hard to factorise
Multiplying two large primes together is trivial for a computer. Going the other way — recovering the factors from the product — is dramatically harder once the numbers are large enough. This asymmetry is not a curiosity: it is the very foundation of RSA, one of the encryption methods securing online banking and HTTPS.
For small numbers none of this is noticeable, and the calculator here answers instantly. But the difficulty grows very rapidly with the number of digits, and for numbers of several hundred digits there is no known method that manages it in realistic time on today's computers. The fundamental theorem of arithmetic guarantees at the same time that the factorisation is unique: every integer above 1 has exactly one prime factorisation.
Worked example: 360 factorises to 2³ × 3² × 5, that is 2 × 2 × 2 × 3 × 3 × 5 = 360. The factorisation tells you more than it appears to: the number of divisors is found by adding 1 to each exponent and multiplying, (3+1) × (2+1) × (1+1) = 24. So 360 has 24 divisors, which is precisely why it was chosen to divide the circle into degrees.
Frequently asked questions
What happens if I enter a prime number?
The number itself is shown with an exponent of 1 — by definition, it's its own only prime factor.
Does it work for very large numbers?
Yes, but computation time increases for numbers with large prime factors (especially if the number itself is a large prime) — for the vast majority of practical numbers, the calculation is instant.
Why isn't 1 considered a prime number?
By definition, a prime number must have exactly two positive divisors (1 and itself). The number 1 has only one divisor, so it's considered neither prime nor composite.