Skip to content
  • Open the math solver
  • Ask the AI tutor
  • Find an AP course
  • Create a quiz
  • Open the calculator
  • Graphing Calculator
  • Browse all calculators
  • Read math guides
↑ ↓Enter to open · Esc to close
Solve a problem

LCM Calculator

Find the smallest positive number that every value in your list divides into, with the reasoning shown.

Two to ten integers separated by commas or spaces.

Examples

About the LCM Calculator

The least common multiple of a set of integers is the smallest positive integer that is a multiple of each of them. It is the least common denominator when adding fractions and the answer to many timing and scheduling problems.

This tool builds the LCM from prime factorizations and confirms it with the identity lcm⁡(a,b)=∣ab∣gcd⁡(a,b)\operatorname{lcm}(a,b) = \frac{|ab|}{\gcd(a,b)}.

What is the least common multiple?

The multiples of a number are what you get by multiplying it by 1, 2, 3 and so on: the multiples of 12 are 12, 24, 36, 48 and onward, and those of 18 are 18, 36, 54 and onward. A common multiple appears in both lists, and the least common multiple is the first one, here 36.

Every pair of positive integers has infinitely many common multiples, all of them multiples of the LCM. The LCM is never smaller than the largest number in the list and never larger than the product of all of them; it equals the product exactly when the numbers share no prime factors.

How to use the LCM Calculator

  1. Enter two to ten whole numbers separated by commas or spaces.
  2. Press Find LCM.
  3. Review the prime factorization of each number and the highest power of each prime that is used.

Formulas

From prime factorizations

lcm⁡=∏pmax⁡(e1,e2,…)\operatorname{lcm} = \prod p^{\max(e_1, e_2, \ldots)}

Using the GCF

lcm⁡(a,b)=∣a⋅b∣gcd⁡(a,b)\operatorname{lcm}(a, b) = \frac{|a \cdot b|}{\gcd(a, b)}

More than two numbers

lcm⁡(a,b,c)=lcm⁡(lcm⁡(a,b),c)\operatorname{lcm}(a, b, c) = \operatorname{lcm}(\operatorname{lcm}(a, b), c)

Worked example: 12, 18

The worked example finds the LCM of 12 and 18. Their prime factorizations are 12=22×312 = 2^2 \times 3 and 18=2×3218 = 2 \times 3^2. Since gcd⁡(12,18)=6\gcd(12, 18) = 6, the identity gives 12×186=2166=36\frac{12 \times 18}{6} = \frac{216}{6} = 36. Taking every prime at its largest power, 22×32=362^2 \times 3^2 = 36, gives the same answer, and the checks confirm that 36 divides evenly by 12 and by 18.

The solution below is generated by the same engine that powers the calculator above.

Final answer

3636

How we read your problem

Find the least common multiple of the numbers.

Step-by-step solution

  1. Prime factorization of each number

    12=22×3,18=2×3212 = 2^{2} \times 3,\quad 18 = 2 \times 3^{2}
  2. Use the GCF to combine 12 and 18

    lcm⁡(12,18)=12×18gcd⁡(12,18)=2166=36\operatorname{lcm}(12, 18) = \frac{12 \times 18}{\gcd(12, 18)} = \frac{216}{6} = 36
  3. Confirm with prime factors

    Take every prime that appears, each with its largest exponent.

    22×32=362^{2} \times 3^{2} = 36

Formulas used

  • LCM from GCF

    lcm⁡(a,b)=∣a⋅b∣gcd⁡(a,b)\operatorname{lcm}(a, b) = \frac{|a \cdot b|}{\gcd(a, b)}

36 is the smallest positive number that every input divides exactly.

Verification

  • 36 ÷ 12 = 3
  • 36 ÷ 18 = 2

Detailed explanation

Why the largest powers

A multiple of 12 must contain 222^2 and 3 among its prime factors, and a multiple of 18 must contain 2 and 323^2. To be a multiple of both, a number needs 222^2 to satisfy 12 and 323^2 to satisfy 18, and nothing more is needed. Taking each prime at its highest exponent is therefore the smallest choice that covers every number, which is exactly the definition of the least common multiple.

LCM in fractions and scheduling

The least common denominator of two fractions is the LCM of their denominators. To add 512+718\frac{5}{12} + \frac{7}{18} you rewrite both over 36, which keeps the numbers smaller than using 12×18=21612 \times 18 = 216. The LCM also answers timing questions: if one bus leaves every 8 minutes, another every 12 and a third every 15, they next leave together after lcm⁡(8,12,15)=120\operatorname{lcm}(8, 12, 15) = 120 minutes.

If a 0 appears in the list, the calculator reports 0 by convention and explains that 0 is a multiple of every integer, since no positive common multiple exists in that case.

How the LCM and the GCF fit together

For two positive integers the product of the GCF and the LCM is always the product of the numbers themselves. The reason is visible in the prime factorizations: for each prime, the GCF takes the smaller exponent and the LCM takes the larger, and together they use both exponents exactly once. With 12 and 18, the GCF 6 and the LCM 36 multiply to 216, which is 12×1812 \times 18. This identity does not extend directly to three or more numbers, so the calculator combines them two at a time.

Common mistakes

  • Multiplying all the numbers together; this gives a common multiple, but often not the least one.
  • Taking the smallest power of each prime; the LCM needs the largest.
  • Confusing LCM with GCF: the LCM is at least as large as the largest number.
  • Listing multiples of only the largest number and stopping at the first one that is not checked against the others.

Tips

  • If one number is a multiple of all the others, it is the LCM.
  • For coprime numbers the LCM is simply their product.
  • Use the LCM of denominators as the common denominator when adding fractions.
  • Check any LCM by dividing it by each number; every quotient must be a whole number.
  • For two numbers, compute the GCF first; dividing their product by it is often the fastest route.
  • When the numbers are small, list a few multiples of the largest one and test each against the others; the first that works is the LCM.

Frequently asked questions

What is the least common multiple?

It is the smallest positive integer that each number divides evenly. The LCM of 4, 6 and 10 is 60.

How is the LCM related to the GCF?

For two positive integers, their product equals the GCF times the LCM, so lcm⁡(a,b)=abgcd⁡(a,b)\operatorname{lcm}(a,b) = \frac{ab}{\gcd(a,b)}.

When do I need the LCM?

To add or subtract fractions with different denominators, and in problems asking when repeating events next happen together.

What is the LCM if one of the numbers is 0?

Zero is a multiple of every number, but the LCM is defined as the smallest positive common multiple, so by convention lcm⁡(a,0)=0\operatorname{lcm}(a, 0) = 0.

Can the LCM be smaller than the numbers?

No. The LCM is always at least as large as the largest absolute value in the list (unless a 0 is present).

Does the calculator accept negative numbers?

Yes. The sign does not affect multiples, so the LCM is computed from absolute values and reported as a positive number.

How do I find the LCM of three numbers?

Combine them two at a time: lcm⁡(8,12)=24\operatorname{lcm}(8, 12) = 24, then lcm⁡(24,15)=120\operatorname{lcm}(24, 15) = 120. Or take every prime at its largest power: 23×3×5=1202^3 \times 3 \times 5 = 120.

What is the difference between the LCM and the LCD?

The least common denominator is simply the LCM applied to the denominators of fractions. For 512\frac{5}{12} and 718\frac{7}{18} the LCD is lcm⁡(12,18)=36\operatorname{lcm}(12, 18) = 36.

Find a least common multiple

Enter your numbers above to get the LCM with prime factorizations, the GCF shortcut and a check that every number divides it.

More math calculators