LCM Calculator
The lowest common multiple is the smallest number both inputs divide into evenly — the number you actually need when adding fractions with different denominators or scheduling two repeating events to line up.
Inputs
Result
36
GCD is 6
How the lcm calculator works
LCM(a, b) = (a × b) ÷ GCD(a, b), computed via the Euclidean algorithm for the greatest common divisor.
This works because every common multiple of a and b must be a multiple of their product divided by whatever they share as a common factor.
Worked example: LCM of 12 and 18
- GCD(12, 18) = 6 (found via the Euclidean algorithm: 18 mod 12 = 6, 12 mod 6 = 0).
- LCM = (12 × 18) ÷ 6 = 216 ÷ 6 = 36.
- Check: 36 ÷ 12 = 3 and 36 ÷ 18 = 2 — both whole numbers, confirming 36 is a common multiple; nothing smaller works.
Common mistakes to avoid
Confusing LCM with GCD
GCD is the largest number that divides both inputs; LCM is the smallest number both inputs divide into. They move in opposite directions as the numbers change.
Assuming LCM is always the product of the two numbers
That's only true when the numbers share no common factors (are coprime). Whenever they share a factor, like 12 and 18 sharing 6, the true LCM is smaller than the raw product.
Frequently asked questions
When do I actually need LCM in real life?
Most commonly for adding or comparing fractions with different denominators, and for scheduling problems — like figuring out when two events on different cycles will next coincide.
What is the LCM of two prime numbers?
Simply their product, since prime numbers share no common factors other than 1.
Can LCM be found for more than two numbers?
Yes conceptually, by finding the LCM of the first two, then the LCM of that result with the third number, and so on — this tool handles the two-number case directly.
Why does the tool also show the GCD?
GCD is computed as an intermediate step to get the LCM, so it's shown alongside since it's often independently useful — for simplifying fractions, for instance.
Related calculators
GCD Calculator
Greatest common divisor using the Euclidean algorithm.
Fraction Calculator
Add, subtract, multiply or divide two fractions.
Ratio Calculator
Simplify a ratio and scale it to a new total.
Prime Number Checker
Check if a number is prime and see its factors.
Proportion Solver
Solve a/b = c/x for the missing value.