LCM (Least Common Multiple) Calculator

lcm(a,b) = |a × b| / gcd(a,b). Smallest number that both a and b divide evenly.

Inputs

Result

LCM
36
Of 12, 18.
  • Numbers12, 18
  • LCM36
  • Multiples36 / 12 = 3, 36 / 18 = 2

Step-by-step

  1. Apply lcm pairwise: lcm(a,b) = |a × b| / gcd(a,b).
  2. lcm(12, 18) = (12 × 18) / gcd = 36.

How to use this calculator

  • Enter 2-4 positive integers.
  • Leave optional fields at 0 to ignore.

About this calculator

The LCM (least common multiple) is the smallest positive integer that is a multiple of all the inputs. Computed via gcd: lcm(a,b) = |a × b| / gcd(a,b). For more than 2: associative — lcm(a,b,c) = lcm(lcm(a,b),c). Common use: adding fractions (find common denominator), scheduling cycles that synchronize, music time signatures. lcm(12, 18) = 36 — same as 12 × 3 = 36 = 18 × 2.

Frequently asked

Adding fractions (1/4 + 1/6: LCM 12 → 3/12 + 2/12 = 5/12). Schedule synchronization. Cyclic problems.

Related calculators