GCF & LCM Calculator
Enter two or more whole numbers to find their greatest common factor (GCF) and least common multiple (LCM).
Reviewed by the WorldCalcs team · Methodology · Last reviewed: June 2026
Result
Numbers: 12, 18
GCF = 6
LCM = 36
What are the GCF and LCM?
The greatest common factor (GCF), also called the greatest common divisor, is the largest whole number that divides into every number in your list with no remainder. The least common multiple (LCM) is the smallest whole number that every number in your list divides into evenly. They are used to reduce fractions, find common denominators, and solve timing and grouping problems.
How they are calculated
The GCF is found with the Euclidean algorithm: repeatedly replace the larger number with the remainder of dividing it by the smaller, until one number reaches zero; the other is the GCF. The LCM of two numbers is their product divided by their GCF: LCM(a, b) = (a × b) ÷ GCF(a, b). For more than two numbers, the GCF and LCM are built up one pair at a time.
Example
For 12 and 18, the GCF is 6 (the largest number dividing both) and the LCM is (12 × 18) ÷ 6 = 36. For 4, 6 and 10, the GCF is 2 and the LCM is 60 — the smallest number all three divide into.
All calculations happen in your browser. Nothing is sent, stored, or tracked.
Results are estimates and may contain errors — for general information only, not professional advice. Always verify before relying on them. Disclaimer
How to use
Type two or more positive whole numbers separated by commas, spaces or new lines.
The calculator shows the greatest common factor and the least common multiple, using the Euclidean algorithm for the GCF and the pairwise-product method for the LCM.