Sigma Calculator — 543+ Free Calculator Tools
Find the least common multiple of two numbers instantly — with the GCF shown.
Enter any two whole numbers. The calculator first finds their greatest common factor with the Euclidean algorithm, then divides the product of the numbers by that GCF — the result is the least common multiple.
Formula
LCM(a, b) = |a × b| ÷ GCF(a, b). Example: LCM(12, 18) → GCF is 6 → (12 × 18) ÷ 6 = 216 ÷ 6 = 36.
The least common multiple is the meeting point of two rhythms: the first moment when cycles of different lengths align. It tells you when two buses on different schedules arrive together, what denominator lets you add two fractions, and how gears with different tooth counts mesh. This guide shows you how to use the calculator above, explains what the LCM really is, demonstrates the prime factorization method with two fully worked numerical examples, solves the classic pair 12 and 18 three ways, applies the LCM to adding fractions, and flags the five mistakes people make most often.
Follow these steps to find the least common multiple of two numbers with the calculator above:
Tip: the calculator accepts large values, so you can use it for numbers with six or more digits where listing multiples by hand would be hopeless. The prime factorization section explains the fast method the tool uses internally.
Before you trust any result, double-check that you entered whole numbers. The LCM is defined for integers; decimal inputs do not have a least common multiple in the usual sense. If your problem involves decimals, scale them to integers first and interpret the result accordingly.
The least common multiple (LCM) of two integers is the smallest positive integer that is a multiple of both. A multiple of a number is the product of that number with an integer: the multiples of 12 are 12, 24, 36, 48, 60, …. A common multiple of two numbers is a multiple of both: the common multiples of 12 and 18 are 36, 72, 108, …. The least of these, 36, is the LCM.
Every pair of positive integers has infinitely many common multiples (all multiples of their product, for instance), so the LCM always exists. The LCM can never be smaller than the larger of the two numbers; LCM(6, 18) = 18 because 18 is already a multiple of 6. When the numbers are coprime (sharing no prime factors, GCF = 1), the LCM is simply their product — for example, LCM(7, 11) = 77.
The LCM has a clean description through prime factorization. Write each number as a product of primes, then for every prime appearing in either, take the larger exponent. For 12 = 2² × 3 and 18 = 2 × 3², the primes are 2 (larger exponent 2) and 3 (larger exponent 2), so LCM = 2² × 3² = 4 × 9 = 36. This maximum-exponent rule mirrors the GCF’s minimum-exponent rule — and the two are linked by the identity LCM(a, b) × GCF(a, b) = a × b.
The concept extends to three or more numbers by folding: LCM(12, 18, 20) = LCM(LCM(12, 18), 20) = LCM(36, 20) = 180. Check: 36 = 2² × 3² and 20 = 2² × 5, so the LCM takes 2² × 3² × 5 = 180, which is divisible by 12 (180/12 = 15), 18 (180/18 = 10), and 20 (180/20 = 9).
A useful intuition: the LCM measures when cycles coincide. If one traffic light cycles every 12 seconds and another every 18 seconds, they synchronize every LCM(12, 18) = 36 seconds. If one machine needs servicing every 12 days and another every 18 days, joint servicing falls every 36 days. Whenever a problem asks “when do they next coincide,” the answer is an LCM.
The prime factorization method finds the LCM by taking, for each prime, the highest power dividing either number. It needs no GCF computation and reveals the multiplicative structure directly.
Worked example 1 — LCM(12, 18).
Verify by the GCF method: GCF(12, 18) = 2 × 3 = 6, and (12 × 18) / 6 = 216 / 6 = 36. Both routes agree — these are the calculator’s defaults, so you can confirm the tool with inputs 12 and 18.
Worked example 2 — LCM(21, 6).
Check: multiples of 21 are 21, 42, 63, …; multiples of 6 are 6, 12, 18, 24, 30, 36, 42, …; the first common value is 42. Via GCF: GCF(21, 6) = 3, and (21 × 6) / 3 = 126 / 3 = 42. The two methods corroborate each other.
Why does the maximum-exponent rule work? Any common multiple must contain at least as many copies of each prime as either number has — otherwise it could not be divisible by that number. Taking exactly the maximum for each prime builds the smallest number satisfying all these requirements simultaneously.
Let us solve LCM(12, 18) = ? completely, using three methods side by side.
Method A — prime factorization (maximum exponents). 12 = 2² × 3; 18 = 2 × 3². Take 2² × 3² = 4 × 9 = 36.
Method B — GCF formula. LCM(a, b) = (a × b) / GCF(a, b). First find GCF(12, 18) = 6 (12 = 2² × 3, 18 = 2 × 3², minimum exponents 2¹ × 3¹ = 6). Then (12 × 18) / 6 = 216 / 6 = 36.
Method C — listing multiples. Multiples of 12: 12, 24, 36, 48, 60. Multiples of 18: 18, 36, 54, 72. The first shared value is 36.
All three agree on 36. Listing works for small numbers but scales poorly — for LCM(1071, 462) you would list hundreds of multiples, while prime factorization gives 2 × 3 × 7 × 11 × 17 = 23,562 almost immediately (1071 = 3³ × 7 × 17? let us verify: 1071 = 3 × 357 = 3 × 3 × 119 = 3² × 7 × 17; 462 = 2 × 231 = 2 × 3 × 77 = 2 × 3 × 7 × 11; maxima give 2 × 3² × 7 × 11 × 17 = 2 × 9 × 7 × 11 × 17 = 23,562). A concrete reading: two gears with 12 and 18 teeth realign every 36 tooth-steps.
The most common use of the LCM is finding the least common denominator for adding or subtracting fractions.
Example 1. Compute 1/12 + 1/18. LCM(12, 18) = 36, so convert: 1/12 = 3/36 and 1/18 = 2/36. Sum: 3/36 + 2/36 = 5/36. Using the least denominator keeps numbers small; any common multiple (like 216) would work but forces messier arithmetic.
Example 2. Compute 5/12 − 1/18. With denominator 36: 5/12 = 15/36 and 1/18 = 2/36. Difference: 15/36 − 2/36 = 13/36. Check: 13/36 ≈ 0.3611, while 5/12 ≈ 0.4167 and 1/18 ≈ 0.0556, and 0.4167 − 0.0556 = 0.3611. The arithmetic is consistent.
Why the least common denominator? Any common multiple works as a denominator, but the LCM minimizes the size of the converted numerators, reducing arithmetic errors and often delivering the answer already in lowest terms (5/36 and 13/36 are both fully reduced since their GCFs are 1).
Keep working with these companion tools: the GCF Calculator for the greatest common divisor — the LCM’s partner, linked by LCM(a, b) × GCF(a, b) = a × b — and the Fraction Calculator for arithmetic with the fractions you combine over common denominators. Browse the full collection in our Math Calculators hub.
This page provides a least common multiple (LCM) calculator for two positive integers. Methods: prime factorization with maximum exponents; LCM(a, b) = (a × b) / GCF(a, b). Verified examples: LCM(12, 18) = 36 (GCF 6); LCM(21, 6) = 42 (GCF 3); LCM(12, 18, 20) = 180. Fraction addition: 1/12 + 1/18 = 5/36; 5/12 − 1/18 = 13/36 via denominator 36. Identities: LCM(a, b) × GCF(a, b) = a × b; LCM(a, b) ≥ max(a, b); coprime numbers give LCM = product.
The smallest positive integer divisible by both numbers. For 12 and 18 it is 36 — the first number appearing in both times tables.
Divide the product of the two numbers by their GCF. The calculator above shows both the GCF and the final LCM.
Finding common denominators when adding fractions, scheduling repeating events (when two cycles line up), and gear-ratio problems.
Their product — primes share no factors, so nothing smaller than a × b is divisible by both.
The LCM is the smallest number both divide into; the GCF is the largest number dividing both. They satisfy GCF × LCM = a × b.
No. The LCM is a multiple of both numbers, so it must be at least as large as the larger one — LCM(a, b) ≥ max(a, b) always. The smallest possible LCM is the larger number itself, which happens when the larger is already a multiple of the smaller, e.g., LCM(6, 18) = 18. If a computation returns less than an input, you have found the GCF by mistake.
Fold the pairwise LCM: LCM(a, b, c) = LCM(LCM(a, b), c). For example, LCM(12, 18, 20): first LCM(12, 18) = 36, then LCM(36, 20) = 180. Check by prime factorization: 36 = 2² × 3² and 20 = 2² × 5, so taking maximum exponents gives 2² × 3² × 5 = 180, which is divisible by 12 (180/12 = 15), 18 (180/18 = 10), and 20 (180/20 = 9).
Look at prime exponents: for each prime, the GCF takes the minimum exponent and the LCM takes the maximum, and min + max equals the sum of the two exponents — exactly the exponent in a × b. For 12 = 2² × 3 and 18 = 2 × 3²: GCF = 2¹ × 3¹ = 6 (minimums), LCM = 2² × 3² = 36 (maximums), and 6 × 36 = 216 = 12 × 18. This identity lets you compute either one from the other.
Sources: All factorizations and LCM computations were verified with the calculator above.
Also try our GCF Calculator and Fraction Calculator — or browse all Math Calculators.