Connect via MCP →

Enter Calculation

Formula

Advertisement

Results

LCM = 300

Least Common Multiple

What the LCM Calculator Does

The LCM Calculator finds the Least Common Multiple of a set of whole numbers — the smallest positive integer that every number you enter divides into evenly. It accepts a list of integers in a single field and returns one result: their combined LCM. This is handy for adding fractions with different denominators, scheduling repeating events, and solving number-theory problems.

How to Use It

  • Numbers — type two or more integers into the input box.
  • Separate them with commas, semicolons, or spaces — the calculator splits on commas (both English and full-width), semicolons, and any whitespace.
  • Negative integers are accepted; only valid whole numbers (matching the pattern -?\d+) are kept, so stray text is ignored.

For example, entering 4, 6, 8 is read as the list [4, 6, 8].

The Formula Explained

For two numbers the calculator uses the classic relationship between LCM and the Greatest Common Divisor (GCD):

$$\text{LCM}(a, b) = \frac{|a \cdot b|}{\gcd(a,\,b)}$$

When you supply more than two numbers, it folds the operation across the list — computing the LCM of the first two, then taking the LCM of that result with the next number, and so on. In code terms this is a reduce/inject: LCM(a, b, c) = LCM(LCM(a, b), c).

Advertisement
Diagram showing LCM of two numbers computed from their product divided by the GCD, with overlapping prime factor sets
The LCM of two numbers equals their product divided by their greatest common divisor.

Worked Example

Suppose you enter 4, 6, 8:

  • Step 1: \(\gcd(4, 6) = 2\), so $$\text{LCM}(4, 6) = \frac{4 \times 6}{2} = \frac{24}{2} = 12.$$
  • Step 2: \(\gcd(12, 8) = 4\), so $$\text{LCM}(12, 8) = \frac{12 \times 8}{4} = \frac{96}{4} = 24.$$

The calculator returns 24 — the smallest number that 4, 6, and 8 all divide into evenly.

Two number lines showing multiples of 4 and 6 with the first shared multiple, 12, highlighted as the LCM
Listing multiples of 4 and 6 shows 12 is their smallest common multiple.

Frequently Asked Questions

Can I enter more than two numbers? Yes. There is no fixed limit — the tool processes the entire list and applies the LCM pairwise until a single answer remains.

What happens with negative numbers? Negatives are allowed and parsed correctly. Because the formula uses the absolute value of the product, the LCM is always reported as a positive integer.

What if I include letters or symbols? Non-numeric tokens are filtered out automatically. Only entries matching a valid integer pattern are used, so 4, x, 6 is treated the same as 4, 6.

Last updated: