LCM Calculator

Calculate the Least Common Multiple (LCM) and Greatest Common Factor (GCF) for any set of numbers with prime factor trees and ladder method steps.

LCMLCM(12, 18)
Prime power product: 2² × 3² = 36
36
GCD / GCF: 6LCD (¹⁄₁₂ + ¹⁄₁₈): 36Count: 2
Comma or space separated
1218
Presets:

Method 1: Prime Factorization (Highest Exponent Rule)

#112 = 2² × 3¹
#218 = 2¹ × 3²
Highest power of each prime factor:
2² = 43² = 9
LCM(12, 18) = 2² × 3² = 4 × 9 = 36
Mathematical Identity: LCM(a, b) × GCD(a, b) = a × b
For any pair of positive integers a and b, the product of their Least Common Multiple and Greatest Common Divisor equals the product of the numbers: LCM(a, b) × GCD(a, b) = a × b.Verification: 36 × 6 = 216 = 12 × 18

About the LCM Calculator

The Least Common Multiple (LCM), also known as the Lowest Common Denominator (LCD) in fractions, is the smallest positive integer that is divisible by all numbers in a given set without leaving a remainder. Whether adding fractions with unlike denominators, planning recurring schedules, or solving algebraic equations, our free online LCM calculator provides instant solutions alongside both LCM and GCD (Greatest Common Divisor), complete with step-by-step prime factorization trees, cake/ladder division tables, and multiples lists.

How to Use This Calculator

  1. 1Enter two or more positive integers separated by commas, spaces, or using the input boxes (e.g. 12, 18, 30).
  2. 2Click any quick preset button (such as "12 & 18" or "8, 12, 16") to load standard textbook problems instantly.
  3. 3Examine the primary LCM result and the dual GCD / GCF output in the results panel.
  4. 4Review the step-by-step methods below: Prime Factorization (highest power of each prime), Division/Ladder method, or Listing Multiples.
  5. 5Use the one-click copy button to copy the answer and formula directly into your homework or study notes.

Formula & Calculation Methodology

There are three primary mathematical methods to calculate the Least Common Multiple: 1. Prime Factorization Method (Most rigorous): • Factor each integer into prime powers: a = p₁ᵉ¹ × p₂ᵉ² × …, b = p₁ᶠ¹ × p₂ᶠ² × … • For each unique prime factor, choose the highest exponent: max(eᵢ, fᵢ). • Multiply these highest prime powers together: LCM(a, b) = ∏ pᵢᵐᵃˣ⁽ᵉⁱ˒ᶠⁱ⁾. 2. Formula using the Greatest Common Divisor (GCD): For any two positive integers a and b: LCM(a, b) = (a × b) ÷ GCD(a, b) 3. Division / Cake / Ladder Method: Write the numbers in a row and divide them by shared prime divisors (2, 3, 5, …) repeatedly until all columns reach 1. The product of the prime divisors equals the LCM.

Worked Example: Finding the LCM of 12 and 18

Scenario: Calculate the Least Common Multiple of 12 and 18 with full prime factorization steps.

Step 1: Find Prime Factorizations: 12 = 2 × 2 × 3 = 2² × 3¹ 18 = 2 × 3 × 3 = 2¹ × 3²
12 = 2² × 3¹, 18 = 2¹ × 3²
Step 2: Select Highest Exponent for Each Prime Factor: For prime 2: max exponent is 2 (2² = 4). For prime 3: max exponent is 2 (3² = 9).
2² and 3²
Step 3: Multiply Highest Prime Powers: LCM(12, 18) = 2² × 3² = 4 × 9 = 36
LCM = 36
Step 4: Verification with GCD Formula: GCD(12, 18) = 6 → LCM = (12 × 18) ÷ 6 = 216 ÷ 6 = 36
36 confirmed
Conclusion: The Least Common Multiple of 12 and 18 is 36, and their Greatest Common Divisor is 6.

Assumptions & Practical Limitations

  • LCM is defined for positive integers (natural numbers). Non-integers are automatically rounded to integers.
  • Zero has no positive common multiples; the calculator requires positive integers greater than 0.
  • Negative integers can be entered; the magnitude (absolute value) is used according to standard algebraic convention.

Frequently Asked Questions

The LCM of 12 and 18 is 36. Multiples of 12 are 12, 24, 36, 48… Multiples of 18 are 18, 36, 54… The smallest positive multiple they share in common is 36.