Home › Math › Prime Factorization Calculator
Math

Prime Factorization Calculator

Enter a whole number and see it broken into prime factors with exponents — plus its full divisor list, how many divisors it has and what they add to, each figure derived from the factorization in the open.

Free · No sign-up · Runs in your browser · First published 2026-10-21 · Updated October 2026

Whole numbers from 2 up to 1,000,000,000,000 (one trillion). The calculator divides out the smallest prime factor again and again — the ladder in the explanation below — so the working is a method you can copy by hand, not a black box. Everything is worked out on your own device.

Prime factorization
—

Every whole number is a product of primes, in exactly one way

Primes are the atoms of whole numbers. A prime — 2, 3, 5, 7, 11 and so on — cannot be split into smaller whole-number factors, but every other whole number can, and the fundamental theorem of arithmetic promises the split is unique: no matter who does the dividing, or in what order they spot the factors, a number always ends up as the same multiset of primes. 360 is always 2 × 2 × 2 × 3 × 3 × 5, never anything else. That uniqueness is why factorization matters far beyond the classroom: it is the engine inside the LCM and GCF calculator (shared primes make the GCF, the full union makes the LCM), it is how fractions are simplified to lowest terms, and — at sizes no hand calculator could touch — the difficulty of undoing it for enormous numbers is what modern encryption rests on. This page does the honest hand-sized version: it divides out the smallest prime factor again and again, groups the result into exponents, and then derives everything else on the page — the divisor list, the divisor count, the sum of the divisors — from that one factorization, in the open.

The method and the formulas, with every term defined

Division ladder: divide the number by the smallest prime that divides it, repeat on the answer, stop at 1 — the divisors you used are the prime factors
With exponents: group repeated primes — 360 = 2^3 × 3^2 × 5 means 2×2×2, then 3×3, then 5
Number of divisors: multiply (each exponent + 1) together — for 360: (3+1) × (2+1) × (1+1) = 24
Sum of divisors: for each prime, add 1 + p + p^2 + … up to its exponent, then multiply those sums — for 360: 15 × 13 × 6 = 1,170
Bar chart of divisor counts from the worked examples: 720 has 30 divisors, the worked example 360 has 24, 84 has 12, 1,024 has 11, 100 has 9 and 12 has 6
From the worked examples below, drawn as bars: the divisor count is built from the exponents in the factorization.

The vocabulary, pinned down. A factor (or divisor) of a number is a whole number that divides it exactly, leaving no remainder. A prime factor is a factor that is itself prime. The exponent counts how many times a prime appears: 2 appears three times in 360, so it is written 2^3, read "two cubed". A number with prime factors is composite; a number whose only factors are 1 and itself is prime; and 1 is neither — it is the empty product, which is exactly why this calculator asks for numbers from 2 upwards. The divisor-count formula works because a divisor of 360 is built by choosing how many 2s to include (none, one, two or three — 4 choices), how many 3s (3 choices) and whether to include the 5 (2 choices), and independent choices multiply: 4 × 3 × 2 = 24 divisors, every one of which is printed in the table so the formula can be checked against the list it predicts.

Worked example: factorizing 360

The ladder, one division at a time: 360 ÷ 2 = 180; 180 ÷ 2 = 90; 90 ÷ 2 = 45; 45 is odd, so the next prime takes over — 45 ÷ 3 = 15; 15 ÷ 3 = 5; and 5 ÷ 5 = 1, which is where the ladder stops. The divisors used, in order, are 2, 2, 2, 3, 3, 5, and grouping them gives the headline: 360 = 2^3 × 3^2 × 5. The check is the multiplication itself: 2^3 is 8, 3^2 is 9, and 8 × 9 × 5 = 360 exactly. From that single line, everything else on the page follows. The divisor count is (3+1) × (2+1) × (1+1) = 24, and the 24 divisors 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. Their sum, from the formula — (1+2+4+8) × (1+3+9) × (1+5) = 15 × 13 × 6 — is 1,170, which is also what adding the printed list gives. The chart near the top places 360 among its neighbours in the table below: a number's divisor count is not about its size, it is about the shape of its factorization.

More factorizations, from a prime to a power of two

