Factor calculator: all factors of a number

Factor calculator: every factor and factor pair of a whole number up to 10¹⁸, its prime factorization, divisor count and sum, and perfect or abundant.

Drafted with AI writing toolsUpdated Checked examples: 10

Up to 10¹⁸. Expressions work too, such as 2^40 or 10^15.
Try
Factors
1, 2, 3, 4, 6, 8, 12, 16, 24, 48
Factors: 1, 2, 3, 4, 6, 8, 12, 16, 24, 48
Number of factors
10
Factor pairs
1 × 48, 2 × 24, 3 × 16, 4 × 12, 6 × 8
Prime factorization
2⁴ × 3
Sum of all factors σ(n)
124
Sum of proper factors
76
Perfect, abundant or deficient
Abundant: the proper factors add up to 76, more than 48
Prime or composite
Composite

48 = 2⁴ × 3 has 10 factors adding up to 124. Without 48 itself they add up to 76, so 48 is abundant.

Factor rainbow: each arc joins a factor pair

12346812162448

Proper factors compared with the number

The number48Proper factor sum76
Factor pairs Rows: 5
Factor dPartner n ÷ dd is
148unit
224prime
316prime
412composite
68composite
How it's calculated S
  1. Prime factorization

    48=24×348 = 2^{4} \times 3

    Trial division by primes below 10,000, then Pollard's rho method for any large cofactor.

  2. Count the factors

    d(48)=(4+1)(1+1)=10d(48) = (4 + 1)(1 + 1) = 10

    Each factor chooses an exponent from 0 up to the exponent shown for each prime in the factorization.

  3. Sum of the factors

    σ(48)=25−12−1×32−13−1=124\sigma(48) = \frac{2^{5} - 1}{2 - 1} \times \frac{3^{2} - 1}{3 - 1} = 124
  4. Pair the factors

    1×48, 2×24, 3×16, 4×12, 6×81 \times 48,\ 2 \times 24,\ 3 \times 16,\ 4 \times 12,\ 6 \times 8

    Only divisors up to √48 ≈ 6 need testing; each one brings its partner.

  5. Perfect, abundant or deficient

    s(n)=σ(n)−n=124−48=76>48s(n) = \sigma(n) - n = 124 - 48 = 76 > 48

About the factor calculator

A factor of n is a whole number that divides n with no remainder, and factors come in pairs d × (n ÷ d). The calculator finds the prime factorization first, by trial division and Pollard's rho method, and builds every factor from it: a factor of 48 = 2⁴ × 3 uses 0 to 4 twos and 0 or 1 three, which gives (4 + 1)(1 + 1) = 10 factors.

The same factorization gives the sum of the factors. Subtracting n leaves the sum of the proper factors, which decides the class that goes back to Euclid and Nicomachus: perfect when it equals n (28 = 1 + 2 + 4 + 7 + 14), abundant when it is larger (48 has 76) and deficient when it is smaller, as every prime is.

Numbers up to 10¹⁸ are accepted and factored in a fraction of a second. Up to 5,000 factors are listed in full; beyond that only their count and sum are given. For a negative number the factors come in ± pairs.

How to find all the factors of a number

Test each whole number from 1 up to the square root; every divisor d you find brings its partner n ÷ d. For 60, √60 ≈ 7.75, and 1, 2, 3, 4, 5 and 6 divide it, giving the pairs 1 × 60, 2 × 30, 3 × 20, 4 × 15, 5 × 12 and 6 × 10. So 60 has 12 factors.

Listed in order, they are 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30 and 60. A factor divides the number with no remainder: 7 is not a factor of 60, because 60 ÷ 7 leaves 4.

Factors of common numbers

  • 15: 1, 3, 5, 15
  • 18: 1, 2, 3, 6, 9, 18
  • 20: 1, 2, 4, 5, 10, 20
  • 30: 1, 2, 3, 5, 6, 10, 15, 30
  • 32: 1, 2, 4, 8, 16, 32
  • 42: 1, 2, 3, 6, 7, 14, 21, 42
  • 45: 1, 3, 5, 9, 15, 45
  • 50: 1, 2, 5, 10, 25, 50
  • 54: 1, 2, 3, 6, 9, 18, 27, 54
  • 64: 1, 2, 4, 8, 16, 32, 64
  • 72: 1, 2, 3, 4, 6, 8, 9, 12, 18, 24, 36, 72
  • 75: 1, 3, 5, 15, 25, 75
  • 84: 1, 2, 3, 4, 6, 7, 12, 14, 21, 28, 42, 84
  • 90: 1, 2, 3, 5, 6, 9, 10, 15, 18, 30, 45, 90
  • 96: 1, 2, 3, 4, 6, 8, 12, 16, 24, 32, 48, 96

