LCM Calculator

LCM36

The least common multiple (LCM) is the smallest positive integer that every number in a set divides into evenly. This calculator finds the LCM of two or more whole numbers, which is essential for adding fractions with unlike denominators, scheduling repeating events, and aligning cycles. It derives the LCM efficiently from the greatest common divisor rather than listing multiples.

Formula

lcm(a, b) = (a * b) / gcd(a, b); LCM(list) folds this across all numbers

a, b
A pair of positive integers
gcd(a, b)
Greatest common divisor of a and b
LCM
Smallest positive integer that every input divides into evenly

How it works

  1. Enter two or more positive whole numbers. At least two values are required and each must be a positive integer.
  2. For each pair, the calculator computes the LCM as the product of the two numbers divided by their greatest common divisor, then folds that result across the whole list.
  3. The single smallest number that all your inputs divide into evenly is returned. Invalid or fewer than two entries produce no result.

Worked example

Find the LCM of 4, 6, and 8.

  1. LCM of 4 and 6: (4 x 6) / gcd(4,6) = 24 / 2 = 12.
  2. Combine with 8: (12 x 8) / gcd(12,8) = 96 / 4 = 24.
  3. 24 is the smallest number divisible by 4, 6, and 8.

The least common multiple of 4, 6, and 8 is 24.

Frequently asked questions

How is the LCM different from the GCF?
The LCM is the smallest number that all the inputs divide into, while the GCF is the largest number that divides into all the inputs. They are linked: for two numbers, LCM times GCF equals the product of the numbers.
Why is the LCM useful for adding fractions?
To add fractions with different denominators you rewrite them over a common denominator. Using the LCM of the denominators gives the least common denominator, keeping the numbers as small as possible.
Can I compute the LCM of several numbers at once?
Yes. Enter as many positive integers as you need and the calculator combines them pairwise, returning a single LCM for the entire set.
Why are only positive integers allowed?
The least common multiple is defined for positive whole numbers. Zero, negatives, and decimals are rejected because the divisibility the LCM depends on applies only to positive integers.