GCF & LCM Calculator

Find the Greatest Common Factor (GCF/GCD) and Least Common Multiple (LCM) of two or more numbers with step-by-step factorization.

GCF (GCD)
LCM
GCF × LCM
Prime Factors
Euclidean Steps

How to Use the GCF & LCM Calculator

  1. Enter two or three numbers: Type positive integers into the input fields.
  2. View GCF: The Greatest Common Factor (also called GCD) appears instantly.
  3. View LCM: The Least Common Multiple is calculated simultaneously.
  4. See the work: Prime factorizations and Euclidean algorithm steps are shown.

GCF vs LCM

Property GCF (GCD) LCM
DefinitionLargest number that divides all inputsSmallest number all inputs divide into
Example (12, 18)636
Always ≤ or ≥≤ smallest input≥ largest input
RelationshipGCF(a,b) × LCM(a,b) = a × b

Frequently Asked Questions

What is the difference between GCF and GCD?
GCF (Greatest Common Factor) and GCD (Greatest Common Divisor) are the same thing. GCF is more commonly used in elementary math, while GCD is used in higher math and computer science.
How is GCF calculated?
The most efficient method is the Euclidean algorithm: repeatedly divide the larger number by the smaller and take the remainder until the remainder is 0. The last non-zero remainder is the GCF.
How is LCM related to GCF?
For two numbers a and b: LCM(a, b) = |a × b| / GCF(a, b). This relationship provides an efficient way to calculate LCM once GCF is known.