🔢 Find All Factors

Enter any positive integer to find all its factors.

Try:
-
-

Prime Factorization

Break any number into its prime building blocks.

Try:

⚖️ GCF & LCM Calculator

Find the Greatest Common Factor and Least Common Multiple of multiple numbers.

Factor Formulas & Theory

What is a Factor?

A factor of n is any integer that divides n exactly (no remainder).

n ÷ f = whole number f is a factor of n

Factors of 12: 1, 2, 3, 4, 6, 12
Because: 12÷1=12, 12÷2=6, 12÷3=4, 12÷4=3, 12÷6=2, 12÷12=1

Finding Factors Efficiently

Only test divisors up to √n. Each factor below √n pairs with one above.

For n, test i from 1 to √n:
if n % i === 0:
i is a factor
n/i is also a factor (its pair)

Example: n = 36, √36 = 6
Test: 136, 218, 312, 49, 66
Result: 1,2,3,4,6,9,12,18,36 (9 factors)

Number of Factors Formula

If n = p₁^a × p₂^b × p₃^c ... then:

Number of factors = (a+1)(b+1)(c+1)...

Example: 360 = 2³ × 3² × 5¹
Factors = (3+1)(2+1)(1+1) = 4×3×2 = 24 factors

Perfect squares always have an odd number of factors.

Sum of Factors Formula

If n = p₁^a × p₂^b then:
Sum = (p₁^(a+1) - 1)/(p₁-1) × (p₂^(b+1) - 1)/(p₂-1)

Example: 12 = 2² × 3¹
Sum = (2³-1)/(2-1) × (3²-1)/(3-1)
= 7/1 × 8/2 = 7 × 4 = 28
Verify: 1+2+3+4+6+12 = 28

Fundamental Theorem of Arithmetic

Every integer > 1 can be expressed as a UNIQUE
product of prime numbers (up to order).

60 = 2² × 3 × 5
This is the ONLY way to write 60 as prime product.
This is why prime factorization is so powerful!

GCF & LCM Relationship

For any two numbers a and b:
GCF(a,b) × LCM(a,b) = a × b

Example: a=12, b=18
GCF=6, LCM=36
6 × 36 = 216 = 12 × 18

This means: LCM = (a×b) / GCF

Frequently Asked Questions

A factor of a number n is any positive integer that divides n exactly with no remainder. For example, the factors of 24 are 1, 2, 3, 4, 6, 8, 12, and 24 - because each of these divides 24 evenly. Every number has at least two factors: 1 and itself. Numbers with exactly two factors are prime. The calculator above finds all factors instantly by testing divisors from 1 to √n, using the fact that factors always come in pairs.
Test every integer from 1 to √n. If a number divides n evenly, both that divisor AND the quotient are factors. Example for 36: √36 = 6, so test 1–6. 36÷1=36 (factors 1,36), 36÷2=18 (factors 2,18), 36÷3=12 (factors 3,12), 36÷4=9 (factors 4,9), 36÷5=7.2 (not a factor), 36÷6=6 (factor 6 - pairs with itself since 36 is a perfect square). Total: 1,2,3,4,6,9,12,18,36 - nine factors.
Prime factorization expresses any number as a product of prime numbers. Every integer greater than 1 has exactly one unique prime factorization - this is the Fundamental Theorem of Arithmetic. Method: repeatedly divide by the smallest prime that divides the number. Example: 60 → 60÷2=30 → 30÷2=15 → 15÷3=5 → 5÷5=1. Result: 60 = 2² × 3 × 5. The calculator performs this step by step and shows the result in exponent notation.
Factor pairs are two numbers that multiply together to give the original number. For 24: the pairs are (1,24), (2,12), (3,8), (4,6). Each pair multiplies to 24. The number of pairs = total number of factors ÷ 2 (or rounded up if the number is a perfect square, since the square root pairs with itself). Factor pairs are useful for problems like finding rectangle dimensions with a given area.
GCF (Greatest Common Factor) is the largest number that divides both a and b. LCM (Least Common Multiple) is the smallest number that both a and b divide into. Key relationship: GCF(a,b) × LCM(a,b) = a × b. Example: a=12, b=18. GCF = 6, LCM = 36. Check: 6 × 36 = 216 = 12 × 18 ✓. GCF is used for simplifying fractions; LCM is used for finding common denominators when adding fractions.
Normally factors come in pairs: if a divides n, then n÷a is a different factor. But for perfect squares, one pair has both numbers equal (√n × √n = n). This middle factor counts only once, making the total count odd. Example: 36 has factors 1,2,3,4,6,9,12,18,36 - nine factors (odd). The pairs are (1,36), (2,18), (3,12), (4,9), and the single middle factor 6. This is a reliable test: if a number has an odd count of factors, it must be a perfect square.
A perfect number equals the sum of all its proper divisors (factors excluding the number itself). 6 = 1+2+3. 28 = 1+2+4+7+14. 496 and 8,128 are the next two. Perfect numbers are extremely rare - only 51 are known as of 2025, all of them even. It is unknown whether any odd perfect numbers exist. Even perfect numbers have the form 2^(p-1) × (2^p − 1), where both p and 2^p − 1 are prime.
Using prime factorization: if n = p₁^a × p₂^b × p₃^c, then total factors = (a+1) × (b+1) × (c+1). Example: 360 = 2³ × 3² × 5¹. Factors = (3+1)(2+1)(1+1) = 4×3×2 = 24 factors. For 60 = 2² × 3 × 5: (2+1)(1+1)(1+1) = 3×2×2 = 12 factors. This formula works because each prime can appear 0, 1, 2, up to its exponent in any divisor - giving (exponent+1) choices per prime, and multiplying choices gives total combinations.