Perfect, abundant and deficient numbers

The proper factors of a number are all its factors except the number itself. Comparing their sum with the number sorts it into one of three classes: perfect when the sum equals it, abundant when the sum is larger, and deficient when it is smaller.

Whole numberPositive factorsCountProper-factor sumClassification
1110Deficient
21, 221Deficient
61, 2, 3, 646Perfect
121, 2, 3, 4, 6, 12616Abundant
161, 2, 4, 8, 16515Deficient
241, 2, 3, 4, 6, 8, 12, 24836Abundant
281, 2, 4, 7, 14, 28628Perfect
361, 2, 3, 4, 6, 9, 12, 18, 36955Abundant
481, 2, 3, 4, 6, 8, 12, 16, 24, 481076Abundant
971, 9721Deficient
1001, 2, 4, 5, 10, 20, 25, 50, 1009117Abundant
3601, 2, 3, 4, 5, 6, 8, 9, 10, 12, 15, 18, 20, 24, 30, 36, 40, 45, 60, 72, 90, 120, 180, 36024810Abundant

Six is perfect because 1 + 2 + 3 = 6, and 28 is perfect because 1 + 2 + 4 + 7 + 14 = 28. Every prime is deficient, since its only proper factor is 1.

Factor pairs and perfect squares

Each factor pairs with another to make the number, so factors usually come in twos. A perfect square is the exception: in 36 = 1 × 36 = 2 × 18 = 3 × 12 = 4 × 9 = 6 × 6, the middle pair repeats 6, which is listed once.

That is why a perfect square has an odd number of factors, 9 for 36, while every other number has an even count.

Counting factors from the prime factorization

Write the number as a product of prime powers, add 1 to each exponent and multiply. 60 = 2² × 3 × 5 has (2 + 1)(1 + 1)(1 + 1) = 12 factors, because each factor uses 0 to 2 twos, 0 or 1 three and 0 or 1 five.

The same method shows 72 = 2³ × 3² has 4 × 3 = 12 factors and 64 = 2⁶ has 7. The prime factorization calculator gives the prime powers for larger numbers.

Prime numbers and the number 1

A prime number has exactly two factors, 1 and itself: 2, 3, 5, 7, 11, 13 and 97 are prime. A composite number has more than two, such as 91 = 7 × 13. The number 2 is the only even prime.

1 is not a prime number. It has only one factor, and counting it as prime would let every number have many prime factorizations, such as 6 = 2 × 3 = 1 × 2 × 3.

Negative numbers and zero

A negative number has the same factors as its absolute value, with both signs: the factors of −12 are ±1, ±2, ±3, ±4, ±6 and ±12. Its factor count, 6, refers to the positive factors.

Zero has no finite list of factors, because every nonzero whole number divides it.

Entering a number

  • Any whole number up to 10¹⁸ in size can be factored, including expressions such as 2^10.
  • Up to 5,000 factors are listed in full; beyond that, only the count and the sums are given.

For the factors two numbers share, use the GCD and LCM calculator, and to simplify a square root with the help of square factors, the square root calculator.

Worked examples

48 (default, Calculator Soup example)

Whole number
48
Factors
1, 2, 3, 4, 6, 8, 12, 16, 24, 48
Number of factors
10
Factor pairs
1 × 48, 2 × 24, 3 × 16, 4 × 12, 6 × 8
Prime factorization
2⁴ × 3
Sum of all factors σ(n)
124
Sum of proper factors
76
Perfect, abundant or deficient
Abundant: the proper factors add up to 76, more than 48
Prime or composite
Composite

Checked against: Calculator Soup factors calculator: the 10 factors of 48 are 1, 2, 3, 4, 6, 8, 12, 16, 24, 48

