Skip to content
ToolsLeb ToolsLeb

LCM Calculator

Calculate the Least Common Multiple of two numbers.

Simple Math

Calculator Inputs

Your Result

Enter your details and press Calculate to see your result.

Formula

LCM = (First Number × Second Number) ÷ Gcd(First Number, Second Number)
First Number
Second Number

How it works

  1. Enter two whole numbers.
  2. View their Least Common Multiple (LCM).

Share on Social Media:

The least common multiple (LCM) of two whole numbers is the smallest positive number that both divide into exactly. For example, the LCM of 4 and 6 is 12. Enter two whole numbers from 1 to 1,000,000 and the calculator returns their LCM.

How it's calculated

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

The greatest common divisor (GCD) is found first with the Euclidean algorithm. This is far faster than listing multiples, especially for large numbers.

Worked examples

  • 4 and 6: GCD = 2, so LCM = 24 ÷ 2 = 12.
  • 12 and 18: GCD = 6, so LCM = 216 ÷ 6 = 36.
  • 7 and 9 (no common factor): LCM = 7 × 9 = 63.

Other methods

Listing multiples: multiples of 4 are 4, 8, 12, 16…; multiples of 6 are 6, 12, 18… The first shared one is 12. Fine for small numbers, slow for big ones.

Prime factors: 12 = 2² × 3 and 18 = 2 × 3². Take each prime at its highest power: 2² × 3² = 36.

Everyday uses

  • Adding fractions: the lowest common denominator is the LCM of the denominators. 1/4 + 1/6 = 3/12 + 2/12 = 5/12.
  • Repeating schedules: one bus every 12 minutes, another every 18. They leave together again after 36 minutes.
  • Packs and quantities: hot dogs come in packs of 10 and buns in packs of 8. Buy 40 of each (LCM) to have none left over.

More than two numbers

Work in pairs: LCM(a, b, c) = LCM(LCM(a, b), c). For 4, 6 and 10: LCM(4, 6) = 12, then LCM(12, 10) = 60.

Related: GCD Calculator, Ratio Simplifier.

Frequently Asked Questions

Least Common Multiple — the smallest number that two or more numbers all divide into evenly.

One common method multiplies the numbers together and divides by their GCD — this tool computes the result instantly for any numbers you enter.

Common in adding or comparing fractions with different denominators, and in scheduling problems like finding when repeating events align.

LCM is the smallest number both numbers divide into evenly, while GCD (Greatest Common Divisor) is the largest number that divides both evenly — related but opposite concepts.

LCM(a, b) = (a × b) / GCD(a, b) — the least common multiple and greatest common divisor of two numbers are directly related through this formula.

Finding the LCM of two denominators gives you the smallest common denominator to convert both fractions to before adding or subtracting them, avoiding unnecessarily large numbers.

If one number is a multiple of the other (like 4 and 12), the LCM is simply the larger number, since it's already a multiple of both.