Skip to content

LCM Calculator

Find the least common multiple.

First number
Second number
Output

No result

About LCM Calculator

LCM Calculator finds the least common multiple of two numbers: the smallest positive whole number that both divide into exactly. It computes this from the greatest common divisor, multiplying the two numbers together and dividing by the GCD, which avoids the tedium of listing multiples until one matches.

The practical use is adding or comparing fractions with different denominators, where the least common multiple gives the smallest shared denominator and keeps the numbers manageable. It is also the calculation behind problems about events that recur on different cycles — one engine serviced every 12 days and another every 18 both come due again after 36.

As with the GCD calculator, both inputs are floored and made absolute first, so negative or fractional entries are normalised to integers before the arithmetic runs. If either input is zero the result is zero, since no positive multiple is shared with zero.

The page takes exactly two numbers and that ceiling shapes everything. There is no way to enter a third, fourth or longer list and get the least common multiple of the whole set, which is the operation you actually need for three fractions with three different denominators — the workaround is to pair them off and feed each result back in. The single answer is not accompanied by any supporting working: the GCD that was used, the factorisation that underlies it, and the list of multiples are all absent, so checking the result means recomputing it. No fraction arithmetic and no recurring-event calculator is offered alongside it, and because fractional inputs are truncated rather than rejected, a decimal entry is quietly changed into a different problem.

How to use LCM Calculator

  1. 1 Enter the first number.
  2. 2 Enter the second number.
  3. 3 Read the least common multiple of the two.

Frequently asked questions

How is the LCM related to the GCD?

For two numbers, their product equals the LCM multiplied by the GCD. That identity is exactly why this tool computes the GCD first and divides — it turns a search problem into a single division.

What is the LCM of 0 and any number?

Zero. The multiples of zero are all zero, and zero is a multiple of every number, so it is the only value shared by both. In practice a zero input usually indicates a missing value rather than a genuine one.

Can it handle coprime numbers?

Yes, and the result is simply their product. Two numbers that share no common factor other than one — such as 9 and 16 — have a least common multiple equal to their product, which is the case where the formula reduces to plain multiplication.

Free, online, and private

Free to use

LCM Calculator is completely free. There is no account to create, no login, and no hidden charge or usage limit.

Runs online in your browser

It is a free online tool that runs entirely in your browser. Nothing to download or install — open the page and start using it right away.

Your data stays private

All processing happens locally on your device. Your input is never uploaded, stored, or tracked, so it never leaves your browser.

How LCM Calculator behaves in detail

These are the specifics of this implementation — the exact ranges, defaults and fixed settings you are working with.

Parameter Value
Formula (a × b) ÷ gcd(a, b), reusing the same Euclid routine as the GCD tool
Inputs two numbers, each floored to an integer and made positive before the product is taken
Output a single line, "LCM: n"
Zero handling no special case — the divisor is the GCD, and gcd(0, 0) is 0
Defaults a 12, b 18, which returns 36

Compiled from the implementation of this tool and checked against it by itoolnet.

What LCM Calculator does not do

Knowing the edges of a tool saves more time than another list of its features. These are the cases where it will not do what you might expect.

  • A zero input is not screened. Feed in 0 and 0 and the shared divisor is 0, so the arithmetic becomes 0 ÷ 0 and the output line reads "LCM: NaN" — a floating-point artefact standing where a sentence about zero having no least common multiple belongs.
  • Two at a time only. The operation is associative so a longer list can be folded pairwise, but the page offers one pair of boxes with no list input, and it never prints the prime decomposition that would let you do that folding with confidence.
  • The product is formed before the division. A pair of large integers can therefore overflow the range in which a double holds every integer exactly, with the error surviving into the quotient, so very large pairs can return a result that is close to but not exactly the least common multiple.

Tested and documented by itoolnet, the team that builds and maintains this site.

Share & embed this tool

Writing a guide or article? You are welcome to link to LCM Calculator with the snippet below. It is free, runs entirely in your browser, and needs no signup.