LCM

LCM Calculator

Arithmetic & NumbersFreeStep by step

The least common multiple (LCM) of two or more numbers is the smallest number that all of them divide into exactly. This LCM calculator finds it with two methods: taking the highest power of each prime factor, and the formula LCM = product ÷ GCF. Both methods must agree.

Try:

How to use the lcm calculator

  1. Enter two or more whole numbers, separated by commas.
  2. Press Calculate.
  3. See the LCM, the prime factorisations and the GCF check.

Formula

$$\operatorname{lcm}(a, b) = \frac{a \times b}{\gcd(a, b)}$$

Worked example: 12, 18

  • Numbers: 12, 18

✓ Answer checked

3636
Step-by-step working (3 steps)
  1. Prime factorise each number Prime factorisation

    Write each number as a product of primes.

    12=22×318=2×32\begin{gathered}12 = 2^{2} \times 3\\18 = 2 \times 3^{2}\end{gathered}
  2. Take the highest powers

    Use every prime that appears, each to its highest power.

    22×32=362^{2} \times 3^{2} = 36
  3. Check with the GCF lcm(a,b) = ab / gcd(a,b)

    For two numbers, LCM = product ÷ GCF.

    lcm⁡(12,18)=12×186=36\operatorname{lcm}(12, 18) = \frac{12 \times 18}{6} = 36
Formulas used
lcm⁡(a,b)=a×bgcd⁡(a,b)\operatorname{lcm}(a, b) = \frac{a \times b}{\gcd(a, b)}
How this was checked
  • ✓ 36 is a multiple of every number.
  • ✓ The prime-power method gives the same result.

When to use the LCM Calculator

  • Add fractions using the lowest common denominator.
  • Find when two repeating events happen together, such as buses every 12 and 18 minutes.
  • Plan schedules and rotations.
  • Solve gear and cycle problems.

Quick facts to remember

  • LCM = the smallest number that both numbers divide into.
  • For two numbers, LCM = a × b ÷ GCF.
  • The LCM of two primes is their product.
  • With prime factors, take the highest power of each prime.

Frequently asked questions

What is the LCM of 12 and 18?

36. It is the smallest number that both 12 and 18 divide into.

How do I find the LCM with prime factors?

Prime factorise each number, then multiply each prime to its highest power. 12 = 2² × 3 and 18 = 2 × 3², so the LCM is 2² × 3² = 36.

When do I use the LCM?

To find a common denominator when adding fractions, or to work out when repeating events happen together.

People also search for

lcm calculatorleast common multiplelowest common multiplelcm calculator with stepsfree lcm calculator online

🔗 Embed this on your website or blog — free

Teachers and bloggers: copy this code and paste it into your page (use an HTML or "Custom HTML" block). It always stays up to date.