Least Common Multiple LCM Calculator
Find the least common multiple of 2 to 10 whole numbers. See the LCM instantly, review prime factorizations and follow the calculation steps used to reach the result.
Enter at least two integers. You can add up to 10 numbers. Negative integers are treated by their absolute values.
The least common multiple of 12 and 18 is 36.
What Is the Least Common Multiple?
The least common multiple, usually abbreviated as LCM, is the smallest non-negative multiple shared by two or more integers. For positive integers, it is the smallest positive number that every input number divides evenly.
For example, consider 12 and 18. Some multiples of 12 are 12, 24, 36, 48 and 60. Some multiples of 18 are 18, 36, 54 and 72. The first positive number appearing in both lists is 36, so:
How to Use This LCM Calculator
- Enter at least two whole numbers.
- Select Add Number if you want to calculate the LCM of three or more integers.
- You can enter up to 10 numbers in one calculation.
- Select Calculate LCM to see the result and calculation details.
- Use Copy Result if you want to copy the calculation.
- Select Reset to return to the 12 and 18 example.
Unlike the previous version of this page, this calculator does not silently convert decimal inputs into integers. If you enter a decimal, it asks you to enter whole numbers instead.
LCM Using Prime Factorization
One way to calculate an LCM manually is to break each number into prime factors. Then take every prime number that appears, using the highest exponent needed by any of the inputs.
For 12 and 18:
The highest power of 2 is 2² and the highest power of 3 is 3². Multiplying those together gives:
LCM and GCD Relationship
For two non-zero integers, the LCM can also be calculated using their greatest common divisor (GCD):
Dividing before multiplying is useful in computer calculations because it reduces the size of the intermediate multiplication compared with directly calculating |a × b|.
For 12 and 18, the GCD is 6:
You can calculate the greatest common divisor separately with ToolZippy’s GCD Calculator.
Common LCM Examples
| Numbers | LCM | Why? |
|---|---|---|
| 2 and 3 | 6 | 6 is the first positive multiple shared by both. |
| 4 and 6 | 12 | 12 is divisible by both 4 and 6. |
| 6 and 8 | 24 | 24 is their smallest shared positive multiple. |
| 8 and 12 | 24 | Both 8 and 12 divide 24 evenly. |
| 9 and 12 | 36 | 36 is divisible by both numbers. |
| 12 and 18 | 36 | The first common positive multiple is 36. |
| 15 and 20 | 60 | 60 is the smallest number divisible by both. |
| 4, 6 and 8 | 24 | 24 is divisible by all three numbers. |
How Do You Find the LCM of Three or More Numbers?
For several integers, the LCM can be found progressively. First calculate the LCM of the first two numbers, then calculate the LCM of that result and the third number. Continue the same process for each additional number.
Therefore:
The calculator above follows this progressive method for up to 10 integers.
What Happens When One Number Is Zero?
This calculator returns 0 when any input is zero. That convention follows the commonly used arithmetic definition:
This also allows the GCD–LCM identity to remain consistent in calculations involving zero.
What About Negative Numbers?
The sign of an integer does not change its positive multiples for LCM purposes. Therefore, this calculator uses the absolute value of negative inputs.
What If One Number Divides the Other?
If one positive integer is already a multiple of the other, the larger number is their LCM.
LCM of Coprime Numbers
Two integers are coprime when their greatest common divisor is 1. For two positive coprime integers, their LCM is simply their product.
LCM and Fractions
LCM is commonly used when adding or subtracting fractions with different denominators. The LCM of the denominators can be used as the least common denominator.
For example, for:
The LCM of 6 and 8 is 24, so both fractions can be rewritten using denominator 24:
LCM for Repeating Cycles
LCM can also answer simple repeating-cycle problems. Suppose one event repeats every 6 units of time and another repeats every 8 units, and both begin together. Their next common interval occurs after:
So, provided both cycles continue regularly from the same starting point, they coincide again after 24 units of time.
Related Math Tools
LCM Calculator FAQs
What does LCM mean?
LCM stands for least common multiple. For positive integers, it is the smallest positive multiple shared by all of the numbers.
What is the LCM of 12 and 18?
The LCM of 12 and 18 is 36. Both 12 and 18 divide 36 evenly, and no smaller positive number is divisible by both.
What is the LCM of 6 and 8?
The LCM of 6 and 8 is 24.
What is the LCM of 4, 6 and 8?
The LCM of 4, 6 and 8 is 24 because 24 is the smallest positive number divisible by all three.
Can this calculator find the LCM of more than two numbers?
Yes. You can enter between 2 and 10 integers. The calculator progressively combines the numbers to determine their overall LCM.
Can I enter decimal numbers?
No. This LCM calculator is designed for integers. Decimal inputs are rejected rather than silently rounded or truncated.
Can I calculate LCM with negative numbers?
Yes. The calculator uses the absolute value of negative integers, so LCM(-6,8) is the same as LCM(6,8), which is 24.
What is the LCM if one number is zero?
This calculator uses the convention LCM(a,0) = 0. Therefore, if any entered number is zero, the overall result is zero.
What is the relationship between LCM and GCD?
For two non-zero integers, LCM(a,b) × GCD(a,b) = |a × b|. This allows the LCM to be calculated from the GCD.
Why is LCM useful with fractions?
The LCM of fraction denominators can be used to find the least common denominator, which helps when adding or subtracting fractions with different denominators.
