GCF and LCM Calculator – Greatest Common Factor and Least Common Multiple

Calculate the GCF (greatest common factor) and LCM (least common multiple) of any two or three numbers. Shows prime factorization method.

📊 Math📐 GCF = product of common prime factors | LCM = GCF × (a/GCF) × (b/GCF)
Number 1
Number 2
Number 3 (optional)
Please enter valid values.

Formula & Reference

VariableFormulaUnits
GCF and LCM Calculator – Greatest Common Factor and Least Common MultipleGCF = product of common prime factors | LCM = GCF × (a/GCF) × (b/GCF)GCF / LCM

Step-by-Step Examples

Example 1
GCF & LCM of 12 and 18

GCF = 6, LCM = 36.

  • 12 = 2²×3 | 18 = 2×3²
  • GCF = 2×3 = 6 | LCM = 2²×3² = 36
✓ GCF=6 / LCM=36
Example 2
Three Numbers: 4, 6, 10

GCF = 2, LCM = 60.

  • GCF(4,6,10) = 2 | LCM(4,6,10) = 60
✓ GCF=2 / LCM=60
Example 3
Coprime Numbers: 7 and 13

GCF = 1 (coprime), LCM = 91.

  • No common factors → GCF = 1 | LCM = 7×13 = 91
✓ GCF=1 / LCM=91

Real-World Applications

Common Mistakes to Avoid

⚠️
GCF vs LCM — mixing them up

GCF: largest number that divides both evenly. LCM: smallest number divisible by both. For fractions: use GCF to simplify, LCM to find common denominator.

⚠️
GCF of 1

If GCF = 1, the numbers are coprime (no common factors). Their LCM = their product.

Frequently Asked Questions

What is the GCF?
Greatest Common Factor — the largest number that divides evenly into all given numbers. GCF(12, 18) = 6 because 6 is the largest number dividing both.
What is the LCM?
Least Common Multiple — the smallest number that all given numbers divide into evenly. LCM(4, 6) = 12 because 12 is the smallest multiple of both 4 and 6.
When do you use LCM?
Adding/subtracting fractions (need common denominator). Scheduling problems (when two events next coincide). Converting units.

Related Calculators

Formula Explorer connections

Interpretation: This formula uses integer divisibility, modular arithmetic, finite fields or coding relationships. Assumption: Inputs are usually integers with specific modulus or coprimality requirements. Cryptographic examples are educational and not a substitute for vetted security libraries.

Hamming Distance Calculator →Luhn Algorithm Calculator →Modular Arithmetic Calculator →Math Formula Explorer →