Free tool
LCM Calculator (Least Common Multiple)
Find the least common multiple of two or more whole numbers, with prime factorization and the working shown. Very large integers are handled exactly.
- Least common multiple (LCM)
- –
- Greatest common factor (for comparison)
- –
- Product of all the numbers
- –
- Highest powers of each prime
- –
- Prime factorization of each number
- –
Pairwise steps
Assumptions and limits
Every figure comes from the numbers you enter. Where a rule of thumb is used, it is labeled as one.
- The LCM of two numbers is a × b ÷ GCF(a, b), with the GCF found by repeated division. All arithmetic is exact BigInt math.
- More than two numbers are combined left to right: LCM(a, b, c) = LCM(LCM(a, b), c).
- Enter 2 to 20 whole numbers of 1 or greater, each with at most 100 digits. The result can be longer than any input.
- Prime factorization is shown for numbers up to 1,000,000,000,000. The LCM itself is always computed.
- The product tile multiplies every number you entered. It equals the LCM only when no two numbers share a factor.
Runs entirely in your browser. Nothing you type or upload is sent to our servers.
How the least common multiple is found
A common multiple of a set of numbers is a number each of them divides into evenly, and the least common multiple is the smallest one above zero. The calculator finds it two ways. For each pair it multiplies the numbers and divides by their greatest common factor, which avoids listing multiples. It also factors each number into primes and takes the highest power of every prime, which shows why the answer is what it is.
Both routes give the same result, and the page prints the pairwise steps so you can follow the chain: the LCM of the first two numbers is combined with the third, then the fourth, and so on.
Worked example 1: 4, 6 and 10
- LCM(4, 6) = 4 × 6 ÷ GCF(4, 6) = 24 ÷ 2 = 12.
- LCM(12, 10) = 12 × 10 ÷ GCF(12, 10) = 120 ÷ 2 = 60.
- Check with primes: 4 = 2², 6 = 2 × 3, 10 = 2 × 5. Highest powers: 2², 3, 5. Then 4 × 3 × 5 = 60.
Every input divides 60 evenly: 60 ÷ 4 = 15, 60 ÷ 6 = 10 and 60 ÷ 10 = 6. The calculator opens with these numbers.
Worked example 2: two schedules that repeat
One task repeats every 12 days and another every 18 days, and both happen today. When do they next fall on the same day?
- GCF(12, 18) = 6.
- LCM(12, 18) = 12 × 18 ÷ 6 = 216 ÷ 6 = 36.
- Check: 36 ÷ 12 = 3 and 36 ÷ 18 = 2, and no smaller shared multiple exists.
Counting from today, the two schedules coincide again after 36 days.
Points to remember
- For two numbers, GCF × LCM equals their product. For three or more numbers, that shortcut no longer holds, so use the chained steps.
- The LCM is never smaller than the largest number in the list.
- Numbers with no shared factor other than 1 have an LCM equal to their product, as with 8 and 9, whose LCM is 72.
Related calculators
The GCF Calculator finds the largest number that divides all of yours. For adding or subtracting fractions with different denominators, use the Fraction Calculator. Scaling a recipe or a mix? The Ratio Calculator handles proportions, and the Average Calculator summarizes a list of values.
Frequently asked questions
What does the LCM calculator find?
It finds the least common multiple: the smallest positive whole number that every number you enter divides into with no remainder. For 4 and 6 the answer is 12, because 12 ÷ 4 = 3 and 12 ÷ 6 = 2, and no smaller positive number is a multiple of both. Enter two or more numbers separated by commas or spaces.
How do I find the LCM of two numbers by hand?
Multiply the two numbers, then divide by their greatest common factor. For 12 and 18 the product is 216 and the GCF is 6, so the LCM is 216 ÷ 6 = 36. Listing multiples also works for small numbers: 12, 24, 36 and 18, 36 first meet at 36.
How does the prime factorization method work?
Write each number as a product of primes, then keep every prime that appears in any number at its highest power, and multiply. For 24 = 2³ × 3 and 36 = 2² × 3², the highest powers are 2³ and 3², so the LCM is 8 × 9 = 72. The calculator shows this line for each set of numbers.
What is the LCM when one number divides the other?
It is the larger number. If 6 divides 18 evenly, then 18 is already a multiple of both, and nothing smaller than 18 can be a multiple of 18. So LCM(6, 18) = 18. The same holds for any list in which one number is a multiple of all the others.
How do I add fractions with an LCM?
Use the LCM of the denominators as the common denominator. For 1/4 + 1/6, LCM(4, 6) = 12. Rewrite both fractions over 12: 3/12 + 2/12 = 5/12. A smaller common denominator keeps the numbers small and the answer easier to reduce.
Can the numbers be very large?
Yes. Each number can have up to 100 digits and the arithmetic is exact, so the LCM of large numbers is not rounded or shown in scientific notation. The result can be much longer than the inputs, because it can be as large as their product. Prime factorization appears only for numbers up to 1,000,000,000,000.
Why does the calculator reject zero?
Zero is a multiple of every number, so the idea of the smallest positive common multiple does not apply to a list that includes 0. Enter whole numbers of 1 or greater. Decimals and negative numbers are also rejected; scale a decimal such as 0.5 and 0.75 to whole numbers 50 and 75 first.
Is anything I type saved or sent anywhere?
No. The calculation runs in your browser, and nothing you enter is stored or sent to our servers. Only a count that the tool was used is recorded, without any numbers from the form.
Link to this tool
Found it useful? Copy a link for your page, newsletter or documentation.
Get new tools and guides by email
Optional. The tool above works without signing up.
More free tools
Browse all everyday calculators or the full list of free tools.
- Standard Deviation CalculatorCalculate population or sample standard deviation, variance and mean from your own data, with every step of the working shown and exact arithmetic.
- Average Calculator: Mean, Median, Mode & RangeFind the average of a list of numbers: mean, median, mode, range, sum and count, with the working shown. Exact results with no floating-point error.
- Decimal to Fraction CalculatorConvert any decimal to a simplified fraction or mixed number, including repeating decimals such as 0.(3). Exact results, with the working shown.
- Fraction to Decimal CalculatorConvert a fraction or mixed number to an exact decimal and percent, with repeating digits marked in parentheses and the long division shown.
- Gravel CalculatorEstimate gravel in cubic yards, cubic meters and tons for a driveway, path or base layer, with the density you enter and an optional extra allowance.
- Mulch CalculatorFind how many cubic yards and bags of mulch a garden bed needs from its size and depth, plus how much area a cubic yard covers at that depth.