About Prime Factorization Calculator
This prime factorization calculator is free, needs no sign-up and runs in your browser, so the number you type is never uploaded. It breaks any whole number from 2 up to 24 digits into primes, writes the result in exponent form such as 1260 = 2² × 3² × 5 × 7, and draws the factor tree as a responsive diagram.
It also answers the other questions that come with the same number: is it prime, how many divisors does it have and what are they, and what do they add up to. Each view is one click away and all of them work on the same input.
Small numbers are factored by trial division. Larger ones use a primality test that is exact below 3.3 × 10²⁴ and Pollard rho to split what is left, with big-integer arithmetic so no digits are lost. If a very large number cannot be split in the time allowed, the calculator shows the part it found and says what remains.
How to use Prime Factorization Calculator
- Choose Factorization, Factor tree, Is it prime or Divisors.
- Type a whole number of 2 or more. Up to 24 digits are accepted.
- Read the prime factorization in exponent form at the top.
- Look at the factor tree, the list of divisors and their count and sum underneath.
- Open the steps to see the repeated division that produced each prime.
Features
- Prime factorization in exponent form and as a plain product.
- Factor tree drawn as a scalable diagram, with the primes filled in.
- Is-it-prime check with the smallest factor when the number is composite.
- Every divisor listed, plus the count and the sum of divisors.
- Numbers of up to 24 digits using exact big-integer arithmetic.
- Trial division for small numbers and Pollard rho for large ones.
- Repeated-division steps in KaTeX.
Prime factorization and the divisor formulas
The fundamental theorem of arithmetic says every whole number above 1 is a product of primes in exactly one way, apart from order. Once you have the exponents, the number of divisors and their sum follow directly.
n = p₁^a × p₂^b × p₃^c ...
number of divisors = (a + 1)(b + 1)(c + 1) ...
sum of divisors = Π (p^(e+1) - 1) / (p - 1)Worked examples
1260 gives 2^2 × 3^2 × 5 × 7
It has 36 divisors, which is (2 + 1)(2 + 1)(1 + 1)(1 + 1).
360 gives 2^3 × 3^2 × 5
24 divisors, adding up to 1170. The factor tree has six primes.
997 gives prime
997 is a prime number: its only divisors are 1 and itself.
600851475143 gives 71 × 839 × 1471 × 6857
The famous Project Euler number: its largest prime factor is 6857.
Primes below 100
| Range | Primes |
|---|---|
| 1 to 20 | 2, 3, 5, 7, 11, 13, 17, 19 |
| 21 to 50 | 23, 29, 31, 37, 41, 43, 47 |
| 51 to 100 | 53, 59, 61, 67, 71, 73, 79, 83, 89, 97 |
Good to know
Limits of this calculator
Up to 24 digits are accepted. The primality test is exact in that range. Numbers with two very large prime factors, for example two 12-digit primes, can take longer than the time budget, in which case the factors found so far are shown with the unsplit part marked.
The factor tree is drawn for numbers with at most 20 prime factors counting repeats. Beyond that, use the exponent form.
Privacy: how it works
- Everything is calculated by code running in your browser tab. The number you enter is not sent to Ulkaa or to any other server, and there is nothing to sign in to.
Tips
- To test a number by hand, try dividing by primes up to its square root. If none divides it, it is prime.
- 1 is not prime and not composite. 2 is the only even prime.
- A number with an odd count of divisors is a perfect square.
Frequently asked questions
Is it really free?
Yes. There is no price, no trial and no credit card. Ulkaa Tool does the work with your own device, so there is no server bill to pass on to you.
Do I need an account?
No. There is no sign-up and no login. Open the page and use it. An Ulkaa account is not needed for anything on this tool.
Does it run in my browser?
Yes. Numbers are processed by code running in your browser tab, on your own device.
Is my data uploaded?
No. Numbers are never sent to Ulkaa or to anyone else. You can check this yourself by watching the Network tab in your browser developer tools while you use the tool.
What is prime factorization?
Writing a number as a product of primes. For 360 that is 2 × 2 × 2 × 3 × 3 × 5, or 2³ × 3² × 5 in exponent form.
How do I make a factor tree?
Split the number into any two factors, then split each factor that is not prime, and continue until every branch ends in a prime. The primes at the ends are the prime factorization.
Is 1 a prime number?
No. A prime has exactly two divisors, 1 and itself, and 1 has only one. This is what makes the factorization of every number unique.
How do I check whether a number is prime?
Choose Is it prime. The calculator runs an exact test and, when the number is composite, shows its smallest prime factor.
How many divisors does a number have?
Add one to each exponent in its prime factorization and multiply. For 360 = 2³ × 3² × 5 that is 4 × 3 × 2 = 24.
How large a number can it factor?
Up to 24 digits. Most numbers factor instantly. A product of two very large primes may not split within the time allowed, and the calculator then says so.
What is the difference between a factor and a prime factor?
A factor is any number that divides it exactly. A prime factor is a factor that is also prime. 12 has factors 1, 2, 3, 4, 6, 12 but prime factors only 2 and 3.