By · Updated

LCM Calculator

Least Common Multiple of Two or More Numbers With Working

No ratings yet
Result

—

OneTask is free, with no sign-up, and built by one person.
If this tool saved you time, a coffee helps keep new ones coming.

How the LCM Calculator works

This LCM calculator finds the least common multiple of two or more whole numbers, the smallest number every one of them divides into. It shows the working, what to multiply each number by to reach the LCM, the first few common multiples and the greatest common factor. Use it to find the lowest common denominator for adding fractions.

The least common multiple answers "when do these line up again?" Buses every 12 and 18 minutes leave together every 36 minutes, which is LCM(12, 18). In fractions, the LCM of the denominators is the lowest common denominator, which keeps the numbers small when adding 1/4 + 1/6. It is also called the lowest common multiple, and it is always at least as big as the largest number.

How the LCM calculator works

The formula is lcm(a, b) = |a × b| ÷ gcd(a, b), with the GCF from Euclid's algorithm. For more numbers the calculator folds them in one at a time, so lcm(a, b, c) = lcm(lcm(a, b), c). Big integers keep the result exact however large it grows. Each number's multiplier is the LCM divided by that number.

First example. lcm(4, 6, 10): lcm(4, 6) = 24 ÷ 2 = 12, then lcm(12, 10) = 120 ÷ 2 = 60.

Second example. lcm(12, 18) = 216 ÷ 6 = 36, so 12 × 3 = 36 and 18 × 2 = 36.

How many packs to buy? Hot dogs in 10s and buns in 8s match at lcm(10, 8) = 40: 4 packs of sausages and 5 of buns.

LCM of n with 2, 3, 4 and 6, and the LCM of every number from 1 to n

n LCM with 2 LCM with 3 LCM with 4 LCM with 6 LCM of 1 to n
2 2 6 4 6 2
3 6 3 12 6 6
4 4 12 4 12 12
5 10 15 20 30 60
6 6 6 12 6 60
7 14 21 28 42 420
8 8 24 8 24 840
9 18 9 36 18 2520
10 10 30 20 30 2520
11 22 33 44 66 27720
12 12 12 12 12 27720
13 26 39 52 78 360360
14 14 42 28 42 360360
15 30 15 60 30 360360
16 16 48 16 48 720720
17 34 51 68 102 12252240
18 18 18 36 18 12252240
19 38 57 76 114 232792560
20 20 60 20 60 232792560
21 42 21 84 42 232792560
22 22 66 44 66 232792560
23 46 69 92 138 5354228880
24 24 24 24 24 5354228880
25 50 75 100 150 26771144400

Tips and pitfalls

FAQ

How do you find the least common multiple?

Divide the product of the two numbers by their GCF. For 8 and 12, the product is 96 and the GCF is 4, so the LCM is 24. Or use prime factors, taking the highest power of each: 8 = 2³ and 12 = 2² × 3, so the LCM is 2³ × 3 = 24.

What is the LCM of 4 and 6?

The LCM of 4 and 6 is 12. Multiples of 4 are 4, 8, 12, 16 and multiples of 6 are 6, 12, 18, so 12 is the first they share. Using the formula, 4 × 6 = 24 and the GCF is 2, so the LCM is 24 ÷ 2 = 12.

How is the LCM used with fractions?

The LCM of the denominators is the lowest common denominator. To add 1/4 + 1/6, the LCM of 4 and 6 is 12, so rewrite them as 3/12 + 2/12 = 5/12. Using the smallest common denominator keeps the numbers small and the fraction easier to simplify.

What is the difference between LCM and GCF?

The GCF is the largest number that divides into all the numbers, while the LCM is the smallest number they all divide into. For 12 and 18 the GCF is 6 and the LCM is 36. The GCF is never larger than the numbers; the LCM is never smaller.

Can you find the LCM of more than two numbers?

Yes. Find the LCM of the first two, then the LCM of that result with the next number, and so on. For 3, 4 and 5 that gives 12 and then 60. Type all of your numbers separated by commas or spaces and the calculator handles any amount.

See also: all Number Theory tools, Arithmetic, Algebra and Geometry, Statistics, Trigonometry and Calculus.

Related tools