NumberPrime factorizationDivisorsSum of divisors
360 — worked example2^3 × 3^2 × 5241,170
122^2 × 3628
842^2 × 3 × 712224
1002^2 × 5^29217
7202^4 × 3^2 × 5302,418
1,0242^10112,047
9797 (prime)298

Three rows teach most of the subject. The prime, 97, is the floor: exactly two divisors, 1 and itself, and a divisor sum just one more than the number. The pure power, 1,024 = 2^10, shows the exponent rule at its simplest — one prime, so the divisor count is just 10 + 1 = 11, and its divisors are the eleven powers of two from 1 to 1,024. And 100 quietly demonstrates the odd one out: a composite number with an odd divisor count, 9, because it is a perfect square — divisors normally pair up (2 with 50, 4 with 25), but a square's root, here 10, pairs with itself and stands alone. 720, double the worked example, gains a fourth 2 and jumps from 24 divisors to 30 — one more prime factor, multiplied through every count the factorization feeds.

How to read your result — and its limits

The large figure is the factorization with exponents; the expanded product underneath it is the same answer ungrouped, and the check row multiplies it back to your number — if that row does not show the number you entered, nothing else on the page can be right, and it always will. Four limits belong with the page. Whole numbers only, from 2: decimals and fractions have no prime factorization, negatives belong to a sign convention rather than a factorization, and 1 is the empty product — each gets an explanation at the input rather than a forced answer. The cap is one trillion: trial division tests primes up to the square root of what remains, which is instant at this size, but factorization gets genuinely hard as numbers grow — a product of two large primes near a trillion can take this simple method a moment, and numbers with hundreds of digits are, by design of modern cryptography, out of reach of any such page. A long divisor list is truncated in print only: past 240 divisors the table reports the count instead of printing thousands of entries, but the count and sum are still exact. And primality here is proven, not probable: because the ladder divides by every prime up to the square root, a number this page calls prime has been checked against every possible factor — there is no probability involved at these sizes.

Frequently asked questions

Is 1 a prime number?

No — and it is not composite either. A prime must have exactly two divisors, 1 and itself, but 1 has only one divisor: itself. The deeper reason is uniqueness: if 1 counted as prime, 360 could be written 2^3 × 3^2 × 5 × 1, or with five 1s, or fifty, and the 'exactly one factorization' promise would collapse. So 1 stands apart as the unit, and this calculator starts at 2.

Is 91 prime? It looks prime.

It is the classic trap: 91 = 7 × 13. Numbers ending in neither an even digit nor 5 escape the two easiest divisibility tests, and 91 slips past the test for 3 as well (9 + 1 = 10, not a multiple of 3) — which is why it fools people. The next test in the ladder, 7, catches it. Any number that survives division by every prime up to its square root — only up to 9 for 91 — is genuinely prime.

What is the difference between factors and prime factors?

Factors are every whole number that divides yours exactly: 360 has 24 of them, from 1 to 360. Prime factors are just the primes among the building blocks — 2, 3 and 5 for 360 — counted with repetition in the expanded product (2, 2, 2, 3, 3, 5). Every factor of a number is itself a product of a selection of its prime factors, which is why the prime list is the shorter, more useful answer.

How does the divisor count formula work?

A divisor is built by choosing, independently for each prime, how many copies to include: for 360 = 2^3 × 3^2 × 5 you may take 0–3 twos (4 choices), 0–2 threes (3 choices) and 0–1 fives (2 choices). Independent choices multiply, giving 4 × 3 × 2 = 24 divisors — and the table prints all 24, so you can count the list against the formula. It also explains why a prime has exactly 2: one prime with exponent 1 gives (1+1).

Why does this calculator stop at one trillion?

Because its method is honest trial division: testing candidate primes up to the square root of the number. At one trillion that root is one million, which a browser clears instantly for ordinary numbers — but the method's cost grows with the root, not the number, and well before research-scale sizes it stops being a calculator job at all. The same hardness, scaled up, is what makes very large semiprimes useful in encryption: multiplying two big primes is easy, undoing it is not.

Ahsan ul Haq
Editor, ToolFigure

Every ToolFigure calculator is checked against hand-worked examples before it is published — the same worked examples you can follow on each page. More about ToolFigure →

Related tools

Calculators that show their working

Free forever · No sign-up · Every result comes with its formula and a worked example.

Browse all tools