Skip to calculator

Mathematics · Numbers and arithmetic

Find the least common multiple of integers

Enter at least two nonzero integers. The result is the smallest positive integer that is a multiple of each — useful for common denominators and repeating schedules.

Calculate

At least two integers, one per line or separated by semicolons.

How the calculator works

For two numbers, LCM = |a × b| / GCF(a, b). For more than two, the engine folds: LCM(a, b, c) = LCM(LCM(a, b), c). Zeros are refused (every multiple of 0 is 0, which is not a positive LCM here).

Formula and method

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

LCM(12, 18) = |216| / 6 = 36.

LCM(a, b, c) = LCM(LCM(a, b), c)

LCM(12, 18, 24) = LCM(36, 24) = 72.

The identity LCM × GCF = |a × b| for two integers is the implementation, not a prime-factor listing. Intermediate products can grow quickly; very large inputs may overflow floating-point integers. Signs are ignored; the LCM is returned positive.

Worked example

12, 18, and 24

12 ; 18 ; 24

  1. LCM(12, 18) = 216 / 6 = 36.
  2. LCM(36, 24) = 864 / 12 = 72.

LCM = 72.

Input notes

Integers
At least two nonzero integers. Decimals are refused.

Assumptions and limits

Assumptions

  • Positive LCM of nonzero integers.
  • Folding pairwise is associative for this operation.

Limits

  • Does not print a prime-factor table.
  • Huge products may lose integer exactness in JavaScript.

How to read the result

72 is the smallest positive number that 12, 18, and 24 all divide. For adding 1/12 + 1/18, a common denominator can be 72 (or 36 for just those two). The GCF of the same list is 6, not 72.

Common mistakes

  • Taking the product 12 × 18 × 24 as the LCM.

    The product is a common multiple, not the least. Divide out shared factors via the GCF identity.

  • Using the GCF when you needed a common multiple.

    GCF 6 does not work as a common denominator for 1/12 and 1/18.

Methodology · Sources

Related calculations

Frequently asked questions

Why not just multiply all the numbers?

That overshoots. Shared prime factors would be counted twice.

12 × 18 = 216 is a common multiple of 12 and 18, but 36 is smaller and still works. The GCF in the denominator removes the double-counted 6.

Is LCM defined for more than two numbers?

Yes, by repeating the two-number step.

LCM(a, b, c) is the least positive integer divisible by a, b, and c. Computing LCM(LCM(a, b), c) yields that value.

Can I include 1?

Yes. LCM(n, 1) = |n|.

1 divides every integer, so it does not raise the least common multiple.

Author and update

Written by Rédaction HexaCalc (editorial team). Content last updated: August 25, 2026. No third-party medical or financial review is claimed.

The companion divisor

GCF is the other half of the identity used here. Reduce fractions and ratios with it.

Calculate the GCF

Category: Mathematics