Find the LCM of any list of positive integers — with prime factorisation, related GCD, and full step-by-step working.
Results update live as you type.
Least common multiple
Count
5
numbers entered
GCD
1
greatest common div.
Product
20736
all values multiplied
Prime form
2³ × 3²
LCM as p^k
| Concept | Definition | Example |
|---|---|---|
| Multiple | n, 2n, 3n, … — produced by multiplying | multiples of 4: 4, 8, 12 … |
| Common multiple | A multiple of every input | 12, 24, 36 of (4, 6) |
| Least common multiple | Smallest such common multiple | LCM(4, 6) = 12 |
| Coprime | GCD = 1; LCM = product | LCM(4, 9) = 36 |
| Multiple of one | One value divides all others | LCM(3, 6, 12) = 12 |
The Method
There are two standard ways to compute an LCM. The prime-factorisation method factors each number into primes and takes the maximum exponent of each prime across all inputs. The GCD method uses the identity LCM(a, b) = a × b ÷ GCD(a, b) and the Euclidean algorithm; extend it across three or more numbers by repeatedly applying LCM(a, b, c) = LCM(LCM(a, b), c). This calculator uses both — the prime form for the visual breakdown, the GCD method for speed.
Working for the current input
About This Tool
A least common multiple calculator — sometimes called an LCD calculator when used for fraction denominators — finds the smallest positive integer that is a multiple of every number you enter. Enter any list (two or more) of positive integers and the calculator returns the LCM, along with the related GCD, the prime power form of the LCM, and complete step-by-step working.
The LCM is one of the most useful operations in elementary number theory. It appears when adding or subtracting fractions (the LCM of the denominators is the lowest common denominator), when scheduling repeating events (two buses every 12 and 18 minutes coincide again every LCM(12, 18) = 36 minutes), and in modular arithmetic (the Chinese Remainder Theorem uses LCMs of moduli).
This calculator uses two complementary methods. For each pair it applies LCM(a, b) = a × b ÷ GCD(a, b), where GCD comes from the Euclidean algorithm — fast and exact for any 64-bit integer. For the visual breakdown it also computes the prime factorisation of each input and takes the maximum exponent of each prime — the textbook construction students learn in school.
Use this free LCM calculator for homework, simplifying fractions, finding a common period for cyclical events, or as a sanity check on hand-worked problems. All calculation runs entirely in your browser — no sign-up, no tracking.
Any List of Integers
Up to 30 positive integers separated by commas, spaces, or new lines.
Prime Power Form
LCM shown as a product of prime powers — easy to compare with GCD.
GCD Included
Greatest common divisor is computed alongside — they share a formula.
Step-by-Step Working
Each pairwise step shown explicitly — exactly as you would write it.
100% Free & Private
No account, no tracking — every calculation runs locally in your browser.
Visual Prime Bars
Bar chart shows the exponent of each prime in the final LCM.
One input, instant LCM plus the GCD and prime breakdown.
Enter two or more positive integers, separated by commas, spaces, or new lines. The calculator strips zeros and non-integers automatically.
The headline number is the least common multiple. The line below shows the LCM(...) expression so you can paste it directly into an answer.
The GCD stat tile shows the greatest common divisor of the same inputs — useful as a cross-check (LCM × GCD = product for two numbers).
The prime power form (e.g. 2³ × 3²) is the canonical fingerprint of the LCM — useful for comparing with the GCD.
The bar chart shows the exponent of each prime in the LCM. Tall bars indicate a prime that appears with a high multiplicity in one of the inputs.
The formula card lower on the page shows every pairwise LCM step, exactly as you would write it on paper for a hand-worked answer.
Everything you need to know about LCMs, GCDs, and how to interpret the result.
The least common multiple (LCM) of two or more positive integers is the smallest positive integer that is a multiple of each of them. For example, LCM(4, 6) = 12 because 12 is divisible by both 4 and 6, and no smaller positive integer is.
For two integers, LCM(a, b) × GCD(a, b) = a × b. This identity is enormously useful: once you have one, you can compute the other with no extra factorisation. For more than two numbers the relationship doesn't extend directly, but the per-pair identity still works because LCM(a, b, c) = LCM(LCM(a, b), c).
If GCD(a, b) = 1 the numbers are coprime and LCM(a, b) = a × b. Example: LCM(4, 9) = 36, because 4 and 9 share no prime factors. This is the "biggest" possible LCM relative to the inputs.
LCMs let you add fractions by finding the lowest common denominator (1/4 + 1/6 → /12), schedule recurring events (two cycles every 4 and 6 days coincide every 12 days), and solve modular arithmetic via the Chinese Remainder Theorem. They are also at the heart of computer-music timing, gear ratios, and many number-theory problems.
The fastest practical method uses the Euclidean algorithm for GCD, then LCM(a, b) = a × b / GCD(a, b). For three or more numbers, fold the operation: LCM(a, b, c, …) = LCM(LCM(a, b), c, …). This avoids any explicit factorisation and works in O(log min(a, b)) time per pair.
If p is prime and n is any positive integer, then LCM(p, n) equals n if p divides n, and p × n otherwise. So LCM(5, 30) = 30 (because 5 divides 30) but LCM(7, 30) = 210.
LCM(1, 2, …, n) grows roughly like en (a result related to the prime number theorem). LCM(1..10) = 2520 but LCM(1..20) is already 232,792,560. This is why fraction problems with many small denominators can produce surprisingly large common denominators.
No. The LCM is always greater than or equal to the largest input, because the LCM must itself be a multiple of every input — including the largest. Equality occurs when the largest input is already divisible by every other input (e.g. LCM(3, 6, 12) = 12).
By convention LCM(0, n) is undefined (or sometimes defined as 0). Zero has every integer as a "divisor" but no positive multiple. This calculator ignores zeros and non-integers in your input.