LCM Calculator
The least common multiple of a list of whole numbers is the smallest number every one of them divides into, which for 4, 6 and 10 works out to 60. This LCM calculator returns that value as the numbers are typed, then shows three routes to it: the prime factorisation of each number, the ladder division and the a × b ÷ GCF identity kept as a cross-check. Lists run from 2 to 20 whole numbers, separated by commas, semicolons or spaces.
Two or more whole numbers, separated by commas or spaces.
Least common multiple
36
Prime factorisation of each number
- 12 = 2^2 × 3
- 18 = 2 × 3^2
How the factors combine
Take every prime that appears anywhere, each at its highest power. Multiply those together.
- 2^2highest power comes from 12
- 3^2highest power comes from 18
2^2 × 3^2 = 36
Ladder method
Divide by a prime that goes into at least one number and carry the others down unchanged. Stop when every column reads 1; the divisors multiply to the LCM.
| ÷ 2 | 12 18 | → 6 9 |
| ÷ 2 | 6 9 | → 3 9 |
| ÷ 3 | 3 9 | → 1 3 |
| ÷ 3 | 1 3 | → 1 1 |
Check with the GCF identity
For each pair, a × b ÷ GCF gives their least common multiple. Chaining it down the list has to land on the same answer.
- 12 × 18 ÷ 6 = 36
First common multiples
Every number in the list divides each of these. The first one is the least common multiple.
36, 72, 108, 144, 180
Need the largest number that divides into all of them instead? Use the GCF calculator.
Examples
How to use
- 1
Type two or more whole numbers into the Numbers field, separated by commas, semicolons or spaces (up to 20 values, each up to 1,000,000,000).
- 2
Read the least common multiple at the top of the results; it updates on every keystroke, with the combined prime factors shown next to it as a badge.
- 3
Leave Show the working ticked to follow the prime factorisation of each number, the ladder division and the a × b ÷ GCF check, which has to land on the same result.
- 4
Set Common multiples to list anywhere between 0 and 12 to print the next multiples that follow the answer.
How do you calculate the LCM of two or more numbers?
Schoolbooks start with the list method, where one writes out the multiples of each number and stops at the first value the lines share. For 4 and 6 those lines read 4, 8, 12 against 6, 12. Past two small numbers the lines grow long enough that another route pays off.
Prime factorisation is that route. Take 4, 6 and 10 as an example: they break down into 2², 2 × 3 and 2 × 5, so the union of those primes at their highest power gives 2² × 3 × 5 = 60. The calculator prints that union with the number each highest power came from.
The ladder suits longer lists. Each rung divides by a prime that goes into at least one number while the others drop down unchanged. The run stops when every column reads 1. On 4, 6 and 10 the rungs are 2, 2, 3 and 5, whose product is 60 again.
Which LCM method is worth the effort on which numbers?
Deciding how to calculate the LCM comes down to how large the numbers are and how many of them sit in the list. Two small values rarely need more than a written line of multiples. Numbers above a hundred or lists of four and five entries make that line too long to be useful, so the factors do the work instead.
| Numbers on hand | Route that pays off | Worked example |
|---|---|---|
| Two values under about 20 | List the multiples | 6 and 8 meet at 24 |
| Larger values that share factors | Prime factorisation | 24 and 36 give 2³ × 3² = 72 |
| Three numbers or more | Ladder division | 8, 12, 20, 30 give 120 |
| A pair whose GCF is already known | a × b ÷ GCF | 12 × 18 ÷ 6 = 36 |
What is a least common multiple used for?
Adding fractions is the everyday case. Thirds, fifths and sevenths only add up once they share a denominator, the smallest of which is the LCM of 3, 5 and 7. That denominator is 105, so 1/3 + 1/5 + 1/7 turns into 35/105 + 21/105 + 15/105. The fraction calculator takes over from there when the sum still needs reducing.
Repeating cycles are the second case. A filter change due every 12 days and an oil check due every 18 days fall together every 36 days, which is the LCM of 12 and 18. The list of first common multiples under the result covers the whole run at once, 36, 72, 108, 144 and 180, so the next four collisions need no second calculation.
Why does a × b ÷ GCF check the answer?
Multiplying two numbers counts every prime they share twice. Dividing by the greatest common factor strips out exactly that duplicate copy, which is how the product 216 of 12 and 18 comes back down to 36. The calculator runs that identity as a second pass and shows a Both methods agree badge when the two routes land on the same number.
The shortcut only holds for a pair. On 4, 6 and 10 the product 240 divided by the list GCF of 2 would give 120, while the real least common multiple is 60. Chaining the identity pair by pair is what fixes it: 4 × 6 ÷ 2 = 12, then 12 × 10 ÷ 2 = 60. Anyone after a combined gcf and lcm calculator can pair this page with the GCF calculator, which computes the divisor in that same identity.
What happens to the LCM with zero, negative numbers or decimals?
A zero anywhere in the list drags the answer down to 0, because every whole number divides 0 and no smaller common multiple exists. The working panels disappear in that case, as 0 has no prime factorisation to show.
The calculator drops negative signs before anything else runs. The LCM of -4 and 6 is 12, the same answer as for 4 and 6, since a least common multiple is never negative. The field refuses a value like 12.5, which has no whole-number prime factorisation.
The result has a ceiling too. Products climb fast on numbers sharing no factors. Once the answer would pass 9,007,199,254,740,991, the largest integer the calculator holds exactly, it returns an overflow message rather than a silently wrong figure. The LCM of 123456789 and 987654321 sits above that ceiling.
Parameters
Every field of this tool can be prefilled from the URL. Use these query parameters:
| Parameter | Type | Default |
|---|---|---|
| numbers | string | 4, 6, 10 |
| showWork | boolean | true |
| multiples | number | 5 |
Example : https://www.veltotools.com/math/lcm-calculator?numbers=12%2C+18
API
The same tool is available as a free JSON API, with the same parameters as above. No key, no sign-up.
Frequently asked questions
Updated Aug 29, 2026