What the least common multiple is
The least common multiple of a set of whole numbers is the smallest positive number that every one of them divides exactly. Multiples of 8 run 8, 16, 24, 32, 40, 48, …; multiples of 12 run 12, 24, 36, 48, 60, …. The values appearing in both lists are 24, 48, 72, … and the smallest is 24. That is lcm(8, 12).
Look at what the shared list turned out to be: 24, 48, 72 — every multiple of 24, and nothing else. That is the structural fact worth carrying away. The common multiples of a set are exactly the multiples of their least common multiple. There is never a common multiple sitting between two of them, which is why the table this calculator prints contains all of them in order.
You need an LCM whenever two or more repeating cycles have to line up. Two buses leave a stop every 8 and 12 minutes: they leave together every 24 minutes. Two gears with 8 and 12 teeth return to their starting alignment after 24 tooth-engagements — three turns of the small gear, two of the large. A maintenance task done every 8 weeks and another every 12 weeks coincide every 24 weeks.
The most common school use is the least common denominator. To add ⅛ + 1/12 you need a denominator both eighths and twelfths fit into, and 24 is the smallest: 3/24 + 2/24 = 5/24. Any common denominator works, but the least one keeps the arithmetic small and usually leaves the answer already in lowest terms. The adding and subtracting fractions calculator does that step automatically.
Why lcm(a, b) = a·b ÷ gcd(a, b)
The product of two numbers is always a common multiple — 8 × 12 = 96 is divisible by both — but it is usually not the least one, because the shared factors get counted twice. The greatest common divisor measures exactly that double-counting, so dividing it out repairs the overshoot: 96 ÷ gcd(8, 12) = 96 ÷ 4 = 24.
The prime-exponent view makes the reason plain. Write each number as a product of prime powers. A number is a multiple of 8 = 2³ precisely when it contains at least three factors of 2; it is a multiple of 12 = 2²·3 precisely when it contains at least two factors of 2 and one of 3. To satisfy both at once with nothing to spare, take each prime to the highest power any of the numbers demands: 2³ · 3 = 24. Take the lowest power instead and you get the greatest common factor. Since min(e₁, e₂) + max(e₁, e₂) = e₁ + e₂ for every prime, multiplying the GCF by the LCM reconstructs the product a·b — which is the identity above, derived rather than memorised.
Two practical points follow. First, divide before you multiply. Computing a ÷ gcd first and then multiplying by b gives the same answer while keeping the intermediate number as small as possible, which matters when the values are large. Second, the identity is a two-number rule. For three or more numbers there is no formula relating the LCM to the GCD and the product; you fold instead, lcm(a, b, c) = lcm(lcm(a, b), c), which is valid because the common multiples of a and b are precisely the multiples of lcm(a, b).
The Euclidean algorithm supplies the GCD in a handful of divisions no matter how large the inputs, which is why this route is far faster than factoring. Factoring is still the better way to understand an answer, and it is what the prime-power table under the results shows.
Worked example: lcm(8, 12) and lcm(12, 18, 24)
Two numbers, by the GCD identity.
- Find the GCD with Euclid: 12 ÷ 8 = 1 remainder 4, then 8 ÷ 4 = 2 remainder 0. The last non-zero remainder is 4.
- Divide first: 8 ÷ 4 = 2.
- Multiply: 2 × 12 = 24.
- Check the product rule: gcd × lcm = 4 × 24 = 96, and 8 × 12 = 96. ✓
- Copies needed: 24 ÷ 8 = 3 of the first number, 24 ÷ 12 = 2 of the second.
The same answer by prime factorization. 8 = 2³ and 12 = 2² × 3. The primes involved are 2 and 3. The highest power of 2 is 2³ (from the 8); the highest power of 3 is 3¹ (from the 12). So the LCM is 2³ × 3 = 8 × 3 = 24.
Three numbers, by folding. Take 12, 18 and 24.
- lcm(12, 18): gcd(12, 18) = 6, so 12 ÷ 6 = 2, and 2 × 18 = 36.
- Now fold in 24: gcd(36, 24) = 12, so 36 ÷ 12 = 3, and 3 × 24 = 72.
- Confirm by exponents: 12 = 2²·3, 18 = 2·3², 24 = 2³·3. Highest power of 2 is 2³; highest power of 3 is 3². So the LCM is 8 × 9 = 72. ✓
Now see why the two-number shortcut must not be used here. The GCD of all three is 6 and the LCM is 72, so their product is 432 — while 12 × 18 × 24 = 5,184. The identity gcd × lcm = product simply does not extend past a pair.
How to read the result
An LCM equal to the product means the numbers are coprime. lcm(4, 9) = 36 = 4 × 9 because they share no prime. Whenever the LCM comes out smaller than the product, the shortfall is exactly the GCD's worth of duplication: the ratio product ÷ LCM is the GCD for a pair.
An LCM equal to the largest number entered means that number is a multiple of all the others. lcm(3, 6, 12) = 12 tells you 12 is already divisible by 3 and 6, so no new denominator is needed. In fraction work that is the happy case: one of the denominators already serves.
The copies figures are the ones to read for scheduling and gearing. If the LCM is 24 and your first cycle is 8 units long, it takes three repeats of that cycle to reach the meeting point. Those two counts are always coprime for a pair of numbers, because any shared factor between them would mean you had passed a smaller common multiple on the way.
Watch the size. The LCM grows fast: lcm(1, 2, 3, …, 10) = 2,520 and lcm(1, 2, 3, …, 20) = 232,792,560. If you are choosing a common denominator for four or five fractions, the least one can still be large, and it is sometimes easier to work with a convenient common denominator and simplify at the end.
Finally, the reported GCD is not decoration. Reading both numbers together tells you the shape of the relationship: a large GCD and a small LCM means the numbers overlap heavily; a GCD of 1 and an LCM equal to the product means they are structurally independent.
LCM, GCD and product for standard pairs
| a | b | a in primes | b in primes | GCD | LCM | a × b |
|---|---|---|---|---|---|---|
| 4 | 6 | 2² | 2·3 | 2 | 12 | 24 |
| 8 | 12 | 2³ | 2²·3 | 4 | 24 | 96 |
| 6 | 21 | 2·3 | 3·7 | 3 | 42 | 126 |
| 9 | 4 | 3² | 2² | 1 | 36 | 36 |
| 15 | 20 | 3·5 | 2²·5 | 5 | 60 | 300 |
| 14 | 35 | 2·7 | 5·7 | 7 | 70 | 490 |
| 24 | 36 | 2³·3 | 2²·3² | 12 | 72 | 864 |
| 100 | 75 | 2²·5² | 3·5² | 25 | 300 | 7,500 |
Check any row: 25 × 300 = 7,500, which is 100 × 75. Rows where the LCM equals the product (9 and 4) are exactly the coprime ones.
Zero is a special case, and this calculator treats it as “unused”
Strictly, every integer divides 0, so 0 is a common multiple of any set and the definition gives lcm(a, 0) = 0. That is mathematically correct and practically useless: one empty field would zero out every answer. This calculator therefore treats a field left at 0 as an unused slot and computes the LCM of the non-zero entries only. If every field is 0 the result is left blank rather than reported as 0, because there is nothing to compute.
Mistakes that produce the wrong LCM
- Multiplying the numbers together and stopping. The product is always a common multiple but is the least one only when the numbers are coprime. 6 × 21 = 126, while the LCM is 42.
- Taking the lowest exponent instead of the highest. That gives the greatest common factor. The LCM needs the highest power of every prime that appears anywhere.
- Dropping a prime that only one number has. 5 appears in 15 but not in 4; it still has to appear in lcm(15, 4) = 60, because the answer must be a multiple of 15.
- Applying gcd × lcm = product to three or more numbers. It holds for a pair only. For 12, 18 and 24 the GCD is 6 and the LCM is 72, whose product is 432, nowhere near 5,184.
- Multiplying before dividing on large inputs. a × b can overflow exact integer range even when the LCM does not. Compute a ÷ gcd first, then multiply.
- Assuming the least common denominator must be the LCM. It is the smallest workable denominator, but any common multiple works. If the LCM is awkward, a larger one still gives a correct answer that you can simplify at the end.
- Using an LCM on decimals. Multiples are defined for integers. Scale 0.4 and 0.6 to 4 and 6, take lcm = 12, then scale back to 1.2.
Where the LCM sits among related tools
The LCM and the GCF are mirror images built from the same prime exponents — highest powers for one, lowest for the other — and they divide the work of fraction arithmetic between them. Use the GCF calculator to simplify a fraction, and the LCM to combine fractions over a common denominator. To see the underlying prime powers for a single number, use the prime factorization calculator; to list every divisor, the factors of a number calculator.
Outside the classroom the LCM is the standard answer to “when do these cycles coincide?”. Gear trains use it to find the hunting-tooth period. Production planners use it to size a repeating schedule that contains a whole number of every sub-cycle. In modular arithmetic it appears as the order of a combined system, and the Chinese remainder theorem builds its solution modulo the LCM of the moduli — a topic the modulo calculator introduces.
Two limits are worth stating. This page works with values up to 10¹², and suppresses the LCM if the answer would exceed 2⁵³, the largest integer a browser holds exactly; beyond that you need arbitrary-precision arithmetic. And the LCM is defined for integers, so any real-world quantity has to be expressed in a common whole-number unit — tenths, minutes, teeth — before the concept applies at all.
Key terms
- Multiple
- A number obtained by multiplying an integer by a whole number. The multiples of 8 are 8, 16, 24, 32 and so on; a number is never smaller than the number it is a multiple of (except 0).
- Common multiple
- A number that every member of the set divides exactly. All of them are multiples of the least common multiple.
- Least common denominator (LCD)
- The least common multiple of the denominators of a set of fractions — the smallest denominator you can rewrite them all over.
- Coprime
- Two integers whose greatest common divisor is 1. Exactly the case where the LCM equals the product.
- Fundamental theorem of arithmetic
- Every integer above 1 factors into primes in exactly one way. It is what makes the max-exponent rule a valid definition.
