Least Common Multiple Calculator
Find the least common multiple (LCM) of two whole numbers: the smallest number both divide into evenly. Used for common denominators and repeating schedules.
Last updated: October 2026
LCM
36
Formula below · 3 sources (mathworld.wolfram.com, mathsisfun.com, khanacademy.org) · Updated Oct 2026
Compare with similar
About this calculator
The least common multiple of two whole numbers is the smallest positive number that is a multiple of both. The multiples of 12 are 12, 24, 36, 48…; the multiples of 18 are 18, 36, 54…; the first one they share is 36, so LCM(12, 18) = 36.
How the calculator finds it
Listing multiples is slow for big numbers, so the calculator uses the identity
LCM(a, b) = |a × b| ÷ GCF(a, b)
with the greatest common factor from Euclid's algorithm. For 12 and 18 the GCF is 6, so the LCM is 12 × 18 ÷ 6 = 36. With prime factors, the LCM takes every prime to its highest power: 12 = 2² × 3 and 18 = 2 × 3², so LCM = 2² × 3² = 36.
Special cases
Signs are ignored (the LCM is reported as positive). If either number is 0 the LCM is 0 by convention. When the two numbers are coprime (GCF = 1) the LCM is simply their product, like LCM(7, 9) = 63. For three numbers, work in steps: LCM(a, b, c) = LCM(LCM(a, b), c).
| Numbers | GCF | LCM |
|---|---|---|
| 4 and 6 | 2 | 12 |
| 6 and 8 | 2 | 24 |
| 12 and 18 | 6 | 36 |
| 15 and 20 | 5 | 60 |
| 7 and 9 | 1 | 63 |
| 8 and 12 | 4 | 24 |
How to use
Enter two whole numbers. Example 1 (adding fractions): 1/12 + 1/18 needs a common denominator. LCM(12, 18) = 36, so 1/12 = 3/36 and 1/18 = 2/36, and the sum is 5/36. Example 2 (schedules): one bus comes every 15 minutes and another every 20. LCM(15, 20) = 60, so they arrive together every 60 minutes. Example 3 (coprime numbers): LCM(7, 9) = 63, the product, because 7 and 9 share no factor.
Frequently asked questions
How do you find the LCM of two numbers?
Divide the product of the numbers by their greatest common factor. For 8 and 12: GCF = 4, so LCM = 8 × 12 ÷ 4 = 24. You can also list multiples of the larger number (12, 24, …) until you reach one the smaller number divides.
What is the difference between LCM and GCF?
The GCF is the largest number that divides both; the LCM is the smallest number both divide into. For 8 and 12 the GCF is 4 and the LCM is 24, and GCF × LCM = 8 × 12 = 96.
How do I find the LCM of three or more numbers?
Combine them two at a time: LCM(4, 6, 10) = LCM(LCM(4, 6), 10) = LCM(12, 10) = 60.
Is the least common denominator the same as the LCM?
Yes. The least common denominator of two fractions is the LCM of their denominators, which keeps the numbers as small as possible when you add or subtract fractions.
Related calculators
Sources & references
Think a result is wrong? Report a problem with this calculator.