LCM & GCF Calculator & Solver
Calculate the Least Common Multiple (LCM) and Greatest Common Factor (GCF / HCF / GCD) of two or three numbers with full step-by-step prime factorization and Euclidean division.
Comprehensive Guide & Practice
Master the mathematical principles, formulas, and step-by-step methods with worked examples and FAQs.
1. Understanding GCF and LCM: Core Definitions
Greatest Common Factor (GCF / GCD / HCF)
The largest positive whole number that divides all input numbers without leaving any remainder. Essential for simplifying fractions and factoring algebraic polynomials.
2. The Fundamental Relationship Formula
For any two positive whole numbers a and b, the product of their GCF and LCM is strictly equal to the product of the numbers themselves:
Therefore: LCM(a, b) = (a × b) / GCF(a, b)
3. How to Find GCF and LCM Using Prime Factorization
Let's calculate the GCF and LCM of 24 and 36 using the prime factor tree method:
- Prime factor of 24:
24 = 2 × 2 × 2 × 3 = 2³ × 3¹ - Prime factor of 36:
36 = 2 × 2 × 3 × 3 = 2² × 3² - To find GCF: Take the lowest exponent of all shared prime bases:
GCF = 2min(3,2) × 3min(1,2) = 2² × 3¹ = 4 × 3 = 12 - To find LCM: Take the highest exponent of all prime bases present:
LCM = 2max(3,2) × 3max(1,2) = 2³ × 3² = 8 × 9 = 72
4. The Euclidean Algorithm for Instant GCF Division
When dealing with large numbers where prime factorization is slow, the Euclidean Algorithm provides an ancient, lightning-fast division shortcut:
GCD(a, b) = GCD(b, a mod b)Example for GCD(252, 105):
252 ÷ 105 = 2 remainder 42 → GCD(105, 42)
105 ÷ 42 = 2 remainder 21 → GCD(42, 21)
42 ÷ 21 = 2 remainder 0 → GCF is 21!
5. Common Number Pairs GCF & LCM Reference Table
| Numbers | GCF (Greatest Divisor) | LCM (Smallest Multiple) | Product (a × b) |
|---|---|---|---|
| 12 & 18 | 6 | 36 | 216 |
| 8 & 14 | 2 | 56 | 112 |
| 15 & 25 | 5 | 75 | 375 |
| 24 & 36 | 12 | 72 | 864 |
| 16 & 20 | 4 | 80 | 320 |
| 9 & 15 | 3 | 45 | 135 |
| 14 & 35 | 7 | 70 | 490 |
| 18 & 30 | 6 | 90 | 540 |
6. Real-World Applications
- Event Scheduling & Traffic Lights: If two bus routes arrive every 15 and 20 minutes respectively, they will arrive simultaneously every
LCM(15, 20) = 60 minutes. - Packaging & Inventory: Hot dogs come in packs of 10 and buns in packs of 8. To have zero leftover items, buy
LCM(10, 8) = 40(4 packs of dogs, 5 packs of buns). - Tiling a Room (GCF): To tile a rectangular room of 24 ft by 36 ft with identical square tiles with zero cuts, the largest possible tile size is
GCF(24, 36) = 12 ft × 12 ft.