C

Least Common Multiple Calculator

Compute the least common multiple (LCM), also called the lowest common multiple, for 2–10 positive integers. Enter values to get the LCM of multiple numbers with a pairwise LCM chain and a prime factorization table; share deep links to preset inputs.

Least Common Multiple (LCM)

Numbers

Results

Input: 12, 18, 30
180
Least Common Multiple

GCD Method (Step-by-step)

LCM(12, 18) via GCD = 636
gcd(12, 18) → 12 = 18 × 0 + 12
gcd(18, 12) → 18 = 12 × 1 + 6
gcd(12, 6) → 12 = 6 × 2 + 0
gcd = 6
LCM(36, 30) via GCD = 6180
gcd(36, 30) → 36 = 30 × 1 + 6
gcd(30, 6) → 30 = 6 × 5 + 0
gcd = 6
Chain result: LCM(12,18)=36 → LCM(36,30)=180 → Final LCM = 180

Prime Factorization

NumberPrime Powers
122^2 × 3^1
182^1 × 3^2
302^1 × 3^1 × 5^1
Max powers2^2 × 3^2 × 5^1
Product180

How to Calculate LCM

Formulas

GCD method: LCM(a,b) = |a·b| / GCD(a,b)
Iterative: LCM(a,b,c) = LCM(LCM(a,b), c)

Sources: Wolfram MathWorld – Least Common Multiple; Wolfram MathWorld – Greatest Common Divisor

Calculation Steps:

  1. 1
    List integers
    Use 2–10 positive integers
  2. 2
    Compute GCD
    Use Euclidean algorithm for each pair
  3. 3
    Iterate LCM
    LCM = LCM(prev, next)

Important Considerations

⚠️ Input Constraints

Only positive integers are supported; zeros and non-integers are ignored.

🔢 Range

Supports 2–10 numbers; extra inputs are ignored.

🧮 Large Results

LCM can grow quickly; extremely large outputs may overflow typical displays.

🧩 Co-prime Numbers

When numbers are co-prime, LCM equals their product.

0 Values

Zero is ignored to avoid undefined behavior for LCM(0, n).

Example Cases

Case 1

Input: 12, 18, 30
LCM: 180

Because 180 is divisible by 12, 18, and 30.

Case 2

Input: 8, 9
LCM: 72

LCM(8,9) = 8×9 / GCD(8,9) = 72.

Tips & Notes

Prime Factorization

Break each number into primes and multiply the highest powers across all numbers.

When to Use

Useful for finding common periods, scheduling cycles, or aligning repeating tasks.

Frequently Asked Questions

What is the least common multiple (LCM)? Is it the same as lowest common multiple?
Yes. Least common multiple (LCM) and lowest common multiple refer to the same concept: the smallest positive integer that is a multiple of each number in the set.
How do you compute LCM?
Two common methods: (1) Pairwise LCM using the identity LCM(a,b) = |a·b| / GCD(a,b) and chaining for the LCM of multiple numbers; (2) Prime factorization to build a prime power table and take the highest powers across all inputs.
What inputs does this tool support?
It supports 2–10 positive integers. You can paste values separated by commas, spaces, semicolons, or newlines (e.g., 12, 18, 30). The tool computes the LCM of multiple numbers and shows a prime factorization table.
Can I share a link with prefilled numbers?
Yes. Use the Share button to copy a deep link containing your current inputs via the values parameter. The link reproduces your pairwise LCM chain and prime factorization table.