Skip to content
Return to Calculators Hub

Least Common Multiple Calculator (LCM)

Math

Find the Least Common Multiple (LCM / LCD) of two or more numbers with step-by-step prime factorization and division methods.

Presets:
LCM(12, 18, 30) =
180

Prime Factorization Method Steps

1. Prime Factorization of Each Number
12 = 2^2 × 3, 18 = 2 × 3^2, 30 = 2 × 3 × 5

Decompose each number into its prime factors.

2. Highest Power of Each Prime
Highest powers: 2^2, 3^2, 5^1

For each prime factor appearing in any of the factorizations, choose the largest exponent.

3. Multiply Highest Prime Powers
LCM = 2^2 × 3^2 × 5 = 180

The product of these highest powers yields the Least Common Multiple: 180.

How This Calculator Works

The Least Common Multiple (LCM), or lowest common multiple, of two or more non-zero integers is the smallest positive integer that is divisible by each of the given numbers. Finding the LCM is the fundamental step required when adding, subtracting, or comparing fractions with unlike denominators.

📐 LCM via Greatest Common Divisor & Prime Factors
LCM(a, b) = |a · b| / GCD(a, b) | LCM(a, b, c) = ∏ pᵢ^(max(eᵢ))
a, b: Input integers whose common multiple is sought
GCD(a, b): Greatest Common Divisor of a and b
pᵢ^(max(eᵢ)): Highest power of each prime factor present across all numbers

Key Mathematical Rules & Properties

Prime Factorization Method

Decompose every number into its prime factors. For every prime number appearing in any factorization, take the highest exponent and multiply them together.

GCD / Euclidean Relation

For two numbers a and b, the product of their LCM and GCD equals the product of the numbers: LCM(a, b) × GCD(a, b) = |a × b|.

Successive Pair Reduction

To find the LCM of three or more numbers, compute pairwise: LCM(a, b, c) = LCM(LCM(a, b), c).

Coprime Numbers

If two numbers are coprime (they share no common factors other than 1), their LCM is simply their direct product: a × b.

✎

Worked Example: Finding LCM(12, 18, 30)

Find the Least Common Multiple of the numbers 12, 18, and 30.

  1. Find prime factorization of each number:
  2. 12 = 2² × 3¹
  3. 18 = 2¹ × 3²
  4. 30 = 2¹ × 3¹ × 5¹
  5. Take the highest power for each prime factor (2, 3, 5):
  6. Highest power of 2: 2² = 4
  7. Highest power of 3: 3² = 9
  8. Highest power of 5: 5¹ = 5
  9. Multiply max powers: 2² × 3² × 5¹ = 4 × 9 × 5 = 180.
Final Answer: LCM(12, 18, 30) = 180

Frequently Asked Questions

Can the LCM ever be smaller than the largest input number?

No. The LCM must be a multiple of every input number, so it must always be greater than or equal to the largest number in the set.

What is the LCM of 0 and any number?

The LCM is formally defined for positive integers. If 0 is included, the only common multiple is 0, so LCM(a, 0) is typically defined as 0.

Why do we need the LCM to add fractions?

To add fractions like 1/12 + 1/18, you must find a common denominator. The Least Common Denominator (LCD) is precisely the LCM of the denominators (LCM(12, 18) = 36).

How are LCMs used in real-world scheduling?

If bus A arrives every 12 minutes and bus B arrives every 18 minutes, they will arrive simultaneously at the station every LCM(12, 18) = 36 minutes.

Understanding your calculation

Method, example and limitations

How the calculation works

The least common multiple is the smallest positive integer divisible by each input integer. For two positive integers, LCM(a,b) = |a × b| / GCF(a,b).

Example to check

Multiples of 6 and 8 first meet at 24, so their least common multiple is 24.

Before using the result

Use integer inputs. Very large integer products can exceed the exact range of ordinary floating-point arithmetic.

Calculation methodology · Report a result that needs review