GCF & LCM Calculator
Find the greatest common factor and least common multiple of two or more numbers.
Assumptions used in this calculation
- Algorithm: GCF is computed with the Euclidean algorithm; results are only defined for positive integers.
About this calculator
GCF and LCM show up constantly in fraction simplification, scheduling problems, and combining measurements, but finding them by listing out factors or multiples until you spot a match is slow and doesn't scale past small numbers or more than two values. This calculator computes the greatest common factor of two or more numbers using the Euclidean algorithm (repeatedly replacing the larger number with the remainder of dividing it by the smaller, until the remainder hits zero), which finds the answer in a handful of steps regardless of how large the numbers are. It then derives the least common multiple from that GCF using LCM = (a × b) ÷ GCF for two numbers, extending pairwise across the full list for three or more. That's dramatically faster and more reliable than listing factors or multiples by hand, especially for larger numbers where brute-force listing becomes impractical.
Worked example
12 and 18
Result: GCF = 6, LCM = 36
Was this helpful?

