LCM Calculator

Calculate the Least Common Multiple (LCM) of two or more numbers using prime factorization.

Enter Numbers

You can enter 2 or more numbers

Quick Examples:

LCM (Least Common Multiple) is the smallest positive integer that is divisible by all given numbers. It's useful for finding common denominators when adding fractions.

LCM of 4, 6

12

🎯LCM
12
🔢GCD
2

Prime Factorizations:

4 = 2^2
6 = 2 × 3

LCM = Product of highest powers of all primes:

2^2 × 3 = 12

Multiples:

4:4, 8, 12, 16, 20, 24, 28, 32, 36, 40...
6:6, 12, 18, 24, 30, 36, 42, 48, 54, 60...

First common multiple: 12

First 3 Common Multiples:

12, 24, 36

Verification:

LCM × GCD = 12 × 2 = 24

4 × 6 = 24

✓ Verified: LCM × GCD = a × b

How to Find LCM

Method 1: Prime Factorization

  1. Find prime factorization of each number
  2. Take highest power of each prime
  3. Multiply them together

Method 2: Using GCD

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

This is faster for two numbers

Applications of LCM

Adding Fractions

Find common denominator: LCD = LCM of denominators

Scheduling

When events with different periods align again

Gear Systems

Calculate when gears return to starting position

Music

Finding when rhythms synchronize

What is the Least Common Multiple (LCM)?

The Least Common Multiple (LCM) is the smallest positive integer that is divisible by all given numbers. It's the smallest number that appears in the multiplication table of each input number. Understanding LCM is essential for working with fractions, scheduling, and many mathematical applications.

Alternative Names:

  • Lowest Common Multiple - Same as LCM
  • Least Common Denominator (LCD) - LCM of denominators when adding fractions
  • Smallest Common Multiple - Less common term

Basic Properties of LCM:

  • LCM(a, b) = LCM(b, a) - Commutative property
  • LCM(a, 1) = a for any positive integer a
  • LCM(a, a) = a for any positive integer a
  • LCM(a, b) ≥ max(a, b) - LCM is at least as large as the larger number
  • If a divides b, then LCM(a, b) = b

Simple Examples:

  • LCM(4, 6) = 12 (smallest number divisible by both 4 and 6)
  • LCM(3, 5) = 15 (since 3 and 5 are coprime)
  • LCM(6, 8) = 24
  • LCM(2, 3, 4) = 12

Methods for Finding LCM

There are several approaches to calculate the LCM:

Method Process Best For Example
GCD Method LCM = (a × b) / GCD(a, b) Large numbers, efficiency LCM(12,18) = 216/6 = 36
Prime Factorization Take highest power of each prime Understanding, multiple numbers 12=2²×3, 18=2×3² → LCM=2²×3²=36
Listing Multiples List multiples, find first common Small numbers, teaching 4: 4,8,12,16... 6: 6,12... → LCM=12
Ladder/Division Method Divide by primes simultaneously Multiple numbers, visual Systematic division approach

Listing Multiples Method:

  1. List multiples of each number
  2. Find the smallest number that appears in all lists
  3. That common number is the LCM

LCM Using GCD Formula

The most efficient way to find LCM uses the relationship with GCD:

LCM-GCD Relationship

LCM(a, b) = |a × b| / GCD(a, b) Alternatively: LCM(a, b) × GCD(a, b) = |a × b| Example: LCM(12, 18) Step 1: Find GCD(12, 18) = 6 Step 2: LCM = (12 × 18) / 6 = 216 / 6 = 36 Verification: 36 ÷ 12 = 3 ✓ 36 ÷ 18 = 2 ✓

Where:

  • a, b= The two numbers to find LCM of
  • GCD= Greatest Common Divisor
  • LCM= Least Common Multiple result

Prime Factorization Method

The prime factorization method gives insight into why the LCM works:

Prime Factorization for LCM

LCM = Product of each prime to its HIGHEST power Example: LCM(60, 90) 60 = 2² × 3 × 5 90 = 2 × 3² × 5 Primes present: 2, 3, 5 Highest powers: 2², 3², 5¹ LCM = 2² × 3² × 5 = 4 × 9 × 5 = 180

Where:

  • Prime= Each unique prime factor
  • Highest Power= Maximum exponent for each prime across all numbers

How to Use This LCM Calculator

Our LCM calculator quickly finds the least common multiple with detailed steps:

  1. Enter Numbers: Input two or more positive integers
  2. Click Calculate: The calculator computes the LCM
  3. View Results:
    • LCM value
    • Step-by-step calculation
    • Prime factorizations of all inputs
    • Related GCD value

Features:

  • Calculate LCM of 2, 3, or more numbers
  • Shows prime factorization method
  • Displays GCD relationship
  • Handles large numbers efficiently

Tips:

  • LCM of coprime numbers is their product
  • For fractions, LCD = LCM of denominators
  • LCM is always at least as large as the largest input

Real-World Applications of LCM

LCM has many practical applications:

Adding and Subtracting Fractions:

  • The LCD (Least Common Denominator) is the LCM of the denominators
  • Example: 1/4 + 1/6 → LCD = LCM(4,6) = 12
  • Convert: 3/12 + 2/12 = 5/12

Scheduling and Timing:

  • Event Scheduling: When will two recurring events coincide?
  • Bus A comes every 12 minutes, Bus B every 18 minutes
  • They meet every LCM(12,18) = 36 minutes