36, a perfect square (Calculator Soup example)

Whole number
36
Factors
1, 2, 3, 4, 6, 9, 12, 18, 36
Number of factors
9
Factor pairs
1 × 36, 2 × 18, 3 × 12, 4 × 9, 6 × 6
Sum of all factors σ(n)
91

Checked against: Calculator Soup factors calculator: factors of 36 are 1, 2, 3, 4, 6, 9, 12, 18, 36

120 (calculator.net factor tree)

Whole number
120
Prime factorization
2³ × 3 × 5
Number of factors
16
Sum of all factors σ(n)
360
Sum of proper factors
240

Checked against: calculator.net factor calculator: 120 = 2 × 2 × 2 × 3 × 5

28 is perfect

Whole number
28
Factors
1, 2, 4, 7, 14, 28
Sum of proper factors
28
Perfect, abundant or deficient
Perfect: the proper factors add up to exactly 28

Checked against: OEIS A000396 (perfect numbers: 6, 28, 496, 8128, …); 1 + 2 + 4 + 7 + 14 = 28

Questions

How do you find all the factors of a number?

Test each whole number from 1 up to the square root; every divisor d you find brings its partner n ÷ d. For 48 the square root is about 6.9, and 1, 2, 3, 4 and 6 divide it, giving the pairs 1 × 48, 2 × 24, 3 × 16, 4 × 12 and 6 × 8. That is 10 factors: 1, 2, 3, 4, 6, 8, 12, 16, 24 and 48. For large numbers, factor into primes first and combine them.

How do you count the factors of a number?

Write the prime factorization, add 1 to each exponent and multiply. 48 = 2⁴ × 3¹ has (4 + 1)(1 + 1) = 10 factors, and 10¹⁵ = 2¹⁵ × 5¹⁵ has 16 × 16 = 256. The count is odd only for perfect squares, because their square root pairs with itself: 36 has 9 factors, with 6 × 6 in the middle.

What is a perfect number?

A number equal to the sum of its proper factors, the factors other than itself. 6 = 1 + 2 + 3 and 28 = 1 + 2 + 4 + 7 + 14 are the first two; the next are 496, 8,128 and 33,550,336. Euclid showed that 2ᵖ⁻¹(2ᵖ − 1) is perfect whenever 2ᵖ − 1 is prime, and Euler proved every even perfect number has that form. Whether an odd perfect number exists is still unknown.

What are abundant and deficient numbers?

A number is abundant when its proper factors add up to more than it, and deficient when they add up to less. 12 is the smallest abundant number, since 1 + 2 + 3 + 4 + 6 = 16. Every prime is deficient, because its only proper factor is 1. Most small numbers are deficient; the smallest odd abundant number is 945, whose proper factors sum to 975.

What is the difference between factors and prime factors?

Factors are all the numbers that divide n; prime factors are the primes among them, and multiplying them with their repeats gives n. 48 has 10 factors but only two prime factors, 2 and 3, and its prime factorization is 2⁴ × 3. The prime factorization is unique, by the fundamental theorem of arithmetic, and every factor is a product of some of those primes.

About this calculator

n=∏pieid(n)=∏(ei+1)σ(n)=∏piei+1−1pi−1s(n)=σ(n)−nn = \prod p_i^{e_i} \quad d(n) = \prod (e_i + 1) \quad \sigma(n) = \prod \frac{p_i^{e_i+1} - 1}{p_i - 1} \quad s(n) = \sigma(n) - n

Sources

  1. Hardy & Wright, An Introduction to the Theory of Numbers, §16.7 (the divisor functions d(n) and σ(n)) and §16.8 (perfect numbers)
  2. OEIS A000396: Perfect numbers
  3. OEIS A005231: Odd abundant numbers
  4. Wolfram MathWorld: Abundant number

Checked against references

This calculator includes 10 worked examples with independently sourced answers. They run in the test suite, and you can run them here too.

Put this calculator on your site

Paste this where you want the calculator to appear. It is free to use, it stays in step with corrections made here, and the credit line below it links back so your readers can find the full version.

Height
Preview the embed

Keep the credit line. It is the only condition, and it is what keeps these calculators free.