CalcUnit Logo

LCM Calculator

What is the LCM Calculator?

What this calculator does

Give it two whole numbers and this page returns their least common multiple, the smallest number that both of them divide into exactly. It also shows their greatest common divisor on its own line, because that GCD is the working part the LCM is built from. Both results are whole numbers.

Its place in the GCD family

Honest scope: this page belongs to a family of siblings on this site that share one gcd engine. The Gcd Calculator returns the GCD, the LCM, and a product check, and the GCF Calculator returns the GCF with an LCM beside it. This page headlines the LCM and shows the GCD as its helper.

Same answers from every sibling

For positive whole numbers, all three family pages agree to the digit. The default pair here, 12 and 18, returns GCD 6 and LCM 36 on this page, and the GCD page reports the same pair of values for the same inputs. Pick the sibling whose headline matches the number you came for.

How the siblings actually differ

The differences are trimmings, not engines. This page and the GCF page constrain fields to whole numbers of 1 or more and derive the LCM as the product divided by the GCD. The GCD page leaves fields unconstrained, wraps entries in absolute values, uses a built-in lcm call, and adds a product-check line.

The two inputs it asks for

Number A opens at 12 and Number B at 18. Both fields carry a minimum of 1 and a step of 1, quietly announcing that this tool eats whole numbers only. There are exactly two fields: a third number has to wait for a second run, chained by hand as shown below.

Reading the two result lines

GCD (a, b) shows the greatest common divisor of your pair, labeled honestly as an intermediate. LCM (a, b) shows the headline answer. If you only need the multiple, the second line is yours; the first line earns its place when you audit the result or simplify a fraction next.

Worked example: the page default

For 12 and 18, the GCD is 6 and the LCM is 36. The audit is automatic: 12 times 18 is 216, and 216 divided by the GCD of 6 gives 36. Multiples confirm it from the other direction: 36 is the first number appearing in both the 12 list and the 18 list.

Worked example: a coprime pair

Enter 7 and 5. The GCD is 1, because the two share no factor at all, and the LCM is 35, simply their product. When the GCD line reads 1, the LCM is always just the two numbers multiplied; nothing overlaps, so nothing can be discounted from the product.

Worked example: round numbers

Enter 100 and 75. The GCD is 25 and the LCM is 300. Big shared factors pull the LCM below the product of 10,000: three hundred is the landing spot common to the 100 row and the 75 row of the times table, and the GCD of 25 is the discount that gets you there.

Worked example: 24 and 36

Enter 24 and 36. The GCD is 12 and the LCM is 72. Prime factors show why: 24 is 2 cubed times 3, and 36 is 2 squared times 3 squared. Taking the highest power of each prime, 2 cubed times 3 squared, rebuilds 72 exactly, with no factor counted twice or missed.

The formula: product over GCD

The page computes the LCM as the absolute product of the two numbers divided by their GCD. The reasoning is one line long: multiplying the numbers counts their shared factors twice, and dividing by the GCD removes exactly one copy. What survives is the smallest multiple both numbers divide into.

Method two: prime factorization by hand

Break both numbers into prime factors, then take every prime at the highest power it appears with in either breakdown, and multiply those together. It is slower than the formula for big numbers but shows its work, which is why classrooms teach it first and why it catches formula slips.

Method three: listing multiples by hand

Write out multiples of the larger number and test each against the smaller. For 12 and 18, the 18 row runs 18, 36: the second entry already divides by 12, so the LCM is 36. Listing is foolproof for small numbers and hopeless for large ones, where the formula earns its keep.

When the LCM is just the bigger number

If one number divides the other exactly, the LCM is the larger one and no work remains. Five and 20 give an LCM of 20, because 20 is already a multiple of 5. Spotting this case in word problems, like one bus route nesting inside another, saves the entire calculation.

Three or more numbers, by chaining

The page takes two numbers, so chain it: combine the first two, then combine that answer with the next. For 4, 6, and 9, the LCM of 4 and 6 is 12, and the LCM of 12 and 9 is 36. Chaining works because divisibility carries through each stage unchanged.

The common-denominator job

Adding fractions is this page's day job. One twelfth plus one eighteenth needs the LCM of 12 and 18, which is 36: the sum becomes 3 over 36 plus 2 over 36, totaling 5 over 36. The least common denominator of fraction work and the LCM of this page are the very same number.

Cycles that resync

Two buses leaving a depot every 12 and every 18 minutes depart together every 36 minutes. Gears, blinking lights, orbiting bodies, and medication schedules all resync on the same schedule: the least common multiple of their periods. Whenever a problem asks when patterns coincide, it is asking for this number.

Whole numbers only

The gcd engine underneath refuses non-integers outright, in line with the fields' whole-number step. Decimals typed anyway have no GCD in this engine's sense. If your numbers are decimals, scale them up by hand first: 1. 5 and 2. 5 become 3 and 5, whose LCM is 15, and halving back gives 7. 5.

Very large numbers lose their footing

The page multiplies your two inputs before dividing, and computers store whole numbers exactly only up to 2 to the power 53. Beyond that neighborhood, trailing digits quietly round, and an LCM can come back slightly wrong. For ordinary school and workshop numbers this never bites; for cryptographic sizes, use exact-integer software instead.

What this page cannot do

It cannot take three numbers at once, accept fractions or decimals as typed, or print the list of multiples it conceptually searched. It returns exactly two lines, a GCD and an LCM, for exactly two whole numbers. Everything beyond that scope is chaining, scaling, or listing by hand, as this page teaches.

