ClickAndCalc

LCM Calculator

Find the least common multiple of two positive whole numbers.

Least common multiple36(12 / 6) × 18
Greatest common divisor (GCD)
6

Explanation and examples updated: · Testing methodology and calculation limits

How it works

The least common multiple is the smallest positive number divisible by both inputs. The calculator uses the greatest common divisor relationship to compute it efficiently.

Standard formulaLCM(a, b) = |a × b| ÷ GCD(a, b)

Worked example

For 12 and 18, the greatest common divisor is 6. Apply LCM = (12 / 6) × 18 = 36. Check: 36 / 12 = 3 and 36 / 18 = 2, so both divide it exactly. In fraction addition, 36 can serve as a common denominator: 1/12 + 1/18 = 3/36 + 2/36 = 5/36.

More worked examples

Find a shared denominator

For 8 and 12, the greatest common divisor is 4. Divide before multiplying: (8 ÷ 4) × 12 = 24. Thus 1/8 + 1/12 becomes 3/24 + 2/24 = 5/24. The LCM supplies the smallest positive common denominator; it does not itself add the fractions.

Try these values in the calculator

Compare repeating schedules

If two lights flash together now and repeat every 6 and 8 seconds, they next coincide after 24 seconds, assuming perfectly regular cycles with the same starting point. Their shared factors matter: multiplying 6 by 8 gives 48, which is a common multiple but not the least one.

Try these values in the calculator

Recognize coprime numbers

The numbers 5 and 7 have GCD 1, so their LCM is their product, 35. This shortcut applies whenever the GCD is 1, even if the numbers themselves are not prime. For example, 8 and 9 also have no shared factor greater than 1.

Try these values in the calculator

Avoid confusing divisors and multiples

A common divisor divides both inputs; a common multiple is divisible by both. The GCD of 12 and 18 is 6, while the LCM is 36. Check an LCM answer by dividing it by each input: both quotients must be whole numbers. This check confirms a common multiple, but finding the least one still requires the GCD formula or another valid method.

Enter two positive whole numbers only. Decimal measurements, zero and negative numbers are outside this form’s scope. Very large integers can exceed exact JavaScript arithmetic, so do not use this browser tool as an arbitrary-precision number-theory system.

Frequently Asked Questions

What is a multiple?

A multiple is a number produced by multiplying an integer by another whole number.

Is LCM the same as GCD?

No. LCM finds a shared multiple; GCD finds the largest shared divisor.

Can I use negative integers?

This page accepts positive whole numbers so the result is unambiguous and useful for common multiples.

What happens with equal inputs?

The LCM is that number itself.