MATH

Least common multiple calculator

Find the least common multiple of two positive whole numbers and follow the calculation steps. Use the result for fraction denominators or repeating schedules.

01 / INPUTS

Your numbers

02 / YOUR RESULT
36
Least common multiple

Default inputs are examples. Change them to match your situation.

How your LCM is calculated

  1. The greatest common divisor of 12 and 18 is 6. This is the largest whole number that divides both exactly.
  2. Divide the first number by that divisor: 12 ÷ 6 = 2.
  3. Multiply by the second number: 2 × 18 = 36.
  4. Check: 36 ÷ 12 = 3 and 36 ÷ 18 = 2. Both are whole numbers.

Find the least common multiple of two numbers

Enter two positive whole numbers from 1 to 1,000,000. The answer and calculation steps update together. The least common multiple (LCM), also called the lowest common multiple, is the smallest positive number that both inputs divide into exactly.

Use it to find a shared denominator for fractions or work out when two repeating schedules meet again. This tool accepts two numbers; it does not accept decimals, fractions, zero, or negative inputs.

Worked example: the LCM of 12 and 18

The greatest common divisor (GCD) of 12 and 18 is 6. Divide 12 by 6, then multiply by 18: (12 ÷ 6) × 18 = 36.

You can check this by listing multiples:

The first shared positive multiple is 36. Using prime factors gives the same answer: 12 = 2² × 3 and 18 = 2 × 3². Take the highest power of each prime: 2² × 3² = 36.

Using LCM to add fractions

For 1/12 + 1/18, use 36 as the common denominator. Rewrite 1/12 as 3/36 and 1/18 as 2/36, giving 5/36. The LCM gives you the denominator; it does not add the fractions for you. Use the fraction-to-decimal calculator if you need the decimal value afterward.

When do two repeating schedules line up?

If two timers start together and repeat every 8 and 14 minutes, their GCD is 2 and their LCM is (8 ÷ 2) × 14 = 56 minutes. That is when both next ring together. Both intervals must use the same unit, and the timers must start at the same time.

LCM versus GCD

A common divisor fits into both inputs; a common multiple is divisible by both. For 12 and 18, the GCD is 6 and the LCM is 36. Use the greatest common divisor calculator to simplify a ratio or reduce a fraction.

The formula is LCM(a, b) = (a ÷ GCD(a, b)) × b for positive whole numbers. Dividing first avoids an unnecessarily large intermediate product.

Common questions

Is the LCM always the product of the two numbers?

Only when their GCD is 1. For example, 5 and 7 have LCM 35. But 8 and 14 share a factor of 2, so their LCM is 56 rather than 112.

What if one number divides the other?

The larger number is the LCM. For 6 and 24, the answer is 24. If both inputs are the same positive number, that number is also their LCM.

How can I find the LCM of three numbers?

First find the LCM of the first two, then use that result with the third. For 4, 6, and 9: LCM(4, 6) = 12, then LCM(12, 9) = 36. Each new input must stay within this tool's 1,000,000 limit.

Why does the calculator reject zero?

This tool finds a positive common multiple of positive integers. Some other tools define LCM(0, n) as zero; Calcaven uses the positive-input convention and asks you to enter at least 1.

Background and checks

OpenStax Algebra and Trigonometry provides background on factors and multiples. The explanation is original Calcaven content, and the live steps use the existing calculator result.

Explanation and steps checked October 2, 2026 · How we check calculations