Skip to content

Least common multiple (LCM) calculator

Calculate the least common multiple (LCM) of two or more integers, the smallest number that is a multiple of all of them at once.

Processed on your device. Nothing is sent to any server.

LCM

24

Calculates the LCM iteratively from the greatest common divisor: LCM(a,b) = |a x b| / GCD(a,b).

Use cases

  • Adding fractions with different denominators.
  • Synchronizing events that repeat at different frequencies.
  • Solving school arithmetic problems.

How it works

  1. 1

    Type the numbers

    Enter two or more integers separated by commas or spaces.

  2. 2

    Read the result

    The LCM is calculated automatically.

Technical details

  • Example: LCM(4, 6, 8) = 24, the smallest number that is a multiple of all three.
  • Positive integers only, separated by commas or spaces. Decimals are truncated, and zero and negatives are ignored.
  • With lists of large numbers the result grows very fast; beyond about 9 quadrillion (2⁵³) the browser can no longer represent it exactly.

Frequently asked questions

Does it work with more than two numbers?

Yes, it calculates the LCM of the whole list by applying the pairwise formula cumulatively.

What is it useful for in practice?

Adding fractions with different denominators (1/4 + 1/6 uses 12 as the common denominator) or finding when periodic events coincide: two buses every 12 and every 18 minutes line up again every 36 minutes.

← Calculators