Prime Factorization Calculator
Break any whole number up to one trillion into its prime factors, see whether it is prime, and list all of its divisors.
Result
Enter your values and select Calculate to see the result.
How to use this calculator
- Enter a whole number from 2 to 1,000,000,000,000.
- The result shows the factorization in exponent form, whether the number is prime, and how many divisors it has.
- Divisors are listed in pairs that multiply to your number.
Formula
The calculator uses trial division: it divides by 2 and 3, then by numbers of the form 6k ± 1, up to the square root of what remains. Whatever is left above 1 is itself prime.
If n = p₁^a × p₂^b × …, the number of divisors is (a + 1)(b + 1)….
Worked example
360
360 = 2 × 180 = 2 × 2 × 90 = … = 2³ × 3² × 5.
Number of divisors: (3 + 1)(2 + 1)(1 + 1) = 24.
97
No prime up to √97 ≈ 9.8 (2, 3, 5 or 7) divides 97, so 97 is prime.
Assumptions and limitations
- The upper limit of one trillion keeps the calculation instant in your browser.
- 1 is neither prime nor composite and is not accepted.
Frequently asked questions
Is 1 a prime number?
No. A prime has exactly two different divisors, 1 and itself. 1 has only one divisor.
Why is prime factorization useful?
It is used to simplify fractions, find the GCF and LCM, and it underpins modern encryption, which relies on how hard it is to factor very large numbers.