๐ Prime Factorization Calculator
Enter a whole number to check whether it's prime and see its full prime factorization. Uses trial division, so very large numbers (beyond about 10ยนยฒ) may be slow or refused.
Trial division, stopping at the square root
The number is divided by 2, then by every odd number in turn, and each divisor that goes in evenly is pulled out repeatedly before moving on:
while d × d ≤ remaining:
while remaining mod d = 0: record d, remaining = remaining / d
d = next odd number
if remaining > 1: remaining is itself prime, record it
The default 360 loses three 2s to leave 45, then two 3s to leave 5. At that point 5 × 5 is already past 5, so the loop ends and the leftover 5 is recorded as prime: 2³ × 3² × 5. The card shows six factors counted with repetition and three distinct ones.
Reading the result, and the size limit
- The square root is the natural stopping point. Any larger factor must pair with a smaller one the loop already found.
- Exponent form gives you the divisor count. Add one to each exponent and multiply: 360 has (3+1)(2+1)(1+1) = 24 divisors.
- Digits only. A minus sign or decimal point is rejected rather than trimmed, and 0 is refused.
- 1 is neither prime nor composite, and the page says so rather than forcing it into one camp.
Frequently asked questions
What is the prime factorization of 360?
2^3 x 3^2 x 5, or 2 x 2 x 2 x 3 x 3 x 5 written out. That is six prime factors drawn from three distinct primes.
Is 1 a prime number?
No, and it is not composite either. A prime has exactly two distinct divisors, 1 and itself, and 1 only has one.
How many divisors does 360 have?
24. Take the exponents in 2^3 x 3^2 x 5, add one to each to get 4, 3 and 2, then multiply those together.