Factor Calculator — Prime Factorisation
Instantly find every prime factor of any positive integer up to 1,000,000. The calculator shows the full prime factorisation (e.g., 360 = 2³ × 3² × 5), lists all divisors, counts them and sums them — all with a step-by-step breakdown.
Total count of positive integers that divide evenly into the number
Divide by 2, 3 times
Divide by 3, 2 times
Divide by 5
Final factorisation
- 1
Prime factorisation
360 = 2^3 × 3^2 × 5 - 2
Number of divisors: multiply (eᵢ+1) for each prime
(3+1) × (2+1) × (1+1) = 24Each exponent eᵢ contributes (eᵢ+1) choices — from 0 to eᵢ — for that prime factor.
How does this calculator work?
Every integer n > 1 factors uniquely into primes: n = p₁^e₁ × p₂^e₂ × …. The number of divisors = Π(eᵢ + 1); sum of divisors = Π[(pᵢ^(eᵢ+1) − 1)/(pᵢ − 1)]. Example: 360 = 2³ × 3² × 5 has (3+1)(2+1)(1+1) = 24 divisors summing to 1170. Trial division finds the factorisation in O(√n) steps.
Formula
How this is calculated
Every positive integer greater than 1 has a unique prime factorisation — the Fundamental Theorem of Arithmetic. The calculator uses trial division: it tries to divide the number by 2, then by each odd integer starting from 3, up to the square root of the remaining value. Whenever a trial divisor divides evenly, it is recorded as a prime factor and the quotient becomes the new number to factor. If the remaining value after this process is greater than 1, it is itself prime and is recorded as the final factor.
From the exponents in the factorisation, several important number-theoretic properties follow directly. The number of divisors (tau function, τ) equals the product of each exponent incremented by 1: for 360 = 2³ × 3² × 5¹, τ(360) = 4 × 3 × 2 = 24. The sum of divisors (sigma function, σ) equals the product of geometric series over each prime factor: for each prime pᵢ with exponent eᵢ, the factor is (pᵢ^(eᵢ+1) − 1) / (pᵢ − 1).
Prime factorisation is fundamental across mathematics: it is the basis of the GCD/LCM algorithms, RSA encryption (factoring large semi-primes is computationally hard), modular arithmetic and fraction simplification. Trial division is optimal for numbers up to roughly 10⁷; for very large numbers, more advanced algorithms (Pollard's rho, quadratic sieve) are used.
Frequently asked questions
Every integer greater than 1 can be represented as a product of prime numbers in exactly one way (ignoring the order of factors). This uniqueness is why prime factorisation is so powerful — it is the "atomic decomposition" of every integer.
GCD: take each prime to the minimum exponent appearing in both factorisations. LCM: take each prime to the maximum exponent. For 12 = 2² × 3 and 18 = 2 × 3²: GCD = 2¹ × 3¹ = 6; LCM = 2² × 3² = 36.
Trial division to the square root of n runs in O(√n) steps. At n = 1,000,000 this is 1,000 steps — instant. At n = 10⁹ it would be 31,623 steps (still fast), but listing all divisors can produce thousands of entries, making the UI unwieldy. The 1 million limit keeps the result display practical.
Also known as
TG we-Calculate Editorial Team. (2026). Factor Calculator — Prime Factorisation [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/factor-calculator
TG we-Calculate Editorial Team. "Factor Calculator — Prime Factorisation." TG we-Calculate. 2026. https://we-calculate.com/calculator/factor-calculator.
TG we-Calculate Editorial Team, "Factor Calculator — Prime Factorisation," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/factor-calculator
@misc{wecalculate_factor_calculator, title = {Factor Calculator — Prime Factorisation}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/factor-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
