# Free online prime factorization calculator

> Prime factorization breaks a number into a product of prime numbers. Enter any positive integer to see its factors, exponent form, and all divisors.

Find the prime factorization of any positive integer. Shows prime factors, exponent notation, number of divisors, and all divisors.

**Interactive version:** https://onlinecalculator.me/math/prime-factorization/
**Category:** Math

## How to use

1. Enter a positive integer in the input field.
2. Click **Factorize**.
3. See the prime factorization in exponent form, total divisors, and every divisor listed.

## How it works

The algorithm uses trial division:

1. Start with divisor d = 2.
2. While d² ≤ n, check if d divides n.
3. If yes, record d as a factor and replace n with n ÷ d.
4. If no, increment d.
5. If n > 1 after the loop, n itself is prime and is the last factor.

## Formula: number of divisors

For n = p₁^a₁ × p₂^a₂ × … × pₖ^aₖ:

**Number of divisors = (a₁ + 1)(a₂ + 1) … (aₖ + 1)**

## Worked example

**360 = 2³ × 3² × 5**

- Prime factors: 2, 2, 2, 3, 3, 5
- Exponent form: 2³ × 3² × 5¹
- Number of divisors: (3+1)(2+1)(1+1) = 4 × 3 × 2 = **24**
- All divisors: 1, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 18, 20, 24, 30, 36, 40, 45, 60, 72, 90, 120, 180, 360

## Frequently asked questions

### What is prime factorization?

Prime factorization expresses a number as a product of prime numbers. Every integer greater than 1 has a unique prime factorization — this is the Fundamental Theorem of Arithmetic. For example, 360 = 2³ × 3² × 5.

### How does the calculator find prime factors?

The algorithm divides the number by each prime starting at 2. When a prime divides evenly, it records that factor and continues with the quotient. This repeats until the quotient is 1.

### How is the number of divisors calculated?

If n = p₁^a × p₂^b × p₃^c …, then the number of divisors is (a+1)(b+1)(c+1)…. For 360 = 2³ × 3² × 5¹, divisors = (3+1)(2+1)(1+1) = 4×3×2 = 24.

### Is 1 a prime number?

No. 1 is neither prime nor composite. By convention, prime factorization starts at 2. The number 1 has no prime factors.

### What is the largest number this calculator handles?

The calculator handles numbers up to about 999,999,999. Larger numbers may be slow because trial division runs up to the square root of the input.

## Sources

- [Fundamental theorem of arithmetic](https://en.wikipedia.org/wiki/Fundamental_theorem_of_arithmetic) — Wikipedia
- [Prime Factorization](https://mathworld.wolfram.com/PrimeFactorization.html) — Wolfram MathWorld

## Related calculators

- [Leap year calculator](https://onlinecalculator.me/math/leap-year/) — Check if any year is a leap year.
- [Percentage calculator](https://onlinecalculator.me/math/percentage/) — Calculate percentages and percentage change.
- [Standard deviation calculator](https://onlinecalculator.me/math/standard-deviation/) — Mean, variance, and standard deviation for a data set.
- [GCD and LCM calculator](https://onlinecalculator.me/math/gcd-lcm/) — Find the greatest common divisor and least common multiple.

---

Part of [onlinecalculator.me](https://onlinecalculator.me/) — free calculators that run entirely in your browser.
Machine-readable index: https://onlinecalculator.me/llms.txt