Factor Calculator - Factors, Prime Factorization, GCF and LCM Explained

Finding factors is one of the most fundamental operations in number theory and everyday arithmetic. From simplifying fractions to finding least common denominators, from solving algebraic equations to understanding divisibility - factors underpin a huge range of mathematical tasks. This calculator handles all of it: every factor of any number, the prime factorization, factor pairs, GCF, and LCM, with full step-by-step workings.

Quick example - factors of 60: 1, 2, 3, 4, 5, 6, 10, 12, 15, 20, 30, 60 - 12 factors total. Prime factorization: 60 = 2² × 3 × 5. Factor pairs: (1,60), (2,30), (3,20), (4,15), (5,12), (6,10). Note: 60 has more factors than almost any number of its size - which is why 60 minutes in an hour and 360 degrees in a circle are so convenient to divide.

How to Find All Factors of a Number - The Efficient Method

The key insight that makes factor-finding efficient: factors always come in pairs. If a divides n, then n ÷ a also divides n - giving you two factors from every divisor you find. This means you only need to test integers from 1 to √n, halving the work.

For n = 36: √36 = 6, so test 1 through 6:

  • 36 ÷ 1 = 36 factors: 1 and 36
  • 36 ÷ 2 = 18 factors: 2 and 18
  • 36 ÷ 3 = 12 factors: 3 and 12
  • 36 ÷ 4 = 9 factors: 4 and 9
  • 36 ÷ 5 = 7.2 not a factor
  • 36 ÷ 6 = 6 factor: 6 (pairs with itself - 36 is a perfect square)

Complete factor list: 1, 2, 3, 4, 6, 9, 12, 18, 36. Total: 9 factors (odd, because 36 is a perfect square - the pair 6×6 contributes only one unique factor).

Prime Factorization - Step by Step

Prime factorization breaks any composite number down into its prime "building blocks." Every positive integer greater than 1 has exactly one unique prime factorization - this is the Fundamental Theorem of Arithmetic.

Method - repeated division by the smallest prime that divides the number:

  1. Start with the number (e.g., 360)
  2. Divide by 2 (the smallest prime): 360 ÷ 2 = 180, 180 ÷ 2 = 90, 90 ÷ 2 = 45 three 2s
  3. 2 no longer divides 45, try 3: 45 ÷ 3 = 15, 15 ÷ 3 = 5 two 3s
  4. 3 no longer divides 5, try 5: 5 ÷ 5 = 1 one 5
  5. Result: 360 = 2³ × 3² × 5

The exponent notation (2³ × 3² × 5) is compact and directly tells you how many times each prime appears as a factor.

GCF and LCM - What They Are and How to Find Them

GCF - Greatest Common Factor

  • The largest number that divides both a and b with no remainder
  • Also called HCF (Highest Common Factor) or GCD (Greatest Common Divisor)
  • Method: list all factors of each number, find the largest common one
  • Using prime factorization: take the lowest power of each shared prime
  • Example: GCF(24, 36) = ? Factors of 24 = 1,2,3,4,6,8,12,24. Factors of 36 = 1,2,3,4,6,9,12,18,36. Largest common = 12
  • Used for: simplifying fractions, dividing objects into equal groups

LCM - Least Common Multiple

  • The smallest positive integer divisible by both a and b
  • Using the key relationship: LCM(a,b) = (a × b) ÷ GCF(a,b)
  • Using prime factorization: take the highest power of each prime present
  • Example: LCM(4, 6) = ? 4 = 2², 6 = 2 × 3. LCM = 2² × 3 = 12
  • Used for: adding fractions with different denominators, scheduling repeating events
  • GCF × LCM = a × b (always true for any two positive integers)

Special Number Properties - Prime, Perfect Square, and Perfect Numbers

Factoring reveals interesting properties about numbers:

  • Prime numbers have exactly two factors: 1 and themselves. Examples: 2, 3, 5, 7, 11, 13, 17, 19, 23. The only even prime is 2. There are infinitely many primes.
  • Perfect squares have an odd number of total factors because their square root pairs with itself. 36 has 9 factors, 100 has 9 factors, 144 has 15 factors.
  • Perfect numbers equal the sum of all their proper factors (all factors except themselves). 6 = 1+2+3. 28 = 1+2+4+7+14. Only a handful of perfect numbers are known - they are extremely rare.
  • Highly composite numbers have more factors than any smaller positive integer. 12 has 6 factors (more than any number below it). 60 has 12 factors - which is why 60 seconds, 60 minutes, and 360° are all so divisible: 60 is evenly divisible by 1,2,3,4,5,6,10,12,15,20,30, and 60.

Number of Factors Formula - Using Prime Factorization

If n = p₁^a × p₂^b × p₃^c..., then the total number of factors = (a+1) × (b+1) × (c+1)... This lets you count factors without listing them all.

Example: 360 = 2³ × 3² × 5¹. Number of factors = (3+1) × (2+1) × (1+1) = 4 × 3 × 2 = 24 factors. For 60 = 2² × 3 × 5: (2+1) × (1+1) × (1+1) = 3 × 2 × 2 = 12 factors. This formula is a powerful shortcut for competition math and number theory problems.

How this calculator works, and where the numbers come from

The Factor Calculator applies the standard formula for this calculation to the values you enter and updates the result as you type. The calculation itself happens in your browser, and the page explains the method so you can check any result by hand.

Please note: Results are provided for general information and are calculated from the values you enter.

Sources and further reading

Last reviewed: by the CalcQube Editorial Team. See our editorial policy for how we build and check calculators, or report an error.