🔢 GCF & LCM Calculator
Find the Greatest Common Factor (GCF) and Least Common Multiple (LCM) of two or more numbers, with step-by-step solutions.
Enter Numbers
GCF (Greatest Common Factor)
—
LCM (Least Common Multiple)
—
GCF vs LCM
GCF (Greatest Common Factor), also called GCD or HCF, is the largest number that divides all given numbers evenly.
LCM (Least Common Multiple) is the smallest positive number that is a multiple of all given numbers.
GCF via Euclidean Algorithm: GCF(a,b) = GCF(b, a mod b)
LCM(a,b) = |a × b| / GCF(a,b)
LCM(a,b) = |a × b| / GCF(a,b)
Common Uses
- GCF: Simplifying fractions, dividing things into equal groups
- LCM: Adding fractions with different denominators, scheduling recurring events
What's the Euclidean algorithm? +
The Euclidean algorithm efficiently finds GCF by repeatedly replacing the larger number with the remainder of dividing the two numbers. Example: GCF(48,18) → GCF(18,12) → GCF(12,6) → GCF(6,0) = 6. It's one of the oldest known algorithms, dating to ~300 BC.