What is a factor?
A factor of a whole number n is any whole number that divides n exactly, leaving no remainder. Because 12 ÷ 4 = 3 with nothing left, 4 is a factor of 12, and so is 3. Every positive integer has at least two factors, 1 and itself, and 1 is the only number with just one.
Factors, divisors and multiples
Factor and divisor mean the same thing. Multiples run the other way: 12 is a multiple of 4 because 4 × 3 = 12. If a is a factor of b, then b is a multiple of a.
Factor pairs
Factors always come in pairs whose product is the number. For 120, the pairs are 1 × 120, 2 × 60, 3 × 40, 4 × 30, 5 × 24, 6 × 20, 8 × 15 and 10 × 12. You only need to test divisors up to the square root of the number, because every factor above the square root pairs with one below it. When a number is a perfect square, such as 36, the middle pair repeats (6 × 6) and the total count of factors is odd.
Prime factorization
Primes are the building blocks: a prime has exactly two factors, 1 and itself. Every whole number greater than 1 can be written as a product of primes in exactly one way, apart from order. For 120 that product is 2 × 2 × 2 × 3 × 5, or 23 × 3 × 5.
Counting factors from the exponents
Once you have the prime factorization p1a × p2b × ..., the number of factors is a shortcut formula:
For 120 = 23 × 31 × 51 that is 4 × 2 × 2 = 16 factors. The sum of the factors can be found the same way: (1 + 2 + 4 + 8) × (1 + 3) × (1 + 5) = 15 × 4 × 6 = 360.
Worked example: factors of 60
| Divisor | Pair |
|---|---|
| 1 | 1 × 60 |
| 2 | 2 × 30 |
| 3 | 3 × 20 |
| 4 | 4 × 15 |
| 5 | 5 × 12 |
| 6 | 6 × 10 |
The square root of 60 is about 7.7, so we stop after 6 (7 does not divide 60). The twelve factors are 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30 and 60, and the prime factorization is 22 × 3 × 5.
Divisibility shortcuts
- 2: the last digit is even.
- 3: the digits add up to a multiple of 3.
- 5: the last digit is 0 or 5.
- 9: the digits add up to a multiple of 9.
- 10: the last digit is 0.
Large numbers
For big inputs the calculator uses exact BigInt arithmetic, tests small primes first, then applies a primality test and a splitting method to whatever is left. That lets it factor 18-digit numbers in a fraction of a second, which would be hopeless by trial division on paper.
Perfect, abundant and deficient numbers
Adding up the proper factors (all factors except the number itself) sorts every number into a category. If the total equals the number, it is perfect: 6 = 1 + 2 + 3 and 28 = 1 + 2 + 4 + 7 + 14. If the total is larger, the number is abundant (12 gives 16). If it is smaller, the number is deficient (every prime gives 1). The factor sum shown in the results lets you place any number in these categories at a glance by subtracting the number from the sum.
Tips for reading the output
- A prime shows exactly two factors and a single-node tree.
- Powers of a prime, such as 64 = 26, have a factor for each exponent from 0 to 6, so seven factors in all.
- Numbers with many small prime factors, like 720, have lots of factors, which is why such numbers are popular for calendars and measurement systems.