GCF and LCM Calculator with Steps
Calculate Greatest Common Factor and Least Common Multiple for up to 6 numbers. Features visual Prime Factorization Trees to show work.
About
The Greatest Common Factor (GCF) and Least Common Multiple (LCM) are fundamental concepts in arithmetic, essential for simplifying fractions and solving scheduling problems. The GCF is the largest integer that divides all numbers in a set without leaving a remainder. The LCM is the smallest integer that is a multiple of all numbers in the set.
Students often struggle to see the connection between the raw numbers and the result. This tool solves that by generating a Prime Factorization Tree for every input. By breaking numbers down into their atomic prime components (e.g., 12 = 2 × 2 × 3), the shared factors become visually obvious.
Formulas
The relationship between GCF and LCM for two numbers a and b is:
GCF is typically found using the Euclidean Algorithm:
GCF(a, b) = GCF(b, a mod b)
Reference Data
| Numbers (a, b) | GCF (a,b) | LCM (a,b) |
|---|---|---|
| 8, 12 | 4 | 24 |
| 9, 15 | 3 | 45 |
| 12, 18 | 6 | 36 |
| 24, 36 | 12 | 72 |
| 18, 30 | 6 | 90 |
| 25, 30 | 5 | 150 |
| 20, 50 | 10 | 100 |
| 42, 56 | 14 | 168 |