🔢 Factor Calculator
Enter any positive integer to instantly find all its factors, factor pairs, and prime factorization in exponent notation - with a step-by-step division walkthrough and a visual factor tree. The GCF/LCM tab calculates the Greatest Common Factor and Least Common Multiple for any two numbers.
🔢 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?
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.
if n % i === 0:
i is a factor
n/i is also a factor (its pair)
Example: n = 36, √36 = 6
Test: 1→36, 2→18, 3→12, 4→9, 6→6
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:
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
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
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
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
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.
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:
- Start with the number (e.g., 360)
- Divide by 2 (the smallest prime): 360 ÷ 2 = 180, 180 ÷ 2 = 90, 90 ÷ 2 = 45 → three 2s
- 2 no longer divides 45, try 3: 45 ÷ 3 = 15, 15 ÷ 3 = 5 → two 3s
- 3 no longer divides 5, try 5: 5 ÷ 5 = 1 → one 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.