LCM calculator - least common multiple of several numbers

Enter two or more whole numbers to find their least common multiple. The LCM calculator uses the GCD formula and shows the working for each pair, which is handy for adding fractions with different denominators.

  • Free
  • No sign-up
  • Runs in your browser

Separate with spaces, commas or new lines.

LCM (least common multiple): 60

Method: LCM(a, b) = a × b ÷ GCD(a, b)

  1. GCD(4, 6) = 2; 4 × 6 ÷ 2 = 12
  2. GCD(12, 10) = 2; 12 × 10 ÷ 2 = 60

Runs in your browser — nothing you enter is sent to our servers.

How to use LCM calculator

  1. Type your whole numbers in the LCM calculator, separated by spaces, commas or new lines.
  2. Use between 2 and 20 numbers.
  3. Read the LCM in the result box.
  4. Check the lines below, which show the GCD and the product divided by the GCD for each pair.

Features

  • LCM of 2 to 20 whole numbers
  • Uses LCM(a, b) = a x b / GCD(a, b) and shows the working for each pair
  • Handles very large numbers, up to 30 digits each
  • Accepts spaces, commas or new lines between numbers
  • Runs in your browser with no daily limit

Examples

InputResult
4 and 612 — GCD is 2, so 4 x 6 / 2 = 12.
4, 6, 1060 — LCM(4, 6) = 12, then LCM(12, 10) = 60.
12 and 1836 — GCD is 6, so 12 x 18 / 6 = 36.
7 and 1391 — Coprime numbers: the LCM is their product.

Limitations

  • Only whole numbers of 0 or more are accepted. Negative numbers and decimals show an error.
  • If any number is 0, the LCM is shown as 0 by convention.
  • At most 20 numbers, each with up to 30 digits.

Learn more

The least common multiple of a set of whole numbers is the smallest positive number that all of them divide exactly. For 4 and 6 the multiples of 4 are 4, 8, 12, 16 and the multiples of 6 are 6, 12, 18, so the first one they share is 12.

Listing multiples works for small numbers, but a faster route uses the greatest common divisor. Since GCD x LCM = a x b for two numbers, LCM(a, b) = a x b / GCD(a, b). For 12 and 18 the GCD is 6, so the LCM is 12 x 18 / 6 = 36. To avoid very large intermediate products, the calculator divides before multiplying.

For more than two numbers the rule is applied step by step: take the LCM of the first two, then the LCM of that answer and the third number, and so on. The order of the numbers does not change the final result.

The LCM has everyday uses. It gives the least common denominator when adding fractions, and it tells you when repeating cycles line up, for example two buses leaving every 4 and 6 minutes will leave together every 12 minutes.

Frequently asked questions

What is the least common multiple?

It is the smallest positive number that every one of your numbers divides exactly. For 4 and 6 it is 12.

How do I find the LCM using the GCD?

Multiply the two numbers and divide by their GCD: LCM(a, b) = a x b / GCD(a, b). For 12 and 18 that is 216 / 6 = 36.

How do I find the LCM of three or more numbers?

Find the LCM of the first two, then the LCM of that result with the next number, and so on.

Why do I need the LCM to add fractions?

The least common denominator of two fractions is the LCM of their denominators. For 1/4 + 1/6 it is 12.

Sources

Last reviewed: October 1, 2026