Calculators

LCM Calculator

Find the least common multiple of two integers.

Results are provided for general informational use. Verify important financial, health or legal figures before relying on them.

About this LCM Calculator

The LCM Calculator finds the smallest positive number that is a multiple of both integers. It is useful when aligning repeating cycles, finding common denominators and solving many elementary number problems.

The least common multiple is most commonly needed when adding or comparing fractions with different denominators, or when figuring out when two repeating events, such as bus schedules or blinking lights, will next align at the same time.

How the calculation works

The calculator uses the relationship LCM(a,b) = |a × b| ÷ GCD(a,b). This avoids listing every multiple and remains fast for ordinary integer inputs.

How to use it

  1. Enter two integers.
  2. Select Calculate LCM.
  3. Review the least common multiple.

Practical example

The LCM of 12 and 18 is 36 because 36 is the smallest positive value divisible by both 12 and 18.

The LCM of 4 and 6 is 12, which is why 1/4 and 1/6 are commonly combined using 12 as the shared denominator rather than the larger and unnecessary 24 that simply multiplying 4 by 6 would produce.

Things to double-check

LCM and GCD are connected by the formula LCM(a,b) = (a x b) / GCD(a,b), so if you already know the GCD of two numbers you can find the LCM without repeating the full search, and vice versa.

Finding the least common multiple

The LCM is the smallest number that two numbers both divide into. For 12 and 18, the multiples of 12 are 12, 24, 36 and so on, and the multiples of 18 are 18, 36 and so on, so the first match is 36. A faster method uses the GCD: multiply the numbers and divide by their GCD, which here is 12 times 18 divided by 6, or 36. The LCM is never smaller than the larger of the two numbers, and it equals their product only when they share no common factor.

Adding fractions

The LCM gives the smallest common denominator for adding or comparing fractions. To add 5/12 and 7/18, use 36: 5/12 becomes 15/36 and 7/18 becomes 14/36, so the sum is 29/36. Using the LCM keeps the numbers small and often means the answer is already in lowest terms. Multiplying the two denominators would also work, giving 216, but then you would have to simplify the result.

Scheduling and repeating events

LCM problems appear whenever events repeat at different intervals. If one bus leaves every 12 minutes and another every 18 minutes, and both leave at 8:00, they will next leave together at 8:36. The same method works for maintenance schedules, rotating shifts and gear teeth. Always check that your starting point is the same for both events, because the LCM tells you when they align again, not when they first line up.

More than two numbers

To find the LCM of three or more numbers, find the LCM of the first two and then of that result with the next number. For 4, 6 and 10, the LCM of 4 and 6 is 12, and the LCM of 12 and 10 is 60, so the answer is 60. Very large numbers can produce results too big to display exactly, in which case you may see scientific notation. For exact large values, use software designed for big integers.

Rhythms and gears

The LCM describes when two cycles line up again. In music, a pattern of 3 beats played against a pattern of 4 beats lines up every 12 beats, because 12 is the LCM of 3 and 4. In machines, two gears with 12 and 18 teeth return to the same starting pair of teeth after 36 teeth have passed, which is 3 turns of the small gear and 2 turns of the large one. Engineers use this to spread wear, since choosing tooth counts with a larger LCM means a given pair of teeth meets less often.

Worked example: adding fractions

To add 7/15 and 11/20, you need a common denominator. The LCM of 15 and 20 is 60, because 15 divides into 60 four times and 20 divides into it three times. Rewrite the fractions as 28/60 and 33/60 and add them to get 61/60, which equals 1 and 1/60. Using the smallest common denominator keeps the numbers small and makes it easy to check that the result is in lowest terms. If you had used 300, the product of 15 and 20, you would have got 145/300 plus 165/300, which is 310/300, and would then have to simplify it. The LCM saves work and reduces mistakes.

Scheduling repeating events

Imagine three buses leaving a stop every 10, 15 and 25 minutes. They all leave together at 6:00. To find when they next leave together, find the LCM of 10, 15 and 25. The LCM of 10 and 15 is 30, and the LCM of 30 and 25 is 150, so they meet again after 150 minutes, at 8:30. The same method works for watering schedules, maintenance cycles, rotating duties and the lights of buoys that flash at different intervals. It tells you the first moment at which all cycles line up again, which is useful for planning when resources are shared.

The prime factor method

Another way to find the LCM is to break each number into prime factors and take the highest power of each prime that appears. For 84 and 90, the factors are 84 equals 2 squared times 3 times 7, and 90 equals 2 times 3 squared times 5. The highest powers are 2 squared, 3 squared, 5 and 7, so the LCM is 4 times 9 times 5 times 7, which is 1,260. This method makes the connection with the GCD clear: the GCD takes the lowest powers of shared primes, and the LCM takes the highest. It also works well when you have more than two numbers to combine.

Patterns, gears and design

The LCM appears whenever two patterns repeat at different rates. A tile pattern that repeats every 4 units combined with a border that repeats every 6 units lines up again every 12 units, so a design of 12 units can be repeated without a seam. In machines, choosing gear teeth with a larger LCM makes each pair of teeth meet less often, which spreads wear. Musicians use it to understand polyrhythms, where three beats against four line up every twelve. Knowing the LCM of two numbers helps you predict when a pattern will repeat and design things that fit together neatly.

Key terms explained

A multiple of a number is the product of it and a whole number. A common multiple is shared by two or more numbers, and the least common multiple is the smallest positive one. The least common denominator is the least common multiple of the denominators of fractions. Prime factorisation helps to find it. Coprime numbers share no common factor. A cycle or period is the interval at which a repeating event occurs, and the least common multiple tells you when cycles align.

Rules of thumb and quick checks

The least common multiple of a and b equals a times b divided by their greatest common divisor. If the numbers are coprime, it is their product. The least common multiple of all the numbers from 1 to 10 is 2,520. The result must be divisible by every input, which is an easy check. When you add fractions, using the least common multiple as the denominator keeps the numbers as small as possible and the final fraction easier to simplify.

Frequently asked questions

What happens if one number is zero?

The LCM is reported as zero.

Is LCM always larger than both numbers?

Not always. If one number is already a multiple of the other, the larger number is the LCM.

Can negative numbers be used?

Yes. Their absolute values are used.

Is the LCM always the product of the two numbers?

Only when the two numbers share no common factors (their GCD is 1); otherwise the LCM is smaller than the simple product, since shared factors would otherwise be counted twice.

Can this calculator find the LCM of more than two numbers?

This version handles two numbers at a time; for three or more numbers, find the LCM of the first pair, then find the LCM of that result with the next number, repeating until all numbers are included.

Keep exploring

More Calculators

View category →