GCF & LCM Calculator
Calculate the greatest common factor (GCF) and least common multiple (LCM) of two or more numbers.
- GCF (largest shared factor)6
- LCM (smallest shared multiple)180
The GCF is always the smaller of the two — it divides every number in your list — while the LCM, the smallest number every one of them divides into, is always the larger (here 30× bigger).
- Least Common Multiple180
The GCF is found with the Euclidean algorithm (repeated division with remainder); the LCM is built up pairwise using LCM(a,b) = (a×b) / GCD(a,b).
ƒShow your work
- 1GCD(12, 18): 12 = 0×18 + 12, 18 = 1×12 + 6, 12 = 2×6 + 0 → GCD = 6
- 2GCD(6, 30): 6 = 0×30 + 6, 30 = 5×6 + 0 → GCD = 6
- 3LCM(12, 18) = (12×18) / GCD(12, 18) = 36
- 4LCM(36, 30) = (36×30) / GCD(36, 30) = 180
About the GCF & LCM Calculator
GCF (greatest common factor) and LCM (least common multiple) solve two opposite kinds of everyday problem. GCF answers 'what's the biggest chunk I can evenly divide this into' — splitting a group of people into equal teams, cutting boards of different lengths into the largest possible identical pieces, or simplifying a fraction down to lowest terms. LCM answers 'when do these cycles line up again' — two events on different repeating schedules, or finding a common denominator to add fractions that don't already share one.
Students meet both constantly in the same unit of math class, and it's easy to mix up which one applies to which kind of question — this calculator computes both at once from the same list of numbers, so you can compare them side by side and see the relationship between them directly.
How it’s calculated
GCF is found here using the Euclidean algorithm: repeatedly divide the larger number by the smaller and replace the larger with the remainder, until the remainder hits zero — whatever's left is the GCF. For example, GCD(48, 18): 48 = 2×18 + 12, then 18 = 1×12 + 6, then 12 = 2×6 + 0, so the GCF is 6. It's dramatically faster than listing every factor of both numbers, especially for large ones.
LCM is then built from the GCF using the identity LCM(a, b) = |a × b| / GCD(a, b) — the product of the two numbers, scaled down by whatever they already share. For more than two numbers, both GCF and LCM are computed pairwise, folding each new number into the running result one at a time.
A useful sanity check: the GCF of a list is never larger than the smallest number in it, and the LCM is never smaller than the largest number in it — the GCF divides in, the LCM gets divided into.
Frequently asked questions
What's the difference between GCF and LCM?
GCF (greatest common factor) is the largest number that divides evenly into every number in the list. LCM (least common multiple) is the smallest number that every number in the list divides evenly into. They pull in opposite directions — GCF is always ≤ the smallest input, LCM is always ≥ the largest.
How do you find the GCF of three or more numbers?
Find the GCF of the first two numbers, then find the GCF of that result and the next number, and repeat until every number has been folded in. The final result is the GCF shared by the whole list.
Is there a shortcut relating GCF and LCM?
For exactly two numbers a and b, GCF(a,b) × LCM(a,b) = a × b. That identity is exactly how this calculator derives the LCM from the GCF instead of computing it from scratch, and it only holds for pairs, not longer lists.
Why use the Euclidean algorithm instead of listing factors?
Listing every factor of a large number gets slow fast, especially for numbers with no small factors. The Euclidean algorithm finds the GCF in a handful of division steps regardless of how large the numbers are, which is why it's the standard method.
How is GCF used to simplify a fraction?
Divide both the numerator and denominator by their GCF. For 24/36, the GCF is 12, so dividing both by 12 gives the simplified fraction 2/3 — this is exactly what the fraction calculator does automatically on every result.
Related calculators
Powered by GetCalculator.online