How to use the factor calculator
Type a whole number and press Find factors. The result card shows the prime factorization, how many positive factors the number has, their sum, and whether the number is prime or perfect. The details card below lists every positive factor and all factor pairs.
You can enter any whole number from −1,000,000,000,000,000 to 1,000,000,000,000,000 (10^15). Commas as thousands separators are fine; decimals are not.
What is a factor?
A factor (or divisor) of a number divides it exactly, with no remainder. A factor pair is two factors that multiply to the number, such as 3 × 12 = 36. Every number greater than 1 has at least the pair 1 × n.
The method
The calculator first finds the prime factorization by trial division: it divides by 2, then 3, then candidates of the form 6k ± 1, until the remaining part has no divisor up to its square root. Every factor is then a product of those primes, with each exponent between zero and its value in the factorization.
From n = p₁^a × p₂^b × …:
- Number of factors = (a + 1) × (b + 1) × …
- Sum of factors = (p₁^(a+1) − 1) ÷ (p₁ − 1) × (p₂^(b+1) − 1) ÷ (p₂ − 1) × …
Worked example: 36
- Prime factorization: 36 = 2² × 3²
- Number of factors: (2 + 1) × (2 + 1) = 9
- Factors: 1, 2, 3, 4, 6, 9, 12, 18, 36
- Factor pairs: 1 × 36, 2 × 18, 3 × 12, 4 × 9, 6 × 6
- Sum of factors: (2³ − 1) ÷ 1 × (3³ − 1) ÷ 2 = 7 × 13 = 91
Because 36 is a perfect square, its middle pair is 6 × 6 and it has an odd number of factors.
Prime, perfect, abundant and deficient
- A prime number has exactly two factors, 1 and itself. The number 1 is neither prime nor composite.
- The proper factors are all factors except the number itself. If they add up to exactly the number, it is perfect: 6 = 1 + 2 + 3 and 28 = 1 + 2 + 4 + 7 + 14.
- If they add up to more, the number is abundant (36: 91 − 36 = 55, which is more than 36). If less, it is deficient (every prime is deficient).
Good to know
- Zero has infinitely many factors, because every non-zero whole number divides 0, so no list is shown.
- For a negative number, the factors are the factors of its absolute value with either sign. The calculator lists the positive ones and writes the factorization with a −1 in front, for example −12 = −1 × 2² × 3.
- Below 10^15, a number can have up to 26,880 factors. All of them are listed; the pair table shows the first 1,000 pairs.
- Large primes take the longest to check, but even the biggest numbers allowed finish in well under a second in a modern browser.