LCM Calculator
lcm(a,b)=|a·b|/gcd(a,b), folded across a list. Click any i for detail.
Integers
Numbers
i
List
Two or more positive integers, commas or spaces. |
|---|
How to use this calculator
- Enter two or more positive integers.
- Read the least common multiple.
- Use it to find common denominators for fraction addition.
- Check pairwise GCF in the breakdown when shown.
Results explained
The LCM is the smallest positive number divisible by every input. For two numbers, lcm(a,b) = |a·b| / gcd(a,b).
Quick reference: LCM
lcm(4, 6) = 12 because 12 is the smallest number both divide.
| Item | Detail |
|---|---|
| Two numbers | lcm = |a·b| / gcd(a,b) |
| Three or more | fold lcm left to right |
| Denominators | lcm(3,4) = 12 for 1/3 + 1/4 |
| Coprime | if gcd=1, lcm = product |
Very large products can exceed JavaScript safe integers.
How the estimate is built
lcm(a,b) = |a·b| / gcd(a,b); extend across lists.
Example scenario
4, 6, 8 → 24.
FAQ
Why do fractions need LCM?
Common denominators are built from the LCM of the bottoms.
Can lcm be smaller than the largest input?
No. The largest input always divides the lcm.
What if inputs share a big gcd?
Product shrinks: lcm(12,18) = 36, not 216.