Enter your numbers
Add two numbers, or paste a list separated by commas/spaces. Examples: 12, 18 or 6 8 14.
Find the least common multiple (LCM) of two numbers or a whole list — instantly. Includes step-by-step GCD/LCM work, common use cases (fractions, schedules, cycles), and FAQs.
Add two numbers, or paste a list separated by commas/spaces. Examples: 12, 18 or 6 8 14.
The least common multiple (LCM) of two or more integers is the smallest positive integer that is a multiple of every number in the set. In plain English: it’s the first number you hit when you list the multiples of each input and look for the first match.
LCM shows up everywhere: adding fractions, syncing repeating events, working with gear ratios, finding the smallest batch size that fits multiple constraints, and even simple “when do these cycles line up again?” problems. This calculator is built to be fast, accurate, and shareable — paste a list of numbers, hit calculate, and you’ll get: (1) the LCM, (2) the GCF/GCD details used to compute it, and (3) a short step-by-step breakdown.
6, 8, 14 or 6 8 14).For integers a and b (not both zero), the LCM is the smallest positive integer L such that:
For more than two numbers, the LCM generalizes naturally: LCM(a, b, c) = LCM(LCM(a, b), c) and so on. That’s exactly how this page computes the result for lists.
The most common “fast” way to compute LCM for two integers uses the greatest common divisor (GCD), also called the greatest common factor (GCF):
LCM(a, b) = |a × b| / GCD(a, b)
Why does this work? Think of the product a×b. It contains all prime factors of a and all prime factors of b. But the shared factors (the overlap) are counted twice. Dividing by GCD(a, b) removes the duplicate overlap once, leaving you with each prime factor the maximum number of times it appears in either number — which is exactly what LCM is.
To compute the GCD quickly, we use the Euclidean algorithm. It’s based on one simple idea: the GCD of two numbers doesn’t change if you replace the bigger number by the remainder when dividing by the smaller number.
Example: find GCD(48, 18)
So GCD(48, 18) = 6, and then LCM(48, 18) = |48×18| ÷ 6 = 144.
For a list like 6, 8, 14, we compute:
The final LCM is 168 — meaning 168 is the smallest positive number divisible by 6, 8, and 14. This “reduce” approach stays fast even when you input many values.
1) Adding fractions (common denominators)
To add 1/6 + 1/8, you want a denominator that both 6 and 8 divide into.
The smallest is LCM(6, 8) = 24. Convert:
1/6 = 4/24 and 1/8 = 3/24, so the sum is 7/24.
2) Scheduling and cycles
If you water Plant A every 6 days and Plant B every 8 days, both schedules line up every LCM(6, 8) = 24 days.
That’s the next day you’ll water both on the same day.
3) Packaging / batching
You sell items in boxes of 12 and 18. What’s the smallest number of items you can produce so it fills whole boxes of both sizes?
LCM(12, 18) = 36. Produce 36 items and you can pack them as 3 boxes of 12 or 2 boxes of 18 with no leftovers.
4) Music patterns and loops
If one loop repeats every 12 beats and another repeats every 20 beats, the combined “back to the start together” moment happens every LCM(12, 20) = 60 beats.
Another way to find LCM is by prime factorization:
To get the LCM, take each prime at the highest power it appears in either number: 2² and 3² → LCM = 2² × 3² = 4 × 9 = 36.
If you’re trying to simplify a fraction or reduce a ratio, you usually want GCF/GCD, not LCM. If you’re trying to line things up with no leftovers, you usually want LCM.
LCM is the smallest positive number that all your input numbers divide into evenly. If you list multiples of each number, the LCM is the first number that appears on every list.
For two numbers, the fastest method is: LCM(a, b) = |a×b| ÷ GCD(a, b). For more than two numbers, compute LCM step-by-step: LCM(a, b, c) = LCM(LCM(a, b), c).
No. LCM is the same no matter the order. The calculator may show different intermediate steps depending on the order, but the final LCM will match.
Then the LCM is just the larger number. Example: LCM(6, 24) = 24.
No (except when a number is 0). For positive integers, LCM is always at least as large as the largest input.
If any input is 0, the LCM is 0. That’s because 0 is the only multiple of 0.
Yes. The LCM of denominators gives the smallest common denominator you can use to add or compare fractions.
Yes for typical use. It uses the Euclidean algorithm for GCD, which is efficient. Extremely large lists of huge integers can overflow JavaScript’s safe integer range; if you see very large values, keep inputs within safe integer limits.
Quick links to popular tools in this category:
If you know the GCF (greatest common factor) of two numbers, you can get the LCM instantly using: LCM(a, b) = |a×b| ÷ GCF(a, b). This page also supports finding the LCM of multiple numbers.
Share tip: Results look best in a screenshot with Dark Mode on. 🌙
MaximCalculator provides this LCM Calculator for learning and convenience. If you’re using LCM for engineering, finance, or safety-critical work, validate your inputs and confirm results with your own process.