Prime Factorization & Factors Calculator
360 = 2³ × 3² × 5 — with the factor tree, the ladder and every factor.
Prime factorization
This is the last answer worked out. Fix the input above to update it.
Working…
Factor tree
Division ladder
Divide by the smallest prime that goes in exactly, again and again, until 1 is left. The primes on the left are the prime factors.
All factors
Factor pairs
| Factor | × Factor | = Number |
|---|
About the Prime Factorization & Factors Calculator
Type a whole number — or an expression such as 2^32 + 1 or 10! − 1 — to see its prime factorization as prime powers (360 = 2³ × 3² × 5), worked out two ways: as a factor tree and as a division ladder. Below that you get every factor in order, the factor pairs, the number and the sum of the factors, Euler’s totient, and what kind of number it is: prime or composite, perfect, abundant or deficient, square-free, a perfect square or cube.
Small prime factors are found by trial division; what is left is split with Pollard’s rho method in Brent’s version, in a background thread, so the page never freezes. That finds prime factors of up to about 15 digits within seconds, even in numbers with hundreds of digits. If a part cannot be split in time, the page says so, shows the factors it did find, and lets you keep trying for up to a minute.
How to use it
- Type a whole number of up to 1,000 digits, or an expression with + − × ÷ ^ ! and brackets. The result appears as you type; press Enter or Factorize to start at once.
- Read the prime factorization at the top, with its classification (prime, composite, perfect, abundant, deficient, square-free …) and the factor count and sums.
- Follow the factor tree — choose Balanced pairs or Smallest prime first — and the division ladder, which divides by the smallest prime again and again.
- Copy the factorization, copy the list of factors, or download everything as a text file. For a huge number, use Stop at any time, or Keep trying if a part was not split.
Examples
360
360 = 2³ × 3² × 5
24 factors; the factors add up to 1,170.
28
28 = 2² × 7 — perfect
Its proper factors 1 + 2 + 4 + 7 + 14 add up to 28.
945
945 = 3³ × 5 × 7
Its proper factors add up to 975, more than 945.
2^32 + 1
641 × 6,700,417
Fermat thought numbers of the form 2^(2^n) + 1 were all prime; in 1732 Euler found this factor.
600851475143
71 × 839 × 1471 × 6857
2^64 + 1
274,177 × 67,280,421,310,721
Split in a fraction of a second by Pollard’s rho.
Common uses
- Homework on prime factorization, factor trees, the ladder method, factors and multiples.
- Finding all the factors of a number — for example, to simplify a fraction or a square root, or to find every way of arranging items in equal rows.
- Checking number properties: perfect, abundant and deficient numbers, square-free numbers, perfect powers.
- Factoring test values for programs, such as 2^64 + 1 or products of large primes.
How the factors are found
- Trial division by every prime up to 1,000,000 removes the small factors. If what remains is less than the square of the last prime tried, it must itself be prime.
- Each remaining part is tested for primality: deterministic Miller–Rabin below 3.3 × 10²⁴ (a proof in that range) and Baillie–PSW above it, so larger prime factors are labelled probable primes.
- A composite part is checked for being a perfect power, then split with Pollard’s rho method (Pollard 1975), using Brent’s faster way of detecting the cycle (Brent 1980). Rho needs about √p steps to find a prime factor p, which is why factors of up to about 15 digits come out quickly and much larger ones may not be found at all.
Factor counts and sums from the prime factorization
If n = p₁^a₁ × p₂^a₂ × … × p_k^a_k, then:
- Number of factors: (a₁ + 1)(a₂ + 1)…(a_k + 1). For 360 = 2³ × 3² × 5¹ that is 4 × 3 × 2 = 24.
- Sum of factors σ(n): the product of (p^(a+1) − 1) ÷ (p − 1) for each prime. For 360: 15 × 13 × 6 = 1,170.
- Euler’s totient φ(n), the count of numbers from 1 to n that share no factor with n: n × (1 − 1/p₁) × (1 − 1/p₂) …. For 360: 360 × ½ × ⅔ × ⅘ = 96.
The sum of the proper factors (all except n itself) decides the type: equal to n makes it perfect (6, 28, 496, 8,128), more than n abundant (12, 18, 20 …) and less than n deficient (every prime, for example). A number is square-free when no prime appears twice, and a perfect square when every exponent is even.
Factor tree or division ladder?
Both give the same answer — every whole number above 1 has exactly one prime factorization (the fundamental theorem of arithmetic). A factor tree splits a number into any two factors and keeps splitting until only primes are left; the balanced style picks the pair closest to the square root, which keeps the tree short. The division ladder (or “upside-down division”) divides by the smallest prime again and again, so the primes come out in order down the left side.
Limitations
- Numbers can have up to 1,000 digits, but a number whose prime factors all have more than about 15–20 digits may not be fully factored — the page shows the factors it found and marks the rest as composite. Breaking a product of two very large primes (as in an RSA key) is beyond any browser tool.
- Prime factors above 3.3 × 10²⁴ are probable primes (Baillie–PSW, with no known counterexample), not proven primes.
- All factors and factor pairs are listed when there are at most 10,000 of them; the page shows the first 2,000 and the download has the rest. The factor tree is drawn for up to 40 prime factors.
Privacy
Everything happens in your browser. What you enter or open here is not uploaded or stored by MySmartCoPilot.
Frequently asked questions
What is the prime factorization of a number?
Writing it as a product of prime numbers: 60 = 2 × 2 × 3 × 5 = 2² × 3 × 5. Every whole number above 1 has exactly one prime factorization, apart from the order of the factors.
How do you make a factor tree?
Write the number at the top and split it into any two factors, such as 360 = 18 × 20. Split each composite number again (18 = 3 × 6, 20 = 4 × 5, …) until every branch ends in a prime. The primes at the ends of the branches are the prime factorization.
How many factors does 360 have?
24. From 360 = 2³ × 3² × 5, add 1 to each exponent and multiply: (3 + 1)(2 + 1)(1 + 1) = 24. The factors are 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 18, 20, 24, 30, 36, 40, 45, 60, 72, 90, 120, 180 and 360.
What is the difference between factors and prime factors?
A factor divides the number exactly: the factors of 12 are 1, 2, 3, 4, 6 and 12. The prime factors are the factors that are prime — for 12 they are 2 and 3, and 12 = 2² × 3.
Is 1 a prime factor?
No. 1 is not a prime number, so it never appears in a prime factorization. 1 itself has no prime factors at all.
What are perfect, abundant and deficient numbers?
Add up the proper factors (all the factors except the number itself). If the total equals the number it is perfect (6 = 1 + 2 + 3), if it is larger it is abundant (12: 1 + 2 + 3 + 4 + 6 = 16), and if it is smaller it is deficient (8: 1 + 2 + 4 = 7).
Can this break an RSA key?
No. An RSA modulus is the product of two primes with hundreds of digits each; no known method can factor it in a browser, or on any ordinary computer. The tool will find any small factors and mark the rest as composite.