How to use this calculator
- Enter or choose whole number.
- The prime factorisation updates as you type. Use Copy result or Share to keep it.
Method
Divide by 2, 3 and then 6k ± 1 up to √n while each divides evenly; whatever remains above 1 is prime
- n
- the number to factor
Worked example
- 360 ÷ 2 = 180, ÷ 2 = 90, ÷ 2 = 45: three 2s.
- 45 ÷ 3 = 15, ÷ 3 = 5: two 3s.
- 5 is prime, so 360 = 2³ × 3² × 5, with (3 + 1)(2 + 1)(1 + 1) = 24 divisors.
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.