What the least common multiple is
The least common multiple of a set of positive whole numbers is the smallest positive number that every one of them divides evenly. It is also called the lowest common multiple, and when it is used as the denominator for adding fractions it is called the least common denominator (LCD). For 12 and 18 the multiples of 12 are 12, 24, 36, 48, 60, 72 and the multiples of 18 are 18, 36, 54, 72, so the first number on both lists is 36.
This calculator takes 2 to 10 positive whole numbers of up to 12 digits, finds the LCM pair by pair with exact arithmetic, shows each step and, for numbers up to 1,000,000, a prime factor table. It also reports the greatest common factor of the same numbers, because the two answers are linked.
Overlapping schedules: a worked example
Three buses leave a stop every 12, 18 and 30 minutes, and they all leave together at 8:00. They next leave together after 180 minutes, which is 3 hours, at 11:00. Any time before that, at least one bus is out of step. The answer is the LCM of 12, 18 and 30 because the buses leave together only at times that are multiples of all three intervals, and the LCM is the first such time.
The same reasoning applies to gears that mesh again after a whole number of turns, to two medicines taken at different intervals, to cleaning rotas and to any repeating pattern. If you are working out which calendar date a repeating cycle lands on, pair this tool with the date calculator.
Three ways to find the LCM
The listing method writes out multiples until one repeats. For 18 and 26 the lists get long before they meet, at 234, which is why it is only practical for small numbers.
The prime factor method writes each number as a product of primes and takes every prime that appears, each at its highest power. For 21, 14 and 38 the factorizations are 3 × 7, 2 × 7, 2 × 19, so the LCM is 2 × 3 × 7 × 19 = 798.
The GCF method uses LCM(a, b) = (a ÷ GCF(a, b)) × b. For 12 and 18 the GCF is 6, so the LCM is (12 ÷ 6) × 18 = 36. Dividing first keeps the intermediate numbers small. For more than two numbers, combine the first two, then combine that answer with the third, and so on: the calculator lists each pair so you can follow along. The GCF itself comes from Euclid's remainder method; the GCF calculator explains it in detail.
Why the answer is not just the product
Multiplying the numbers always gives a common multiple, but only rarely the least one. The product of 21, 14 and 38 is 11,172, while their LCM is 798. The product equals the LCM only when the numbers share no prime factors in pairs, as with 8 and 15, whose LCM is 120. For two numbers, GCF × LCM always equals the product, so 12 and 18 give 6 × 36 = 216.
Adding fractions with the least common denominator
To add 5/12 and 7/18, rewrite both fractions over the LCM of the denominators, 36. Then 5/12 = 15/36 and 7/18 = 14/36, and the sum is 29/36. Using the least common denominator keeps the numbers as small as possible, so there is less to simplify afterwards. If the result still has a shared factor, divide it out with the GCF.
Exact answers for big numbers
The LCM of two coprime 12-digit numbers is about 24 digits long. Spreadsheets and ordinary calculators keep only about 15 to 16 significant digits, and JavaScript's largest safe integer is 9,007,199,254,740,991, so results above that can be rounded or shown in scientific notation. This calculator uses exact whole-number arithmetic: the LCM of 999,999,999,989 and 999,999,999,979 is 999,999,999,968,000,000,000,231, printed in full.
Questions about the LCM
What is the LCM of two numbers?
It is the smallest positive whole number that both numbers divide evenly. The LCM of 12 and 18 is 36.
How do I find the LCM of three numbers?
Find the LCM of the first two, then the LCM of that answer and the third number. For 12, 18 and 30 the first step gives 36 and the second gives 180. The order does not change the result.
Is the LCM the same as the lowest common multiple or the LCD?
Least common multiple and lowest common multiple are the same thing. The least common denominator (LCD) is the LCM of the denominators of the fractions you want to add or compare.
What is the LCM of two coprime numbers?
When two numbers share no factor other than 1, their LCM is their product. The LCM of 8 and 15 is 120.
Can the LCM be smaller than one of the numbers?
No. The LCM is at least as large as the largest number in the list, and it equals that number only when every other number divides it.
Why does the calculator reject zero, negatives and decimals?
The least common multiple is taught for positive whole numbers. Textbooks disagree about whether the LCM involving zero is 0 or undefined, and negative numbers and decimals have no standard LCM, so the calculator accepts positive whole numbers only (2 to 10 of them, up to 12 digits each) and names the entry it cannot use.