Prime factorisation calculator
Write a number as a product of primes and see at once whether it is prime itself.
Prime factorisation
Prime factorisation: 2³ × 3² × 5
- Written out
- 2 × 2 × 2 × 3 × 3 × 5
- Number of divisors
- 24
- Next prime
- 367
- Previous prime
- 359
This number is composite: it has divisors other than 1 and itself.
| Prime | Power | Value |
|---|---|---|
| 2 | 3 | 8 |
| 3 | 2 | 9 |
| 5 | 1 | 5 |
How it works
Every whole number above 1 is a product of primes in exactly one way, apart from order. The calculator divides out small primes first, then uses the Pollard rho method to split larger factors.
Each factor is confirmed prime with a deterministic Miller–Rabin test, which is proven correct for numbers of this size. The number of divisors comes from the exponents: add 1 to each and multiply.
Formula
n = p₁^a₁ × p₂^a₂ × … × pₖ^aₖ divisors = (a₁ + 1)(a₂ + 1)…(aₖ + 1)
Worked example
360 = 2 × 2 × 2 × 3 × 3 × 5 = 2³ × 3² × 5. It has (3 + 1)(2 + 1)(1 + 1) = 24 divisors. The nearest primes are 359 and 367.
Questions people ask
Is 1 a prime number?
No. A prime has exactly two divisors, 1 and itself; 1 has only one. Leaving it out keeps prime factorisations unique.
Is 2 the only even prime?
Yes. Every other even number is divisible by 2, so it has at least three divisors.
How do you check whether a big number is prime?
Trial division is too slow for large numbers, so tests such as Miller–Rabin are used. With the right test bases it gives a certain answer for numbers this size.