Prime Factorization Calculator
Break a whole number into its prime factors, test whether it is prime, and count and list its divisors.
Divide by 2 while even, then by each odd number up to the square root; whatever is left above 1 is itself prime.
How the prime factorization calculator works
Divide by 2 while even, then by each odd number up to the square root; whatever is left above 1 is itself prime. The number of divisors follows from the exponents: for 360 = 2³·3²·5, (3+1)(2+1)(1+1) = 24 divisors.
Formula: n = p₁^a₁ · p₂^a₂ · … ; divisors = Π(aᵢ + 1)
Worked examples
| Inputs | Prime factorization | Note |
|---|---|---|
| 360 | 2^3 × 3^2 × 5 | 2³ × 3² × 5, 24 divisors |
| 97 | 97 | prime |
| 1001 | 7 × 11 × 13 | 7 × 11 × 13 |
FAQFrequently asked questions
What is a prime number?
A whole number above 1 whose only divisors are 1 and itself: 2, 3, 5, 7, 11…
Is 1 a prime?
No — by convention, so that every number has a single prime factorization.
Why is prime factorization unique?
The fundamental theorem of arithmetic: every whole number above 1 is a product of primes in exactly one way (ignoring order).
How large a number can this factor?
Up to 10¹², by trial division up to the square root — a million steps at most.
What are factors used for?
Simplifying fractions, finding GCD and LCM, and in cryptography, where factoring huge numbers is deliberately hard.
Where these figures come from
- NIST Digital Library of Mathematical Functions — reference definitions for elementary and special functions
- Wolfram MathWorld — definitions and formulas for every topic on this page
- NIST/SEMATECH e-Handbook of Statistical Methods — the statistical formulas (mean, variance, z, confidence intervals, sample size)
- Common Core State Standards — Mathematics — the terms and methods taught in US schools
Last checked: September 2026. Formulas are fixed by mathematics and do not change with tax years or regulations.