LCM Calculator

Find the least common multiple of two or more whole numbers, with prime factors and working.

Separate with commas, spaces or new lines. Negative numbers are treated by their size.

Number entry: use a point for decimals (1.5). Commas grouped in threes are thousands separators (1,250), and a single comma such as 1,5 is read as a decimal comma. Nothing you enter leaves your device.

Showing the example values. Change the inputs and press Calculate for your own result.

Least common multiple of 3 numbers

798

Greatest common factor
1
Relationship
The numbers are relatively prime (coprime)

Working

  1. LCM(a, b) = a × b ÷ GCF(a, b); repeat for each further number.
  2. Prime factors: 21 = 3 × 7
  3. Prime factors: 14 = 2 × 7
  4. Prime factors: 38 = 2 × 19

About the LCM calculator

The least common multiple (LCM) is the smallest positive number that every number in your list divides into evenly. This calculator finds the LCM of two or more whole numbers, shows the greatest common factor alongside, and displays prime factorisations for context.

It is useful for adding fractions with different denominators and for scheduling repeating events.

Who should use the LCM calculator

  • Students working with fractions and number theory.
  • Teachers wanting quick checks.
  • Anyone finding when repeating cycles line up.

How to use the LCM calculator: what each input means

Numbers
Two or more whole numbers, separated by commas, spaces or new lines. Negative signs are ignored.

How the LCM calculator works: method and formula

For two numbers, LCM(a, b) = a × b ÷ GCF(a, b). For more numbers the calculation is repeated, combining the running result with each next number. The calculator uses exact big-integer arithmetic, so there is no overflow.

Two numbers
LCM(a, b) = |a × b| ÷ GCF(a, b)

How to read your LCM calculator result

The LCM is always at least as large as the largest number. If the numbers share no common factor other than 1 (they are coprime), the LCM equals their product.

LCM Calculator worked example

Find the LCM of 21, 14 and 38.

  1. 21 = 3 × 7, 14 = 2 × 7 and 38 = 2 × 19.
  2. Take each prime at its highest power: 2, 3, 7 and 19.
  3. LCM = 2 × 3 × 7 × 19 = 798.

LCM(21, 14, 38) = 798.

Practical uses of the LCM calculator

  • Finding a common denominator for fractions.
  • Working out when two repeating schedules coincide.
  • Solving gear and rhythm problems.

Assumptions and limitations of this calculator

  • Whole numbers only. Input is limited to 100 numbers of up to 150 digits each.
  • If any number is zero, the LCM is reported as 0.
FAQs

LCM Calculator FAQs

Mostly to find common denominators when adding fractions, and to find when repeating cycles align.

Need Something Built Around Your Numbers?

Code & Motions designs and builds custom calculators, dashboards and web tools for businesses. Tell us what you have in mind.