Reviewed by CalcMulti Editorial Team·Last updated: ·← Algebra Hub
The Greatest Common Factor (GCF) — also called the Greatest Common Divisor (GCD) or Highest Common Factor (HCF) — is the largest positive integer that divides all the given numbers without a remainder. The Least Common Multiple (LCM) is the smallest positive integer that is divisible by all the given numbers.
This calculator finds the GCF and LCM of 2 or 3 integers using both prime factorization and the Euclidean algorithm. Each step of the working is shown so you can learn the method and reproduce it by hand.
GCF and LCM are connected by the formula: GCF(a, b) × LCM(a, b) = a × b. This means once you find the GCF, you can compute LCM = (a × b) / GCF without a separate calculation. For three numbers, find GCF(GCF(a, b), c) and LCM(LCM(a, b), c) by applying the pairwise formula twice.
Real-world uses: GCF simplifies fractions to lowest terms (divide numerator and denominator by GCF). LCM finds the common denominator when adding or subtracting fractions. GCF also solves tiling problems (largest square tile that fits a rectangle) and scheduling problems (next time two repeating events coincide). Both operations are foundational in number theory and form the basis of the Euclidean algorithm, one of the oldest algorithms in mathematics.
GCF(a,b) × LCM(a,b) = a × b | Euclidean: GCF(a,b) = GCF(b, a mod b)
Enter 2 or 3 positive integers.
| a | b | GCF(a,b) | LCM(a,b) | GCF × LCM | a × b |
|---|---|---|---|---|---|
| 12 | 18 | 6 | 36 | 216 | 216 |
| 24 | 36 | 12 | 72 | 864 | 864 |
| 15 | 25 | 5 | 75 | 375 | 375 |
| 8 | 12 | 4 | 24 | 96 | 96 |
| 100 | 75 | 25 | 300 | 7500 | 7500 |
| 60 | 84 | 12 | 420 | 5040 | 5040 |
| 45 | 30 | 15 | 90 | 1350 | 1350 |
| 14 | 21 | 7 | 42 | 294 | 294 |
This calculator is for educational purposes only and does not constitute professional advice. Results are based on standard mathematical formulas. Always verify critical calculations with a qualified professional before making important decisions.