Prime Factorization Calculator
Check whether a number is prime and break it into prime factors.
In
Up to 9,007,199,254,740,991
Out
Not prime
2³ × 3² × 5
Prime factorisation of 360
All divisors
1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 18, 20, 24, 30, 36, 40, 45, 60, 72, 90, 120, 180, 360
How the Prime Factorization calculation works
Small prime factors are removed by trial division. Whatever remains is tested with the Miller–Rabin test, which is exact for every number this tool accepts, and split with Pollard's rho method if it is not prime. Even 16-digit numbers answer instantly.
Every whole number above 1 has exactly one prime factorisation. A number is prime when that factorisation is just the number itself.
The divisor count multiplies one more than each exponent, so 2³ × 3² × 5 has 4 × 3 × 2 = 24 divisors. The nearest primes on either side are found by testing each neighbour in turn.
Worked example
360 is 2³ × 3² × 5, so it is not prime. It has 24 divisors, which add up to 1,170. The nearest primes are 359 below and 367 above.
The tool above opens with these numbers. Change them to run your own scenario, or press Reset to come back to this example.
Frequently asked questions
Related tools
Greatest common divisor and least common multiple of any list of numbers.
A plain calculator that you can type into, with a running history.
Trig, logs, powers, roots and factorials, in degrees or radians.
Three percentage questions, answered instantly.
How far apart two values are, when neither is the starting point.
Solve a proportion for the missing value, or simplify a ratio.
- prime factorization
- prime checker
- is it prime
- factors
- divisors
- math