The least common multiple of two to six numbers, with the prime table that produces it.
Who this is for: The denominator to add those fractions over.
Least common multiple
Highest power of every prime.
Two to six whole numbers. Commas work as well as new lines.
LCM(4, 6)
12
2² × 3 — every prime that appears, to its highest power.
As primes
2² × 3
highest power of each
Their product
24
2× larger than needed
Greatest common factor
2
the overlap the product double-counts
Folded in
1 step
pairwise — the answer does not depend on the order
The prime table
Each prime with the power it reaches in every input, and the highest of those
Prime
4
6
Take
2
2
1
2
3
—
1
1
A dash means that number does not contain the prime at all — a power of zero. The rule is still the same: take the highest, and zero never wins.
Or just count multiples
The first several multiples of each number, with the least common one highlighted
4×
4, 8, 12, 16, 20, 24, 28, 32, 36, 40, 44, 48, …
6×
6, 12, 18, 24, 30, 36, 42, 48, 54, 60, 66, 72, …
Counting multiples of 6 would have found it on step 2 — which is why the naive method is fine on numbers this size.
What it is usually for
Adding fractions with denominators 4 and 6 needs 12 underneath, not 24. Using the product works but leaves an answer that then has to be reduced by 2.
4 × 6 = 24, and 2 × 12 = 24 — the same number. For a pair, the greatest common factor times the least common multiple is the product, which is why finding one gives the other for free.
Multiplying them all gives 24, which is 2× larger than it needs to be. The overlap is what the greatest common factor measures — 2 here.
The prime table and the pairwise fold are computed separately and give the same number.
What this tool shows
Every prime that appears anywhere, taken to its highest power. The page also says how many multiples you would have had to count to reach the same answer — which is the argument for not counting.
The least common multiple of two to six numbers
The prime table, with every power shown
The first multiples of each, with the answer marked
How far counting would have had to go
Why the product is usually too big
The denominator it gives for adding fractions
Highest power of every prime Multiples listed too Up to six numbers What adding those fractions needs
Exact integer arithmetic, computed through the divisor.
Updated 7 September 2026 · Works in any browser, no installation
The least common multiple is the smallest number that every one of your numbers divides into. Find it by writing each as primes and taking every prime that appears anywhere, raised to the HIGHEST power it reaches. 12 is 2² × 3 and 18 is 2 × 3², so the answer is 2² × 3² = 36 — not 216, which is what multiplying them gives.
At a glance
Formula shown
lcm(a, b) = a × b ÷ gcd(a, b). By primes: the product of every prime appearing in any input, raised to the highest power it reaches. For three or more, fold pairwise.
Scenario support
Finding the denominator to add fractions over; working out when two repeating cycles coincide again; scheduling two events that recur on different intervals.
The prime table
Write each number in primes, then build a table: one row per prime that appears ANYWHERE, one column per number, and the power that prime reaches in each.
For 12 and 18 the table has rows for 2 and 3. Under 12 they are 2 and 1; under 18, 1 and 2. Take the larger of each pair — 2 and 2 — and the answer is 2² × 3² = 36.
A dash in the table means the number does not contain that prime at all, which is a power of zero. That case is what makes the rule look arbitrary when it is only stated in words: zero never wins a comparison for the highest, so a prime only one number has still goes into the answer at full strength.
Why not just multiply them
Multiplying the numbers always gives A common multiple. It is just usually not the least one, and being wrong by a factor is a real cost.
12 × 18 = 216, which is six times larger than 36. That six is exactly their greatest common factor — the overlap that the product counts twice. Divide it out and you have the least common multiple, which is the identity the whole calculation rests on.
The one case where multiplying IS right is when the numbers share no factor. 7 and 13 have a greatest common factor of 1, nothing overlaps, and 91 is genuinely the least common multiple.
Counting multiples, and its limit
The definition suggests the method: write out the multiples of each and look for the first one they have in common. For 4 and 6 it works instantly — 4, 8, 12 and 6, 12 — and 12 is the answer.
It is also correct and completely impractical past small numbers. This page says how many steps it would have taken on your inputs: for 360 and 1050 you would have counted thirty-five multiples of 1050 before reaching 12600.
Worth knowing rather than dismissing. Counting is what makes the definition concrete, and the prime table is what makes it usable — and seeing the cost of the first is the honest argument for the second.
The mirror of the greatest common factor
These two questions use the same table and opposite instructions, which is the neatest thing about them.
What do they share? Only primes present in EVERY number, each to its LOWEST power. That is the greatest common factor.
What covers them all? Every prime present in ANY number, each to its HIGHEST power. That is the least common multiple.
Multiply the two answers together for a pair and you get the product of the numbers, because every prime has been taken once at its lower power and once at its higher — which is exactly once in each number.
Adding fractions is the real use
Most people arrive here because of fractions. Adding thirds to quarters needs a common denominator, and the least common multiple of 3 and 4 is 12.
Using the product instead works and costs a reduction afterwards. 1/12 + 1/18 over 216 gives 30/216, which then reduces to 5/36 — and on a marked page a reduction that was never necessary looks exactly like a mistake that got caught.
The Fraction Calculator does the whole job and shows this step inside it. This page is for when the denominator itself is the question.
Buses, gears and repeating cycles
Anything that repeats on a fixed interval meets anything else that repeats on a fixed interval at their least common multiple.
Two buses leaving together, one every 12 minutes and one every 18, next leave together after 36 minutes. Two gears with 12 and 18 teeth return to their starting alignment after 36 teeth have passed — three turns of one and two of the other.
The same argument sizes a repeating pattern: a sequence with period 12 laid against one with period 18 does not repeat as a pair until 36. It is why the answer matters in scheduling, animation timing and anything built on cycles.
Sources and methodology
The least common multiple is settled mathematics; these set out the sequence and the conventions.
Method. The multiple is folded pairwise as a ÷ gcd(a, b) × b, dividing before multiplying so no intermediate is larger than it needs to be. Separately every input is factorised and each prime is taken to the highest power it reaches anywhere; the two results must agree. The multiples table is generated only when the numbers are small enough for it to be readable, and the counting cost is stated in every case. That engine is verified on every change against 64 hand-written assertions, including that the answer is divisible by every input and that gcd × lcm equals the product for every pair up to 120 × 120. The count and the per-case breakdown are published on the formula verification page.
Related calculators
Where this goes next:
GCFThe greatest common factor of two to six numbers with all three routes shown — the shared primes to their lower powers, Euclid line by line, and the full factor lists when they are short enough to be honest.
FractionAdd, subtract, multiply and divide fractions and mixed numbers exactly, with the least common denominator chosen, the cross-cancelling done first, and the true repeating decimal beside the answer.
Prime FactorizationBreak any number into primes with the division ladder shown, the number of trial divisions reported, and the argument for why the search can stop at the square root.
Simplify FractionsReduce a fraction to lowest terms with both routes to the divisor shown side by side — Euclid line by line and the shared primes — and a stated proof when nothing can be cancelled.
Comparing FractionsOrder up to eight fractions with all three methods shown on your own numbers, and a figure for how many decimal places the closest pair need before they stop looking equal.
FactorEvery factor of a number listed in the pairs that generate them, with the count derived from the prime exponents and separately checked against the list.
The mirror question — what these numbers share rather than what covers them — is the GCF Calculator, and for a pair each answer determines the other. If the reason you are here is adding fractions, the Fraction Calculator does the whole job and shows this step inside it.
Educational use disclaimer
This is an educational tool. The multiple is exact and computed through the greatest common divisor rather than by counting, but the presentation follows one common teaching order.
Published the LCM page as the mirror of the GCF page: same prime table, opposite instruction — highest power rather than lowest.
A prime one number lacks entirely is shown as a dash rather than omitted, because that case is what makes the highest-power rule look arbitrary when it is only stated in words.
The page reports how many multiples counting would have taken on the reader's own numbers, which is the honest argument for using the table instead.
Add this calculator to your site
Responsive embed — and private: nothing your visitors type leaves their browser.