Skip to main content

Primes and pairing

Least Common Multiple Calculator: LCM with Steps

This calculator returns the least common multiple (LCM) of comma-separated positive integers. Choose prime factorization, brute-force multiples, or the greatest common factor (GCF) shortcut LCM(a,b) = (a×b)/GCF with stepped work in the on-page panel. Three or more values fold pairwise. Positive integers only; runs locally in your browser.

By Jeff Beem

Updated

Numbers

Comma-separated positive integers. The headline result is the smallest number divisible by every entry.

Positive integers only. Non-numeric characters are ignored. Zero and negatives are invalid.

Result
Least Common Multiple (LCM)72

Smallest positive integer that is a multiple of all given numbers.

Show your work

Each number as a product of primes. The LCM is the product of the highest power of each prime that appears in any number.

  • 12=2^2 × 3
  • 18=2 × 3^2
  • 24=2^3 × 3

LCM (max exponent per prime):2^3 × 3^2 = 72

How to use this calculator

Enter comma-separated positives in Numbers (default 12, 18, 24). Pick a method in the dropdown; read the headline LCM in the dark results card and matching steps under Show your work.

Reading your LCM result

The dark results card is the headline LCM; the method dropdown changes how Show your work explains it.

Example: default list → LCM(12, 18, 24) = 72

Input 12, 18, 24. Prime view: 12 = 2² × 3, 18 = 2 × 3², 24 = 2³ × 3 → 2³ × 3² = 72. Brute force lists multiples until 72 appears in every row. GCF view: LCM(12, 18) = 216/6 = 36, then LCM(36, 24) = 864/12 = 72.

When to switch calculation methods

Brute force in Show your work lists every multiple up to the headline LCM; on large inputs that list grows quickly. Switch the dropdown to Prime factorization or GCF formula for the same headline number with shorter steps. Coprime pairs (no shared factors) have LCM equal to the product; shared primes shrink the LCM below that product.

Least common multiple calculator with steps

Returns the LCM of comma-separated positive integers with prime, brute-force, or GCF-formula steps in the work panel. Positive integers only; runs locally.

What this calculator does

The widget reads the comma-separated Numbers field and prints the headline LCM on the dark results card. The Calculation method dropdown (prime, brute force, or GCF formula) selects how Show your work explains that same value. Three or more inputs fold pairwise. No fractions inside the LCM call, no negatives, and no fraction addition after the result.
  • Prime method:
    LCM=pimax(e1,i,e2,i,)\mathrm{LCM}=\prod p_i^{\,\max(e_{1,i},\, e_{2,i},\, \ldots)}
  • Two-number GCF shortcut:
    LCM(a,b)=abGCF(a,b)\mathrm{LCM}(a,b)=\frac{|a\,b|}{\mathrm{GCF}(a,b)}
  • Three or more:
    LCM(a,b,c)=LCM(LCM(a,b),c)\mathrm{LCM}(a,b,c)=\mathrm{LCM}(\mathrm{LCM}(a,b),c)

GCF cross-check

For two positive inputs, LCM(a,b)×GCF(a,b)=ab\mathrm{LCM}(a,b)\times \mathrm{GCF}(a,b)=|a\,b|. On the default first pair 12 and 18, the headline LCM is 36 and the GCF-formula trace shows GCF = 6; 36 × 6 = 216 = 12 × 18. Select GCF formula in the calculation method dropdown to read each pairwise step for longer lists.

Limits

Positive whole numbers only. Large inputs make brute-force lists long; use prime or GCF formula for big values. Coprime pairs have LCM equal to the product. Results stay within JavaScript safe integer range.

Least Common Multiple Calculator FAQ

What is the LCM of 12 and 18?

Enter 12, 18. The results card shows 36. Prime view: 12 = 2² × 3, 18 = 2 × 3² → 2² × 3² = 36. Check: 36 ÷ 12 = 3 and 36 ÷ 18 = 2.

What is the LCM of 12, 18, and 24?

Default input 12, 18, 24 returns 72. Prime view: 2³ × 3² = 72. Pairwise chain: LCM(12, 18) = 36, then LCM(36, 24) = 72. Select GCF formula for the full stepped trace.

Is LCM the same as LCD?

For fractions, the lowest common denominator equals the LCM of the denominators. Denominators 4 and 6 → enter 4, 6 → LCM 12 (twelfths for 1/4 + 1/6). This page returns the integer LCM only; it does not add or reduce fractions.

How does prime factorization find LCM here?

Select Prime factorization. The work panel writes each input as primes, takes each prime at the highest exponent across the list, and multiplies those powers for the headline LCM.

Can you find LCM of three or more numbers?

Yes. Comma-separated positives fold left to right: LCM(a, b, c) = LCM(LCM(a, b), c). The parser strips non-digits, skips zero, and drops duplicates.

How is LCM related to GCF on this page?

For two positives, LCM(a,b)=abGCF(a,b)\mathrm{LCM}(a,b)=\frac{a\,b}{\mathrm{GCF}(a,b)}. Select GCF formula to read each pairwise GCF and product line (e.g. GCF(12, 18) = 6 inside the LCM(12, 18) = 36 step).

Do all three methods always agree?

Yes. Prime, brute force, and GCF formula are different explanations of the same headline LCM. The method dropdown only changes the work panel.

What appears in Show your work for each method?

After you enter numbers, the white panel under the results card follows the Calculation method dropdown. Prime factorization lists each input as primes plus LCM (max exponent per prime). Brute force (multiples) prints multiples of each number through the headline LCM. GCF formula shows pairwise lines such as LCM(12, 18) = (12 × 18) / GCF(12, 18) = 216 / 6 = 36, then chains to the next value.

Why only positive integers?

Schoolbook LCM is defined on positive integers. With no valid input the results card shows Enter numbers to see LCM.

Mathematical Reference Note

Calculation Logic: This tool uses standard mathematical algorithms. While we strive for accuracy, errors in logic or user input can result in incorrect data.

Verification: Results should be cross-checked if used for important academic, professional, or personal calculations.

Standard Terms: This tool is provided free of charge and as-is. CalcRegistry provides no warranty regarding the accuracy or fitness of these results for your specific needs.

© 2026 CalcRegistry Reference Last System Check: July 2026Free Online Utility Tools