# Prime Factorization Calculator

> Break any whole number up to 10¹⁵ into its prime factors with exponents, test whether it is prime, and count its divisors.

Category: Mathematics · Applies to: Worldwide · Last updated: 2026-10-29
Interactive calculator: https://calculators.geekmidst.com/calculators/prime-factorization-calculator

Every whole number above 1 is a product of primes in exactly one way, ignoring order. This calculator finds those primes by trial division.

Also called: Prime factor calculator, Prime number checker.

## Inputs
- Whole number (default 360)

## Results
- Prime factorisation
- Written with ^
- Prime?
- Distinct prime factors
- Prime factors counted with repeats
- Number of divisors

## Formula

```
Divide by 2, 3 and then 6k ± 1 up to √n while each divides evenly; whatever remains above 1 is prime
```

Where:
- n: the number to factor

## Worked example
1. 360 ÷ 2 = 180, ÷ 2 = 90, ÷ 2 = 45: three 2s.
2. 45 ÷ 3 = 15, ÷ 3 = 5: two 3s.
3. 5 is prime, so 360 = 2³ × 3² × 5, with (3 + 1)(2 + 1)(1 + 1) = 24 divisors.

**Result:** 360 = 2³ × 3² × 5.

## What the result means

The factorisation gives the GCF (shared primes at their lowest powers), the LCM (all primes at their highest powers) and the number of divisors.

## Assumptions and limits
- Whole numbers from 2 to 10¹⁵, which the browser handles exactly.
- Larger numbers need specialised algorithms; trial division up to 10¹⁵ can take a moment for a large prime.

## Questions

### Why is the factorisation unique?

This is the fundamental theorem of arithmetic: apart from the order of the factors, there is only one way to write a number as a product of primes.

### How do I use it to simplify a square root?

Pair up equal primes: 360 = 2² × 3² × 10, so √360 = 2 × 3 × √10 = 6√10.

## Related calculators
- [Factor Calculator](https://calculators.geekmidst.com/calculators/factor-calculator)
- [Least Common Multiple Calculator](https://calculators.geekmidst.com/calculators/least-common-multiple-calculator)
- [Greatest Common Factor Calculator](https://calculators.geekmidst.com/calculators/greatest-common-factor-calculator)
- [Root Calculator](https://calculators.geekmidst.com/calculators/root-calculator)

Source: GM¹X CalcVerse — https://calculators.geekmidst.com/calculators/prime-factorization-calculator
