About this calculator
Free online LCM Calculator. Calculate the Least Common Multiple (LCM) of two or more numbers with step-by-step solutions using prime factorization and GCD.
How to use
Enter your values in the fields above and click Calculate to see your results. Click Clear to reset all fields.
What the LCM Is and When You Need It
The least common multiple (LCM) of two or more whole numbers is the smallest positive number that every one of them divides into evenly. It's the mirror image of the greatest common factor (GCD), which finds the largest number that divides evenly into your numbers rather than the smallest number they all divide into. LCM shows up any time you need a shared unit of "how often something repeats": adding or comparing fractions with different denominators, lining up repeating schedules (two buses that loop every 12 and 18 minutes will be back at the stop together every LCM(12, 18) minutes), or sizing gears and production batches that need to complete whole cycles together.
Use this calculator whenever you need an exact smallest-common-multiple answer rather than an estimate — homework involving fraction addition, scheduling problems, or engineering ratios where "close enough" isn't good enough. It works with any list of two or more positive whole numbers; it isn't meant for decimals, negative numbers, or zero, since the LCM is only defined for positive integers.
The Method: Prime Factorization
This calculator finds the LCM by prime factorization rather than guessing and checking multiples. Each number is broken into its prime factors (for example, 12 = 2² × 3). Then, for every prime that appears in any of the numbers, the calculator takes the highest power of that prime across the whole list, and multiplies those highest powers together. For just two numbers this is equivalent to the shortcut LCM(a, b) = (a × b) ÷ GCD(a, b), and for more than two numbers the calculator applies that pairwise formula repeatedly (LCM of the first two, then LCM of that result with the third number, and so on) — both routes always agree.
Worked Example
Enter 12, 18, 30. Prime factorizations: 12 = 2² × 3, 18 = 2 × 3², 30 = 2 × 3 × 5. Taking the highest power of each prime that appears anywhere — 2² (from 12), 3² (from 18), and 5¹ (from 30) — gives 2² × 3² × 5 = 4 × 9 × 5 = 180. You can check this with the pairwise shortcut too: GCD(12, 18) = 6, so LCM(12, 18) = (12 × 18) ÷ 6 = 36; then GCD(36, 30) = 6, so LCM(36, 30) = (36 × 30) ÷ 6 = 180, matching the factorization method. Enter the same three numbers above to see this exact breakdown.
Common Mistakes
- Mixing up LCM and GCD — the LCM is always the larger of the two results (or equal to it), never smaller than the biggest input number.
- Missing the shortcut case: if one number is already a multiple of another (like 6 and 18), the LCM is simply the larger number — no calculation needed.
- Entering decimals, zero, or negative numbers — the LCM is defined only for positive whole numbers, so the calculator will reject anything else.
- Assuming adding another number to the list always makes the LCM bigger by a lot — it only grows when that number contributes a prime factor (or a higher power of one) that wasn't already covered by the rest of the list.
Frequently Asked Questions
What's the difference between LCM and GCD?
How do I find the LCM of three or more numbers?
Why is the LCM used to add fractions with different denominators?
What is the LCM of two numbers with no common factors?
Related calculators: GCD Calculator, Greatest Common Factor Calculator, Prime Factorization Calculator, and Fraction Simplifier.