Home › Math Calculators › LCM Calculator
∿ FREE NUMBER THEORY CALCULATOR

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.

✓ 2–10 Numbers ⚡ Instant LCM 🔢 Prime Factors 📘 Calculation Steps No Signup
∿
LEAST COMMON MULTIPLE Find the First Shared Multiple
LCM
NUMBER 12
+
NUMBER 18
→
LCM 36
12: 12, 24, 36   •   18: 18, 36   →   first common multiple = 36
🔢
LEAST COMMON MULTIPLE Enter Whole Numbers

Enter at least two integers. You can add up to 10 numbers. Negative integers are treated by their absolute values.

LEAST COMMON MULTIPLE 36

The least common multiple of 12 and 18 is 36.

📘 Calculation Details

📘 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:

EXAMPLE LCM(12, 18) = 36

⚙ 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:

PRIME FACTORIZATION 12 = 2² × 3    and    18 = 2 × 3²

The highest power of 2 is 2² and the highest power of 3 is 3². Multiplying those together gives:

LCM FROM PRIME FACTORS 2² × 3² = 4 × 9 = 36

÷ LCM and GCD Relationship

For two non-zero integers, the LCM can also be calculated using their greatest common divisor (GCD):

LCM / GCD FORMULA LCM(a, b) = |a ÷ GCD(a,b) × b|

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:

EXAMPLE LCM(12,18) = |12 ÷ 6 × 18| = 36

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.

3+ 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.

EXAMPLE: 4, 6 AND 8 LCM(4,6) = 12 → LCM(12,8) = 24

Therefore:

FINAL RESULT LCM(4, 6, 8) = 24

The calculator above follows this progressive method for up to 10 integers.

0 What Happens When One Number Is Zero?

This calculator returns 0 when any input is zero. That convention follows the commonly used arithmetic definition:

ZERO CASE LCM(a, 0) = 0

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.

NEGATIVE INTEGER EXAMPLE LCM(-6, 8) = LCM(6, 8) = 24

1 What If One Number Divides the Other?

If one positive integer is already a multiple of the other, the larger number is their LCM.

EXAMPLE LCM(4, 12) = 12 12 is already divisible by 4.
EXAMPLE LCM(5, 20) = 20 20 is already a multiple of 5.
EXAMPLE LCM(7, 21) = 21 21 is divisible by 7.

★ 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.

COPRIME EXAMPLE GCD(5,7) = 1 → LCM(5,7) = 5 × 7 = 35

½ 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:

FRACTION EXAMPLE 1/6 + 1/8

The LCM of 6 and 8 is 24, so both fractions can be rewritten using denominator 24:

COMMON DENOMINATOR 1/6 = 4/24    and    1/8 = 3/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:

REPEATING CYCLES LCM(6,8) = 24

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.

Scroll to Top