LCM Calculator
Find the least common multiple and greatest common divisor of a list of numbers, with the relationship between them.
Everything you type here is processed on your own device. No input is sent to a server, logged, or stored.
What the LCM Calculator does
Use this LCM calculator to find the least common multiple and greatest common divisor of a list of numbers, with the relationship between them. Fill in the single field and the result updates as you type — there is no Calculate button to press and no page reload. It is most often used for finding a common denominator for adding fractions. We run a second free tools site as well — FreeToolStation.org.
How to use it
- Enter two or more positive whole numbers, separated by commas or spaces.
- Read the LCM and the GCD.
- Non-integer and non-positive values are ignored.
How it works
The LCM of two numbers is their product divided by their GCD, which is the practical way to compute it — multiplying first and then looking for common factors overflows quickly for larger inputs. For a longer list, fold the operation pairwise: lcm(a, b, c) = lcm(lcm(a, b), c).
The identity LCM × GCD = product holds for exactly two numbers and fails for three or more. With 4, 6 and 8 the LCM is 24 and the GCD is 2, giving 48 against a product of 192.
The LCM is what you need to add fractions with different denominators, and to work out when two repeating events coincide — two buses at 12 and 18 minute intervals meet every 36 minutes.
When to use it
- Finding a common denominator for adding fractions.
- Working out when two repeating cycles coincide.
- Simplifying ratios using the GCD.
- Solving a number theory exercise.
Common mistakes to avoid
- Applying LCM × GCD = product to more than two numbers.
- Including zero, which has no useful LCM.
- Confusing the LCM with the product. The product is a common multiple but rarely the least one.
Frequently asked questions
What is the LCM of 12, 18 and 30?
180. It is the smallest number all three divide into exactly.
How do I calculate LCM from GCD?
For two numbers, LCM = product ÷ GCD. For a longer list, apply it pairwise: lcm(lcm(a,b),c).
Does LCM × GCD = product work for three numbers?
No. It holds only for exactly two. For 4, 6 and 8 the LCM is 24 and the GCD is 2, which multiply to 48 rather than the product of 192.