calculateCalculopedia
search
tag

LCM Calculator (Least Common Multiple)

The LCM calculator finds the smallest number that is a multiple of both inputs, using the relationship LCM(a,b) = |a×b| ÷ GCD(a,b).

verified_userReviewed by the Calculopedia editorial teamLast updated 2026-08-15

Embed on your site

Embed this calculator on your site:

<iframe src="https://calculopedia.darzh.xyz/embed/lcm-calculator/" width="100%" height="700" style="border:0;border-radius:12px" loading="lazy"></iframe>

quizExample

How this calculator works, with real numbers (no JavaScript needed):

Inputs

First number
4
Second number
6

Results

LCM
12
Steps
GCD(4, 6) = 2 LCM = |4 × 6| ÷ 2 = 12

functionsThe formula

LCM(a,b) = |a × b| ÷ GCD(a,b). First find the GCD, then divide the product by it.

The Least Common Multiple (LCM) — sometimes the "lowest common multiple" — is the smallest positive number that both inputs divide into evenly. For 4 and 6, the multiples of 4 run 4, 8, 12, 16… and of 6 run 6, 12, 18, 24…; the first number in both lists is 12, so LCM(4, 6) = 12.

The formula

LCM(a, b) = |a × b| ÷ GCD(a, b)

Instead of listing multiples, multiply the two numbers and divide by their GCD (the HCF). The division removes exactly what the two numbers share, leaving the smallest multiple both can divide.

Worked example: LCM(4, 6)

  1. Find GCD(4, 6) = 2.
  2. LCM = |4 × 6| ÷ 2 = 24 ÷ 2 = 12.

Check: 12 ÷ 4 = 3 and 12 ÷ 6 = 2 — both clean, no remainder. The calculator narrates each step of the GCD chase so the reasoning can be audited.

Where the LCM shows up

  • Adding fractions — to sum 1/4 + 1/6 the smallest shared denominator is LCM(4, 6) = 12, giving 3/12 + 2/12 = 5/12. A larger common denominator works, but the LCM keeps every intermediate number as small as possible.
  • Scheduling — one event every 4 days, another every 6: they coincide every 12 days. Buses on 8- and 12-minute loops sync at LCM(8, 12) = 24 minutes.
  • Gears and wheels — a 4-tooth gear and a 6-tooth gear realign every 12 teeth of relative travel.
  • Patterns and cycles — any two repeating cycles meet at their LCM, whether it's lights, production lines or planetary conjunctions.

The GCD connection

HCF and LCM are mirror images: the HCF is the largest shared factor, the LCM the smallest shared multiple, and for any two numbers:

HCF × LCM = a × b

2 × 12 = 24 = 4 × 6 ✓

A direct consequence: if the two numbers are coprime (HCF = 1), the LCM is simply their product. LCM(4, 9) = 36, because 4 and 9 share no factor to strip out.

Why the formula works

Every common multiple of a and b divides the product a × b, so the product is certainly a common multiple — but whenever the numbers share factors it is too big. Dividing the product by the GCD removes the double-counted region, and what remains is the smallest positive number both can divide. Multiplying first and forgetting the GCD is the single most common way to double (or worse) the true LCM.

Beyond two numbers

This tool takes two inputs. For a longer set, chain the result: LCM(a, b, c) = LCM(LCM(a, b), c). Each added number can only keep the LCM unchanged or grow it — it never shrinks.

Common mistakes

  • Multiplying before finding the GCD — LCM(4, 6) as 24 is double the true answer.
  • Accepting a result that does not divide evenly by both inputs — the LCM must be divisible by each original number (18 fails the test for 4).
  • Confusing "both numbers divide into it" with "it divides both numbers" — the LCM is a shared multiple, not a shared factor.
  • Forgetting that the LCM of two numbers always equals at least the larger of the two.

Where it does real work

Fraction cleaning in everyday arithmetic, roster and shift planning, gear-ratio and timing alignment in engineering, and any problem about repeated events realigning — the LCM is the piece of pure number theory almost everyone uses without knowing its name.

helpFrequently asked questions

question_markWhat is LCM?

The Least Common Multiple is the smallest number that both numbers divide into evenly. For 4 and 6, the LCM is 12.

question_markHow do I calculate LCM?

Use the formula: LCM(a,b) = |a×b| ÷ GCD(a,b). First find the GCD using the Euclidean algorithm, then divide the product by it.

question_markWhy is LCM useful for fractions?

To add or subtract fractions, you need a common denominator. The LCM of the denominators gives you the smallest common denominator.

view_quiltYou might also need