Calculators

LCM Calculator

By Talcart · Last updated July 10, 2026

Math

LCM Calculator

An LCM calculator finds the smallest positive integer that every number you enter divides into evenly - the LCM of 4 and 6 is 12, and the LCM of 6 and 8 is 24. It accepts two or more integers and shows the computation, making it the fast route to common denominators, repeating schedules, and gear-ratio problems.

Key facts

  • The smallest number evenly divisible by every integer from 1 to 20 is lcm(1..20) = 232,792,560.
  • Two consecutive integers are always coprime, so lcm(n, n+1) = n x (n+1) - for example, lcm(20, 21) = 420.
  • The identity gcf(a, b) x lcm(a, b) = a x b holds for any two positive integers, letting the LCM be computed in O(log n) time via the Euclidean algorithm.

What is the LCM Calculator?

The least common multiple (LCM) of a set of integers is the smallest positive integer that is a multiple of every number in the set. Multiples of 4 run 4, 8, 12, 16... and multiples of 6 run 6, 12, 18...; the first value on both lists is 12, so lcm(4, 6) = 12. The LCM is never smaller than the largest input and never larger than the product of all inputs. It underpins adding fractions (as the least common denominator), synchronizing repeating cycles, and solving modular-arithmetic problems.

How does the LCM Calculator work?

Rather than listing multiples, the calculator uses the identity lcm(a, b) = a x b / gcf(a, b), computing the GCF with the fast Euclidean algorithm. For 4 and 6: gcf = 2, so lcm = 24 / 2 = 12. With more inputs it folds pairwise - lcm(a, b, c) = lcm(lcm(a, b), c) - so lcm(10, 15, 25) = lcm(30, 25) = 150. Equivalently, in prime-factorization terms, the LCM takes each prime at its highest power across the inputs: for 12 = 2^2 x 3 and 18 = 2 x 3^2, that gives 2^2 x 3^2 = 36.

What is the LCM Calculator formula?

lcm(a,b) = (a × b) / gcf(a,b)
  • gcf – greatest common factor

Worked LCM examples

NumbersGCFLCM
4, 6212
3, 5115
6, 8224
9, 12336
12, 18636
7, 21721
10, 15, 255150
2, 3, 4, 5160

How do you use the LCM Calculator?

  1. Enter two or more integers.
  2. Read the LCM.

Worked example

Scenariolcm(4, 6)
Calculation4 × 6 / gcf(4,6) = 24 / 2
ResultLCM = 12.

Common use cases

Common denominators
Scheduling overlapping events
Number-theory proofs

Tips & best practices

LCM grows quickly — multiply numbers can exceed 32-bit range, so use big-number math when needed.

Frequently asked questions

The LCM of 4 and 6 is 12. Multiples of 4 are 4, 8, 12, 16...; multiples of 6 are 6, 12, 18...; the smallest number on both lists is 12. By formula: lcm(4, 6) = 4 x 6 / gcf(4, 6) = 24 / 2 = 12. Note 24 is also a common multiple, just not the least one.

Multiply the two numbers and divide by their greatest common factor: lcm(a, b) = a x b / gcf(a, b). For 12 and 18: the GCF is 6, so lcm = 216 / 6 = 36. This is far faster than listing multiples for large numbers, because the GCF comes from the Euclidean algorithm in only O(log n) steps.

The LCM of two distinct primes is their product, because they share no factors: lcm(3, 7) = 21 and lcm(11, 13) = 143. If the two primes are the same, the LCM is just that prime: lcm(7, 7) = 7. More generally, whenever two numbers are coprime (GCF of 1), their LCM equals their product.

No. The LCM must be a multiple of every input, and no positive multiple of a number is smaller than the number itself, so the LCM is always at least the largest input. It equals the largest input exactly when every other number divides it - for example, lcm(7, 21) = 21 because 21 is already a multiple of 7.

The LCM of 6 and 8 is 24. Using the formula: gcf(6, 8) = 2, so lcm = 6 x 8 / 2 = 48 / 2 = 24. Checking by lists: multiples of 6 are 6, 12, 18, 24...; multiples of 8 are 8, 16, 24...; they first meet at 24. The naive guess of 6 x 8 = 48 is a common multiple, but not the least.

Any time repeating cycles need to line up. If one bus departs every 12 minutes and another every 18, both leave together every lcm(12, 18) = 36 minutes. The same logic schedules machine maintenance, blinking traffic signals, and planetary alignment models - and in arithmetic, the LCM of denominators is exactly the least common denominator for adding fractions.