Gear and Pulley Systems:

  • Finding when gears return to starting position
  • Calculating rotation synchronization
  • Belt and chain drive calculations

Music and Rhythm:

  • Finding when polyrhythms align
  • Calculating measure lengths for different time signatures
  • Audio sample rate conversions

Construction and Design:

  • Tile patterns that repeat at regular intervals
  • Brick laying patterns
  • Wallpaper and fabric patterns

Finding LCM of Multiple Numbers

To find the LCM of more than two numbers, apply LCM iteratively or use prime factorization:

Iterative Method:

  • LCM(a, b, c) = LCM(LCM(a, b), c)
  • LCM(a, b, c, d) = LCM(LCM(LCM(a, b), c), d)

Example: LCM(4, 6, 8)

  1. First find LCM(4, 6) = 12
  2. Then find LCM(12, 8) = 24
  3. Therefore, LCM(4, 6, 8) = 24

Prime Factorization for Multiple Numbers:

  • 4 = 2²
  • 6 = 2 × 3
  • 8 = 2³
  • Highest powers: 2³, 3¹
  • LCM = 2³ × 3 = 8 × 3 = 24

Ladder (Division) Method:

Divide all numbers by prime factors until all reach 1, then multiply all divisors:

2 | 4   6   8
2 | 2   3   4
2 | 1   3   2
3 | 1   3   1
  | 1   1   1
LCM = 2 × 2 × 2 × 3 = 24
        

Worked Examples

GCD Method Example

Problem:

Find LCM(24, 36) using the GCD method

Solution Steps:

  1. 1First find GCD(24, 36) using Euclidean algorithm
  2. 236 = 24 × 1 + 12
  3. 324 = 12 × 2 + 0
  4. 4GCD(24, 36) = 12
  5. 5Apply formula: LCM = (24 × 36) / 12
  6. 6LCM = 864 / 12 = 72
  7. 7Verify: 72 ÷ 24 = 3 ✓, 72 ÷ 36 = 2 ✓

Result:

LCM(24, 36) = 72

Prime Factorization Example

Problem:

Find LCM(45, 75) using prime factorization

Solution Steps:

  1. 1Factor 45: 45 = 3² × 5
  2. 2Factor 75: 75 = 3 × 5²
  3. 3Identify all primes: 3 and 5
  4. 4Take highest powers: 3² and 5²
  5. 5Multiply: 3² × 5² = 9 × 25 = 225
  6. 6Verify: 225 ÷ 45 = 5 ✓, 225 ÷ 75 = 3 ✓

Result:

LCM(45, 75) = 225

Adding Fractions Example

Problem:

Add 5/12 + 7/18 by finding the LCD

Solution Steps:

  1. 1Find LCD = LCM(12, 18)
  2. 212 = 2² × 3, 18 = 2 × 3²
  3. 3LCM = 2² × 3² = 36
  4. 4Convert fractions: 5/12 = 15/36, 7/18 = 14/36
  5. 5Add: 15/36 + 14/36 = 29/36
  6. 629/36 is already in lowest terms (GCD(29,36) = 1)

Result:

5/12 + 7/18 = 29/36

Tips & Best Practices

  • Use the GCD formula for efficiency: LCM(a,b) = (a × b) / GCD(a,b)
  • LCM of coprime numbers (GCD=1) is simply their product
  • For fractions, LCD = LCM of all denominators
  • LCM is always ≥ the largest input number
  • For multiple numbers: LCM(a,b,c) = LCM(LCM(a,b),c)
  • Prime factorization method: take highest power of each prime
  • Check your answer: the LCM should be divisible by all input numbers

Frequently Asked Questions

Use LCM when you need to find a common multiple (like finding LCD for fractions or when events coincide). Use GCD when you need to find a common factor (like simplifying fractions or dividing things into equal groups). LCM makes things bigger (finding smallest common multiple), while GCD makes things smaller (finding largest common divisor).
Finding LCM directly by listing multiples can be slow for large numbers. The formula LCM(a,b) = (a×b)/GCD(a,b) is efficient because the Euclidean algorithm finds GCD quickly in O(log n) time. This avoids having to list potentially huge numbers of multiples.
When two numbers are coprime (GCD = 1), their LCM equals their product. For example, LCM(7, 9) = 63 = 7 × 9 because GCD(7, 9) = 1. This makes sense because coprime numbers share no common factors, so the smallest common multiple must include all factors from both numbers.
The Least Common Denominator (LCD) is the LCM of all the denominators. For example, to add 1/4 + 1/6 + 1/9, find LCM(4, 6, 9). Using prime factorization: 4=2², 6=2×3, 9=3². LCM = 2² × 3² = 36. Convert each fraction to have denominator 36, then add the numerators.
No, the LCM is always at least as large as the largest input number. This is because the LCM must be divisible by all inputs, and a number can only be divisible by numbers smaller than or equal to itself. LCM equals the larger number only when the smaller number divides it evenly.
If one number divides the other evenly (like 4 and 12), then the LCM is simply the larger number. LCM(4, 12) = 12 because 12 is already divisible by both 4 and 12. No 'scaling up' is needed. This follows from the formula: LCM = (4×12)/GCD(4,12) = 48/4 = 12.

Sources & References

Last updated: 2026-01-22