Prime Factorization Calculator
Enter any positive integer up to 1 trillion (10¹²) to find its unique prime factorization. You will see the canonical form (e.g. 360 = 2³ × 3² × 5), the divisor count, divisor sum, and an interactive factorization tree.
Limit: 2 to 10¹² (1,000,000,000,000).
Most factorized numbers
- 361 192 tested 11×
- 246 2 × 3 × 41 tested 6×
- 360 23 × 32 × 5 tested 5×
- 12 22 × 3 tested 2×
- 125 53 tested 1×
- 369 32 × 41 tested 1×
Click any of these numbers to see the full factorization.
About prime factorization
What is prime factorization?
The prime factorization of an integer n ≥ 2 is the unique way to write n as a product of prime numbers. By the Fundamental Theorem of Arithmetic, every integer ≥ 2 has exactly one such representation (up to the order of factors). For example, 360 = 2³ × 3² × 5.
How are the divisor count and sum computed?
If n = p₁^e₁ × p₂^e₂ × … × pₖ^eₖ, then the number of divisors is τ(n) = (e₁+1)(e₂+1)…(eₖ+1), and the sum of divisors is σ(n) = ∏ (1 + p + p² + … + p^e) for each prime power in the factorization. For 360 = 2³ × 3² × 5: τ(360) = 4 × 3 × 2 = 24 and σ(360) = 15 × 13 × 6 = 1 170.
Frequently asked questions
A prime factor of n is a prime number that divides n exactly (with zero remainder). Every composite number has at least one prime factor less than or equal to its square root.
The tool uses trial division: it tests divisibility by 2, 3, then by all numbers of the form 6k − 1 and 6k + 1 up to √n. Each time a divisor d is found, it divides n by d as many times as possible, recording the prime and its exponent.
A factorization tree shows how a number is repeatedly split into smaller factors until all leaves are prime. Each composite node is split into its smallest prime factor and the remaining quotient. Prime leaves are highlighted in green.
A positive integer n is a perfect square if and only if every prime in its factorization appears with an even exponent. For example, 36 = 2² × 3² is a perfect square; 18 = 2 × 3² is not.
Every divisor of n corresponds to choosing an exponent between 0 and eᵢ for each prime pᵢ in the factorization. The number of such choices is (e₁+1)(e₂+1)…(eₖ+1). For 360 = 2³ × 3² × 5, that gives 4 × 3 × 2 = 24 divisors.