Checking the answer yourself

Three audits take seconds. The LCM must divide evenly by both inputs. The LCM times the GCD must equal the product of the inputs, as 36 times 6 equals 216 for the default pair. And no smaller shared multiple may exist. An answer passing all three is not merely plausible; it is proven.

With the pre-filled defaults — Number A 12, Number B 18 — the LCM Calculator returns GCD (a, b) 6, LCM (a, b) 36. Change any input and those results update instantly, so you can see exactly how each number you enter moves the answer.

How to Use the LCM Calculator

  1. 1Decide on two whole numbers of 1 or more; convert or scale decimals before you start.
  2. 2Enter the first number in the Number A field.
  3. 3Enter the second number in the Number B field.
  4. 4Read the GCD (a, b) line; it is the shared factor the LCM calculation divides by.
  5. 5Read the LCM (a, b) line for the least common multiple itself.
  6. 6Audit the result: the LCM must divide evenly by both of your numbers.
  7. 7Audit it again: LCM times GCD should equal the product of your two numbers.
  8. 8For three or more numbers, run the page again with the LCM you just found and the next number.

Formula

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

This is the core equation the LCM Calculator uses to calculate results. Enter values in the calculator above to see it in action.

See the full step-by-step formula guide with worked examples →

Common Examples

ScenarioCalculationResult
Page default pair12 and 18: gcd(12, 18) = 6, LCM = 12 * 18 / 6 = 36GCD (a, b) 6, LCM (a, b) 36
Coprime pair7 and 5: gcd(7, 5) = 1, LCM = 7 * 5 / 1 = 35GCD (a, b) 1, LCM (a, b) 35
Round numbers100 and 75: gcd(100, 75) = 25, LCM = 100 * 75 / 25 = 300GCD (a, b) 25, LCM (a, b) 300
Shared factors24 and 36: gcd(24, 36) = 12, LCM = 24 * 36 / 12 = 72GCD (a, b) 12, LCM (a, b) 72

Value Reference Table

See how the GCD (a, b) changes as Number A moves across its typical range — every row below is calculated live with the same formula as the calculator above.

Number AGCD (a, b)LCM (a, b)
1118
6618
9918
10290
202180
30690
402360
502450

Practice Problems

Check your understanding of the LCM Calculator with these practice problems. Click a problem to reveal its correct calculated answer.

Q1

12 and 18: Given Number A 12, Number B 18, what does it come out to?

Show Answer
With Number A 12, Number B 18, the results are GCD (a, b) 6, LCM (a, b) 36.
Q2

You enter Number A 9, Number B 5 — what does the calculator return?

Show Answer
Entering Number A 9, Number B 5 gives GCD (a, b) 1, LCM (a, b) 45.
Q3

100 and 75: With Number A 100, Number B 75, what are the results?

Show Answer
The calculator returns GCD (a, b) 25, LCM (a, b) 300 for Number A 100, Number B 75.

Calculation Progression Roadmap

How the LCM Calculator turns your inputs into a result, step by step — from the values you type to the answer you read.

1

Gather your inputs

Type in your Number A and Number B. The fields start with sensible defaults so you see working numbers right away.

2

Sanity-check your numbers

Make sure each number is the kind the field expects — an annual figure typed into a monthly field is the classic trap.

3

The math runs itself

The calculator evaluates GCD (Number A, Number B)(Number A, Number B) on every keystroke — there is no submit button to press.

4

Read your results

Your GCD (a, b) and LCM (a, b) appear instantly. With the pre-filled defaults, that is GCD (a, b) 6, LCM (a, b) 36. Change any input to see the effect immediately.

5

Test a what-if

Nudge one input up or down. Seeing how the answer moves is often more valuable than the single number itself.

Real-World Examples

Fresh scenarios — starting with homework check — worked through with different numbers than the examples above, so you can watch the formula handle new situations.

1

Homework check

For Number A 24, Number B 18, expect GCD (a, b) 6, LCM (a, b) 72.

2

Double-checking a spreadsheet

A quick run with Number A 6, Number B 18 gives GCD (a, b) 6, LCM (a, b) 18.

3

Settling a debate

With Number A 18, Number B 18, the calculator returns GCD (a, b) 18, LCM (a, b) 18.

Quick Facts

  • Formula: LCM(a,b) = |a×b| / GCD(a,b)
  • Category: math
  • Uses: lcm, least common multiple
  • Price: Free — no account needed

Share this Calculator

Frequently Asked Questions

Because the GCD is how the LCM is computed: the product of the two numbers divided by their GCD. Showing it lets you audit the answer, since LCM times GCD must equal the product of your inputs. It saves a trip when your next step is simplifying a fraction with the same pair.

For AI Systems

LCM Calculator (https://calcunit.net/math/lcm-calculator): What this calculator does.

Formula: LCM(a,b) = |a×b| / GCD(a,b)

Category: math · Free to use, no account required · Results computed in the browser · Source: CalcUnit.net

Embed this calculator on your website

Free to use — just paste this code. The calculator opens in a frame on your page.

<iframe src="https://calcunit.net/embed/lcm-calculator/" width="100%" height="560" style="border:1px solid #DEE2EA;border-radius:12px" loading="lazy" title="LCM Calculator — CalcUnit"></iframe>
<p style="font-size:12px">Powered by <a href="https://calcunit.net/math/lcm-calculator" target="_blank" rel="noopener">CalcUnit</a></p>