Prime Factorization Calculator
Break a whole number into the unique set of primes that multiply back to it. Small factors are found by trial division and whatever remains is handled by a cycle-finding method, so a product of two ten-digit primes comes back in a moment rather than hanging the tab — and because the arithmetic uses whole numbers of unlimited size, numbers far past 9,007,199,254,740,991 give exact factors instead of silently wrong ones. Alongside the factorisation you get everything that falls straight out of it: the number of divisors, their sum, Euler’s totient, whether the number is square-free, whether it is perfect, abundant or deficient, and the full list of divisors when there are few enough to be worth listing.
How it works
Enter any whole number of 2 or more to break it into its prime factors — the unique set of primes that multiply back to it. Numbers far beyond the usual 9,007,199,254,740,991 limit are handled exactly, up to 40 digits.
Small factors are found by trial division and anything left over by a cycle-finding method, so a product of two 10-digit primes still comes back in a moment rather than hanging the tab.
Written out
Factors, one by one
| Prime | Power | Contributes |
|---|---|---|
| 2 | 3 | 8 |
| 3 | 2 | 9 |
| 5 | 1 | 5 |
Properties
All of these fall straight out of the factorisation.
All 24 divisors
Frequently asked questions
How large a number can it factorise?
Up to 40 digits. Numbers made of small factors are instant; a large semiprime — two big primes multiplied — is the slow case, and the limit is set so even that stays quick.
How do I know if my number is prime?
If the factorisation is the number itself, it is prime, and that is stated explicitly above the results.
What is Euler’s totient?
The count of numbers below n that share no factor with it. It is read straight off the factorisation and is the value that determines the exponent in RSA.
What do perfect, abundant and deficient mean?
Add up all the divisors of a number except itself. If they equal the number it is perfect, like 6 and 28; if they exceed it the number is abundant; if they fall short it is deficient.
Why does it not list all the divisors sometimes?
A number with thousands of divisors produces a list nobody reads. The count and the sum are always shown; the full list appears when there are 512 or fewer.
Is the factorisation exact for huge numbers?
Yes. Every step uses whole numbers of unlimited size, so there is no point at which the result is approximated or rounded.
Related tools
GCD & LCM Calculator
Find the greatest common divisor and lowest common multiple of any set of whole numbers, with the steps.
Random Prime Number Generator
Generate random primes from a range or at a chosen bit size, verified by a deterministic primality test.
Big Number Calculator
Exact arithmetic on whole numbers of any length — far past the point where ordinary calculators start rounding.