Prime factorization calculator
Enter any whole number and instantly see its prime factorization — the unique
product of prime numbers that make it up, shown in exponent form like
360 = 2^3 × 3^2 × 5. It is useful for simplifying fractions, finding GCDs and
LCMs, and understanding the building blocks of a number.
How it works
The tool uses trial division, dividing out each prime factor completely before moving on:
start at d = 2
while d × d ≤ remaining:
while remaining is divisible by d: divide it out, count the power
move to the next d
if remaining > 1, it is itself a prime factor
Counting how many times each prime divides gives the exponent form. If nothing smaller than the number divides it, the number is reported as prime.
Example
Factorizing 360:
- 360 ÷ 2 = 180 ÷ 2 = 90 ÷ 2 = 45 → 2 appears 3 times
- 45 ÷ 3 = 15 ÷ 3 = 5 → 3 appears 2 times
- 5 is prime → 5 appears 1 time
- Result: 360 = 2³ × 3² × 5
| Number | Prime factorization |
|---|---|
| 12 | 2² × 3 |
| 100 | 2² × 5² |
| 360 | 2³ × 3² × 5 |
| 97 | 97 (prime) |
Everything runs locally in your browser, so your numbers never leave your device.