Prime Factorization Calculator
Every whole number is built from primes multiplied together, in exactly one way — that is the fundamental theorem of arithmetic, and prime factorization is how you see the construction. This tool divides your number down to its prime building blocks, lists every divisor, and counts them, all in exact integer arithmetic for numbers up to a trillion (10¹²).
If the number is itself prime, the page says so plainly instead of dressing up a non-result: a prime has no factorization beyond itself, and knowing a number is prime is a complete answer, not a failure.
Prime factorization
2³ × 3² × 5
Each prime raised to the number of times it divides the number.
Number of factors
24
Every positive divisor, 1 and the number itself included.
All factors
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 it is worked out
- 360 = 2³ × 3² × 5 — each prime raised to the number of times it divides 360.
- Combining the prime powers in every way gives 24 positive factors in total.
Embed this calculator on your website →
The formula
n = p₁^a₁ × p₂^a₂ × … · number of divisors = (a₁+1)(a₂+1)…
- Trial division — divide by 2, then by odd numbers up to √n. Anything left over at the end is prime. For n up to 10¹² that is at most a million trial divisors — instant, and exact.
- Divisor count — add 1 to each exponent and multiply: each divisor picks an exponent from 0 up to aᵢ for every prime.
Worked example: 360 = 2³ × 3² × 5 — and (3+1) × (2+1) × (1+1) = 24 divisors.
How it works
Why factorizations run the world. Least common denominators, greatest common divisors, simplifying fractions, simplifying radicals — all of them are factorization in disguise (the LCD page and the nth root page on this site both factor numbers under the hood). And run the idea in reverse — multiplying two large primes is easy, un-multiplying the result is hard — and you have the asymmetry that RSA encryption is built on. The numbers there are hundreds of digits long precisely because trial division, this page’s honest method, stops being practical.
The 10¹² limit, stated plainly. Trial division tests divisors up to the square root of your number. At 10¹² the root is 10⁶ — nothing. At 10²⁴ it would be 10¹² trial divisions, and no one is waiting for that. Faster algorithms exist (Pollard’s rho and friends), but this tool prefers a method whose every step is auditable, inside a range where it is instant, over a cleverer method outside that range.
Examples
- A prime — 97 has no divisor up to √97, so the tool reports it as prime, with 2 factors (1 and 97).
- A repunit-flavoured giant — 999,999,999,999 = 3³ × 7 × 11 × 13 × 37 × 101 × 9901, with 256 divisors.
- A pure power — 549,755,813,888 is 2³⁹: one prime, thirty-nine times, 40 divisors.
Frequently asked questions
Is 1 prime?
No — and it is not composite either. 1 is the unit, the empty product of primes. If 1 counted as prime, factorizations would stop being unique (you could pad any of them with 1s forever). This tool treats 1 as its own case: the empty product, with exactly one divisor — itself.
How does the factor count formula work?
A divisor of p₁^a₁ × p₂^a₂ × … is built by choosing, for each prime, an exponent anywhere from 0 to aᵢ — that is aᵢ + 1 choices per prime, and the choices multiply. 360 = 2³ × 3² × 5¹ gives (3+1)(2+1)(1+1) = 24 divisors, which the tool also lists in full so you can check.
Why stop at 10¹²?
Trial division costs about √n steps. The square root of 10¹² is a million — nothing. Beyond this range the tool would rather refuse honestly than quietly switch to a probabilistic method. School work, coding challenges, and everyday number play live comfortably below a trillion.
What is factorization used for in real life?
Simplifying fractions and radicals, finding least common denominators and greatest common divisors, scheduling problems (cycles that realign at the LCM), and — at enormous sizes — cryptography: multiplying two 300-digit primes is instant, factoring the product is beyond every known practical method, and that gap secures a large part of the internet.
Related calculators
Math Helpers
LiveThe everyday operations in one place: percentage of a number, powers, square and cube roots, factorials, and logarithms — each with its rule stated.
Least Common Denominator (LCD) Calculator
LiveThe least common denominator of two to six fractions, with each fraction rewritten over it — reduced first, so 2/4 and 1/6 need 6, not 12.
Fibonacci Calculator
LiveThe nth Fibonacci number in exact BigInt arithmetic — F(100) prints all 21 digits — plus the sequence from F(0).

