Algebra 1 Basic

GCF & LCM Calculator

Find the Greatest Common Factor and Least Common Multiple of two or three numbers — with prime factorization steps and the Euclidean algorithm.

Prime factorization method
Euclidean algorithm
Live
Numbers
Shows prime factorization for GCF and LCM.
Results
Enter numbers above and click Calculate to see GCF & LCM.
Greatest Common Factor
Least Common Multiple
Step-by-Step Solution
GCF & LCM — Key Formulas
GCF(a, b) = product of shared prime factors (lowest exponent) LCM(a, b) = product of all prime factors (highest exponent) GCF(a, b) × LCM(a, b) = a × b

The Euclidean algorithm finds GCF efficiently by repeated division: GCF(a, b) = GCF(b, a mod b). Repeat until remainder = 0.

For three numbers: GCF(a, b, c) = GCF(GCF(a, b), c) and LCM(a, b, c) = LCM(LCM(a, b), c).

The Euclidean algorithm is the fastest method by hand — no factoring needed!
When to Use GCF vs LCM
  • GCF — simplifying fractions (divide numerator & denominator by GCF)
  • GCF — splitting into equal groups (largest group size)
  • GCF — factoring out the greatest common factor from an expression
  • LCM — adding or subtracting fractions (find common denominator)
  • LCM — scheduling repeating events (when do they next coincide?)
  • LCM — finding the smallest number divisible by both a and b
Remember: GCF ≤ min(a, b) and LCM ≥ max(a, b) — always check your answer!

Still have questions about GCF, LCM, or fractions?

Work through problems one-on-one with a patient tutor who explains the "why" — not just the steps. Sessions flex to your schedule and pace.

Book a Free Consultation →