All calculators

Education

LCM Calculator

Enter two or more positive whole numbers. The calculator returns the least common multiple using the GCF identity, with the GCF of the list and the step by step work.

Two or more positive whole numbers, comma- or space-separated. · e.g. 12, 18, 30

The LCM (least common multiple) is the smallest whole number that every input divides evenly.

Steps

  1. lcm(12, 18) = 12 × 18 ÷ gcd(12, 18) = 36
Least common multiple

LCM

36

lcm(12, 18)

Numbers12, 18
GCF (used)6
LCM36

LCM is computed pairwise as lcm(a, b) = (a × b) ÷ gcd(a, b), then folded across the list. The result is the smallest positive integer that every input divides evenly.

Was this helpful?

Examples

LCM of 4 and 6

= 12

LCM of 12, 18, 30

= 180

LCM of 7 and 11

= 77 (coprime → product)

How it works

For any pair of positive integers a and b, the product a × b equals gcf(a, b) × lcm(a, b). Dividing by the GCF gives the LCM. For more than two inputs, the calculator folds the pairwise rule across the list.

Pairwise · lcm(a, b) = (a × b) ÷ gcd(a, b)

More numbers · lcm(a, b, c) = lcm(lcm(a, b), c)

All inputs must be positive whole numbers.

Related math calculators

Frequently asked questions

The least common multiple (LCM) of two or more whole numbers is the smallest positive integer that every one of them divides evenly. For 4 and 6, the LCM is 12: it is the smallest number that is a multiple of both 4 and 6. It is also called the lowest common multiple.

The fastest method uses the GCF: lcm(a, b) = (a × b) ÷ gcd(a, b). For more than two numbers, fold: lcm(a, b, c) = lcm(lcm(a, b), c). This calculator runs that fold and shows the intermediate results.

GCF is the largest number that divides every input. LCM is the smallest number that every input divides into. They are connected: for any pair of positive integers a and b, a × b = gcf(a, b) × lcm(a, b). So once you know the GCF you can compute the LCM with a single division.

Adding and subtracting fractions with different denominators (the lowest common denominator is the LCM of the denominators), aligning periodic events that repeat at different intervals, and number-theory problems. Any time you need to find a common cycle or shared rhythm, the LCM is the answer.

Yes. Separate the numbers with commas or spaces, for example '12, 18, 30'. The calculator folds across the list pairwise.

LCM grows quickly when the inputs are coprime. For example, lcm(7, 11, 13, 17) = 17,017. With a handful of larger coprime numbers the result can blow past JavaScript's safe-integer range. The calculator flags this case and asks for smaller inputs.