LCM Calculator (Least Common Multiple)
The least common multiple of two or more whole numbers — the smallest number they all divide into.
The least common multiple is the first number that appears in every input's times table.
How the lcm calculator (least common multiple) works
The least common multiple is the first number that appears in every input's times table. For two numbers it is their product divided by their greatest common factor, which is why numbers sharing no factors have an LCM equal to simply multiplying them. It is what gives you the common denominator when adding fractions, and it answers "when do these two cycles line up again?".
Formula: gcd(a, b) = gcd(b, a mod b); lcm(a, b) = |a × b| / gcd(a, b)
Worked examples
| Inputs | Least common multiple | Note |
|---|---|---|
| LCM of 4 and 6 | 12 | 12 |
| LCM of 12, 18 and 30 | 180 | 180 |
| LCM of 7 and 9 | 63 | 63 — coprime, so just the product |
FAQFrequently asked questions
What is the least common multiple?
The smallest number that all your numbers divide into exactly. For 4 and 6 it is 12.
How do I find it from the GCF?
For two numbers, LCM = a × b ÷ GCF. For 4 and 6: 24 ÷ 2 = 12.
Why do I need it for fractions?
It gives the lowest common denominator, so 1/4 + 1/6 becomes 3/12 + 2/12 = 5/12.
What if the numbers are coprime?
The LCM is just their product, because they share no factors to cancel.
Where else does it come up?
Anywhere repeating cycles must align — gear teeth meeting again, timetables coinciding, or two flashing lights synchronizing.
Where these figures come from
- NIST Digital Library of Mathematical Functions — reference definitions for elementary and special functions
- Wolfram MathWorld — definitions and formulas for every topic on this page
- NIST/SEMATECH e-Handbook of Statistical Methods — the statistical formulas (mean, variance, z, confidence intervals, sample size)
- Common Core State Standards — Mathematics — the terms and methods taught in US schools
Last checked: September 2026. Formulas are fixed by mathematics and do not change with tax years or regulations.