About the Least Common Multiple Calculator
The least common multiple is the smallest number that two or more integers all divide into. It is what you need to add fractions with unlike denominators, and to work out when repeating cycles of different lengths will coincide.
The formula
LCM(a, b) = (a · b) / GCD(a, b)The product of two numbers counts their shared factors twice, so dividing by the greatest common divisor removes the duplication and leaves the smallest common multiple.
How to use this calculator
- 1Enter your Number A. The field starts at
4, which you can overwrite. - 2Enter your Number B. The field starts at
6, which you can overwrite. - 3Enter your Number C (0 to skip). The field starts at
0, which you can overwrite. - 4Read the result straight away — it recalculates as you type, so there is no button to press. Use Share to copy a link that reopens the page with your exact numbers filled in.
Worked example
| Input | Value |
|---|---|
| Number A | 4 |
| Number B | 6 |
| Number C (0 to skip) | 0 |
Result
LCM(4, 6): 12
GCD(4, 6): 2
A × B = 24
A × B / GCD = LCM = 12
Those are the values the page loads with, so you can reproduce this result yourself and then change one field at a time to see what drives the outcome.
Understanding your result
The relationship to the GCD is the efficient route: for 4 and 6, the GCD is 2, so the LCM is 24 ÷ 2 = 12. Computing the LCM directly by listing multiples works for small numbers but becomes impractical quickly, whereas the Euclidean algorithm handles the GCD instantly at any scale.
Through prime factorisation the LCM is the product of the highest power of every prime appearing in any of the numbers. Since 4 is 2² and 6 is 2 × 3, taking 2² and 3 gives 12. This mirrors the GCD rule, which takes the lowest shared powers instead, and the symmetry between them is why the product identity holds.
Things worth knowing
- To add fractions, use the LCM of the denominators as the common denominator — it keeps the numbers smallest.
- For coprime numbers the LCM is simply their product, since there are no shared factors to remove.
- The LCM is never smaller than the largest input and never larger than the product of all inputs.
- For three or more numbers, apply the pairwise rule cumulatively: LCM(a, b, c) = LCM(LCM(a, b), c).
- Cycle problems reduce to LCMs: two events every 4 and 6 days coincide every 12 days.
Frequently asked questions
What is the least common multiple?+
The smallest positive integer that all your numbers divide into evenly. For 4 and 6 it is 12, since 12 is the first number both 4 and 6 divide without remainder.
How is the LCM related to the GCD?+
Their product equals the product of the original numbers: LCM(a, b) × GCD(a, b) = a × b. So dividing the product of two numbers by their GCD gives the LCM directly.
Why do I need the LCM to add fractions?+
Because fractions can only be added over a common denominator, and the LCM gives the smallest one — which keeps the arithmetic manageable and minimises simplification afterwards.
What is the LCM of two prime numbers?+
Their product. Distinct primes share no factors, so the smallest number both divide into is simply the two multiplied together — the LCM of 7 and 11 is 77.