LCM Calculator - Least Common Multiple
Calculate the Least Common Multiple of two or more positive integers with step-by-step explanations.
Select an input method, enter your numbers, and click Calculate LCM to get the result instantly.
LCM Calculator - Least Common Multiple
Calculate the Least Common Multiple of two or more positive integers with step-by-step explanations.
About the LCM Calculator
The Least Common Multiple (LCM) of two or more integers is the smallest positive integer that is divisible by every number in the set. It is a central concept in number theory and appears naturally whenever you need to synchronize cycles of different lengths, combine fractions, or find a common unit for measuring recurring events.
The simplest way to understand the LCM is by listing multiples. The multiples of 4 are 4, 8, 12, 16, 20, 24 … and the multiples of 6 are 6, 12, 18, 24 … The first number that appears in both lists is 12, so LCM(4, 6) = 12. While this listing approach works fine for small numbers, it becomes impractical for large inputs, which is why the GCF-based formula and prime factorization are preferred in practice.
The most efficient computational method uses the relationship between the LCM and the Greatest Common Factor (GCF, also called GCD). For any two positive integers a and b: LCM(a, b) = (a × b) / GCF(a, b). The GCF is computed rapidly using the Euclidean algorithm, which repeatedly replaces the larger number with the remainder of dividing the larger by the smaller until the remainder is zero. The last non-zero remainder is the GCF. This whole process runs in O(log(min(a, b))) steps — essentially instantaneous even for very large integers.
For more than two numbers, the LCM is computed iteratively: LCM(a, b, c) = LCM(LCM(a, b), c). You can chain as many numbers as you like. This calculator applies the same iterative approach for any set of inputs.
The prime factorization method offers a visual alternative. Factor each number into its prime components, collect every prime that appears, raise each to the highest power seen across all factorizations, and multiply. For example, 12 = 2² × 3 and 18 = 2 × 3², so LCM(12, 18) = 2² × 3² = 4 × 9 = 36.
Practical uses of the LCM span many fields. In fraction arithmetic, LCM gives the least common denominator when adding or subtracting fractions. In scheduling, LCM tells you when two periodic tasks running on different cycle lengths will next fall on the same step — for example, two bus routes that repeat every 12 and 18 minutes will next coincide after 36 minutes. In computer science and digital logic, LCM determines the period of combined clock signals or shift registers. In music, rhythmic patterns of different lengths share a combined cycle whose length is their LCM.
This calculator accepts any set of two or more positive integers and returns the exact LCM with no rounding. Enter your numbers separated by commas or spaces and get the result in one click.
LCM Calculator Examples
Common LCM problems showing the result and the reasoning behind each calculation.
| Numbers | LCM | Method / Explanation |
|---|---|---|
| 12, 18 | 36 | GCF(12, 18) = 6. LCM = 12 × 18 / 6 = 36. |
| 8, 12, 16 | 48 | LCM(8,12) = 24, then LCM(24,16) = 48. |
| 7, 11, 13 | 1001 | All three are prime, so LCM = 7 × 11 × 13 = 1001. |
| 24, 36, 48, 60 | 720 | Iterative GCF/LCM gives 720 = 2⁴ × 3² × 5. |
How to Use the LCM Calculator
- Choose an input method: Individual Numbers or List Input (both accept comma- or space-separated values).
- Enter two or more positive integers in the numbers field.
- Click Calculate LCM. The calculator uses the GCF-based formula iteratively to find the exact LCM.
- Read the result displayed below the button — it shows the LCM and the numbers you entered.
- Click Reset to clear all fields and start a new calculation.
LCM Calculator FAQ
What is the Least Common Multiple?
The Least Common Multiple (LCM) of a set of integers is the smallest positive integer that every number in the set divides into exactly. For example, LCM(4, 6) = 12 because 12 is the smallest number divisible by both 4 and 6.
How is LCM different from GCF?
The GCF (Greatest Common Factor) is the largest number that divides all inputs, while the LCM is the smallest number that all inputs divide into. For two numbers a and b, the relationship is: LCM(a, b) × GCF(a, b) = a × b.
When is the LCM equal to the product of the two numbers?
The LCM equals the product a × b only when a and b are coprime — meaning their GCF is 1. For example, LCM(7, 11) = 77 = 7 × 11 because 7 and 11 share no common factors other than 1.
How do I use LCM to add fractions?
Find the LCM of the denominators — this is the least common denominator (LCD). Rewrite each fraction with that denominator by multiplying numerator and denominator by the required scale factor, then add the numerators. For example, 1/4 + 1/6: LCM(4,6)=12, so 3/12 + 2/12 = 5/12.
Can the LCM be smaller than any of the input numbers?
No. The LCM is always greater than or equal to the largest number in the set. It equals the largest number only when all other numbers are its divisors (for example, LCM(3, 6) = 6).
Does LCM work with more than two numbers?
Yes. For any number of inputs, compute LCM iteratively: LCM(a, b, c) = LCM(LCM(a, b), c), and so on. This calculator handles any count of positive integers using this same iterative approach.