GCF & LCM Calculator
Find the Greatest Common Factor and Least Common Multiple of any numbers with detailed step-by-step solutions and prime factorization.
Calculation Mode
Numbers detected: 12, 18
Relationship Between GCF and LCM
You May Also Like
What Are GCF and LCM?
GCF (Greatest Common Factor) is the largest number that divides evenly into two or more numbers. It's also called GCD (Greatest Common Divisor) or HCF (Highest Common Factor).
LCM (Least Common Multiple) is the smallest number that is a multiple of two or more numbers.
Real-Life Examples
GCF Example: Cutting Ribbons You have two ribbons: one is 12 inches long, the other is 18 inches. You want to cut them into equal pieces with no ribbon left over. The GCF of 12 and 18 is 6, so you can cut both ribbons into 6-inch pieces.
LCM Example: Scheduling Two buses leave the same station. Bus A leaves every 12 minutes, Bus B every 18 minutes. They both leave at 8:00 AM. When will they leave together again? The LCM of 12 and 18 is 36, so they'll both leave at 8:36 AM.
How to Find the GCF
Method 1: List All Factors
- List all factors of each number
- Find the common factors
- Choose the largest one
Example: GCF of 12 and 18
- Factors of 12: 1, 2, 3, 4, 6, 12
- Factors of 18: 1, 2, 3, 6, 9, 18
- Common factors: 1, 2, 3, 6
- GCF = 6
Method 2: Prime Factorization
- Find the prime factors of each number
- Identify common prime factors
- Multiply the common factors together
Example: GCF of 12 and 18
- 12 = 2 × 2 × 3
- 18 = 2 × 3 × 3
- Common: 2 × 3 = 6
Method 3: Euclidean Algorithm
This is the fastest method for large numbers:
- Divide the larger number by the smaller
- Replace the larger number with the remainder
- Repeat until the remainder is 0
- The last non-zero remainder is the GCF
Example: GCF of 48 and 18
- 48 ÷ 18 = 2 remainder 12
- 18 ÷ 12 = 1 remainder 6
- 12 ÷ 6 = 2 remainder 0
- GCF = 6
How to Find the LCM
Method 1: List Multiples
- List multiples of each number
- Find the smallest common multiple
Example: LCM of 4 and 6
- Multiples of 4: 4, 8, 12, 16, 20, 24...
- Multiples of 6: 6, 12, 18, 24...
- LCM = 12
Method 2: Prime Factorization
- Find the prime factors of each number
- Take the highest power of each prime
- Multiply them together
Example: LCM of 12 and 18
- 12 = 2² × 3
- 18 = 2 × 3²
- Take highest powers: 2² × 3² = 4 × 9 = 36
Method 3: Using GCF (Fastest!)
For two numbers a and b: LCM(a, b) = (a × b) ÷ GCF(a, b)
Example: LCM of 12 and 18
- GCF(12, 18) = 6
- LCM = (12 × 18) ÷ 6 = 216 ÷ 6 = 36
The GCF-LCM Relationship
For any two positive integers a and b:
GCF(a, b) × LCM(a, b) = a × b
This is a useful check: if 12 × 18 = 216, and 6 × 36 = 216, your answers are correct!
Common Uses
| Use Case | Which to Use |
|---|---|
| Simplifying fractions | GCF |
| Dividing things into equal groups | GCF |
| Adding/subtracting fractions | LCM (common denominator) |
| Scheduling recurring events | LCM |
| Finding when cycles align | LCM |
| Cutting/measuring equal lengths | GCF |
Practice Problems
-
GCF of 24 and 36: Factors of 24 are 1,2,3,4,6,8,12,24. Factors of 36 are 1,2,3,4,6,9,12,18,36. GCF = 12
-
LCM of 8 and 12: 8 = 2³, 12 = 2² × 3. LCM = 2³ × 3 = 24
-
Simplify 18/24: GCF(18,24) = 6. So 18/24 = 3/4
-
Add 1/6 + 1/8: LCM(6,8) = 24. So 1/6 + 1/8 = 4/24 + 3/24 = 7/24