About the Prime Factorization Calculator
What is the Prime Factorization Calculator?
Every whole number greater than 1 is either a prime (divisible only by 1 and itself) or can be written as a product of primes in exactly one way — the Fundamental Theorem of Arithmetic. That product is its prime factorisation, for example 360 = 2³ × 3² × 5.
The calculator divides out 2 and then each odd number up to the square root of what remains (trial division), collecting every prime factor with its power. It also reports whether the number itself is prime, how many distinct primes it contains and its total number of divisors.
How to use the Prime Factorization Calculator
- Whole Number (2 to 10¹²) — a whole number from 2 up to 1,000,000,000,000. (sample: 360)
- Press Factorise (results also refresh as you type). The result card shows the Prime Factorisation, along with Is it prime?, Distinct prime factors and Total number of divisors.
Formula used
n = p₁^a₁ × p₂^a₂ × … × pₖ^aₖ
- pᵢ = the distinct prime factors
- aᵢ = how many times each prime divides n
- Number of divisors = (a₁ + 1) × (a₂ + 1) × … × (aₖ + 1)
Only divisors up to √n need to be tested: if n has no factor up to its square root, it must be prime.
Worked example
These are the sample values already filled in the calculator above, and the result it returns for them:
| Input | Sample value |
|---|---|
| Whole Number (2 to 10¹²) | 360 |
| Result | Value |
|---|---|
| Prime Factorisation | 2³ × 3² × 5 |
| Is it prime? | No, composite |
| Distinct prime factors | 3 |
| Total number of divisors | 24 |
Tips for using the Prime Factorization Calculator
- Prime factorisation makes HCF and LCM easy: take the lowest powers of shared primes for the HCF and the highest powers of all primes for the LCM.
- A number is a perfect square exactly when every exponent in its factorisation is even, and a perfect cube when every exponent is a multiple of 3.
- 1 is neither prime nor composite, so it has no prime factorisation.
