📐 Math & Science

Prime Factorization Calculator

Break any number into its prime factors and list all its divisors.

  • 10²⁴upper input limit
  • 2,000divisors listed at most
  • 4number types detected
  • Exactbig-integer arithmetic

—

Prime factors—
Number of divisors—
Sum of divisors—
Type—

How to use the Prime Factorization Calculator

  1. 1

    Type a whole number

    Any number from 2 up to just below 10²⁴. Commas and spaces are ignored.

  2. 2

    Read the factorisation

    Exponent form (2³ × 3² × 5) with the fully expanded product underneath.

  3. 3

    Check the tiles

    Distinct primes, number of divisors, sum of divisors and the number type.

  4. 4

    Scroll the divisor list

    Every divisor in order, as long as there are at most 2,000 of them.

Features

Exponent form

Repeated primes are grouped with superscripts, as textbooks write them.

Fast for big numbers

Trial division for small factors, Miller–Rabin testing and Pollard’s rho for large ones.

Every divisor

Generated from the prime powers and sorted.

Sum of divisors

σ(n), worked out from the formula for each prime power.

Number type

Prime, perfect, abundant or deficient.

Private

Nothing you enter leaves the browser.

Who uses it — and for what

Students

Check HCF/LCM, surd simplification and factor-tree homework.

Programmers

Verify factoring code and Project-Euler-style answers.

Crypto learners

See why multiplying primes is easy but factoring is hard.

Teachers

Build quick divisor and perfect-number examples.

What is prime factorisation?

Every whole number greater than 1 is either prime or can be written as a product of primes in exactly one way (the Fundamental Theorem of Arithmetic). 360 = 2 × 2 × 2 × 3 × 3 × 5 = 2³ × 3² × 5. The calculator divides by 2, then 3, then each odd number up to the square root, collecting the factors; very large numbers (up to about 10¹⁸) are handled with big-integer arithmetic and Pollard’s rho method.

Divisors from the factorisation

Once you have n = p₁ᵃ × p₂ᵇ × …, the number of divisors is (a + 1)(b + 1)… — for 360 that is 4 × 3 × 2 = 24 divisors. The full list of divisors is shown below the results. Numbers whose proper divisors add up to the number itself (6, 28, 496) are called perfect; if the sum is larger the number is abundant, if smaller deficient. Prime factors are used to simplify fractions and roots, and to find GCD and LCM.

Every result is calculated in your browser the moment you type, so you can change a number and see the effect instantly — ideal for checking homework, worksheets and exam practice. Results are shown to a sensible number of decimal places; very large or tiny values switch to scientific notation.

Step-by-step: the ladder (division) method

Factorising 360 by hand, dividing by the smallest prime that works each time:

2 | 360
2 | 180
2 |  90
3 |  45
3 |  15
5 |   5
  |   1

Read down the left column: 360 = 2 × 2 × 2 × 3 × 3 × 5 = 2³ × 3² × 5, exactly the calculator’s answer. You only need to test primes up to the square root of what is left; once the remaining number is below the square of the next prime, it is itself prime.

Using the factorisation

  • Simplifying square roots: 720 = 2⁴ × 3² × 5, so √720 = 2² × 3 × √5 = 12√5. Pairs come out; singles stay inside.
  • Perfect squares and cubes: a number is a perfect square exactly when every exponent is even (4096 = 2¹² is both a square and a cube, since 12 is divisible by 2 and 3).
  • Counting divisors: add 1 to each exponent and multiply. 720: (4 + 1)(2 + 1)(1 + 1) = 30 divisors.
  • Divisibility shortcuts: 1001 = 7 × 11 × 13, which is why any three-digit number written twice (like 452452) is divisible by 7, 11 and 13.

Common mistakes

  • Stopping too early. 360 = 4 × 90 is a factorisation, but not a prime factorisation; keep going until every factor is prime.
  • Counting 1 as a prime. It is not, and it never appears in the factor list.
  • Numbers that look prime. 51 = 3 × 17, 91 = 7 × 13 and 1001 = 7 × 11 × 13 catch many students. Use the digit-sum test for 3 and simply try 7, 11 and 13.
  • Missing divisors when listing them. Work in pairs from both ends (1 × 360, 2 × 180, 3 × 120…) or trust the formula count to know when you are done.
  • Forgetting exponents when finding HCF or LCM. HCF takes the lowest power of shared primes; LCM the highest power of every prime — the LCM & GCD Calculator does this for several numbers at once.

Why factoring matters beyond school

Multiplying two large primes is quick, but recovering them from the product is extremely slow for numbers hundreds of digits long — the asymmetry that RSA encryption depends on. This page handles numbers below 10²⁴ comfortably; real RSA keys use numbers with around 600 digits or more, far beyond any browser. Factorisations also help with gear ratios (teeth counts that share no factors wear evenly), with scheduling repeating events, and with simplifying fractions. To test primality alone or list primes in a range, use the Prime Number Checker.

Worked examples

A 12-digit puzzle classic

600851475143 = 71 × 839 × 1471 × 6857, with 16 divisors. Finding its largest prime factor is a well-known beginner programming challenge; here it is instant.

The smallest odd abundant number

945 = 3³ × 5 × 7, 16 divisors, sum of divisors 1,920. The proper divisors add up to 975, which is more than 945, so the type tile reads Abundant. Every smaller odd number is deficient.

An 18-digit prime

999999999999999989 → the type is Prime and the divisor list is just 1 and itself. It is the largest prime below 10¹⁸, confirmed instantly by the Miller–Rabin test.

Perfect number 8128

8128 = 2⁶ × 127: 14 divisors summing to 16,256, exactly 2 × 8128, so it is Perfect. Note the pattern — 127 = 2⁷ − 1 is prime, like 31 in 496 = 2⁴ × 31.

Pro tips

  • A number with exactly three divisors is always the square of a prime, like 49 = 7².
  • If the divisor count is odd, the number is a perfect square.
  • Large numbers made of two big primes of similar size take the longest to factor — that is normal, not a freeze.

Glossary

Prime factor
A prime number that divides the given number exactly.
Composite number
A whole number above 1 with at least one divisor other than 1 and itself.
σ(n)
The sum of all divisors of n, including n itself.
Abundant number
A number whose proper divisors add up to more than the number, like 12 (1 + 2 + 3 + 4 + 6 = 16).

Frequently asked questions

What are the prime factors of 100?

2² × 5².

Is 1 a prime number?

No — primes have exactly two divisors, and 1 has only one.

How big a number can I factor?

Whole numbers up to 10^24 are accepted; up to about 18 digits usually factor in a moment, while larger ones can take longer if they have two big prime factors.

What is the largest number I can factor here?

Any whole number below 10²⁴ (24 digits). Most factor instantly; a product of two very large primes can take noticeably longer.

Why is the divisor list sometimes missing?

If a number has more than 2,000 divisors, the page shows the count instead of listing them all.

What do perfect, abundant and deficient mean?

Compare the sum of the proper divisors (all divisors except the number) with the number: equal is perfect, larger is abundant, smaller is deficient.

Found it useful? Share the Prime Factorization Calculator:

Last updated 2026-11-28 · Built by Vinayak Agarwal · Part of Math & Science (42 tools)