📐 Math CalculatorsFree · No signup

LCM Calculator

Calculate the least common multiple (LCM) of two or more numbers. Uses prime factorization and division methods.

About the LCM Calculator

An LCM calculator (Least Common Multiple calculator) finds the smallest positive integer that is divisible by two or more given numbers. The LCM is essential for adding and subtracting fractions with different denominators (you need the LCD — Least Common Denominator — which is the LCM of the denominators), for synchronising repeating events at different intervals, and for solving many number theory and scheduling problems. Our calculator computes the LCM using both the GCF-based formula (LCM(a,b) = a x b / GCF(a,b)) and the prime factorisation method, showing every step so you understand the process rather than just receiving an answer. It handles two, three, or more numbers simultaneously, works with very large numbers, and displays results alongside the GCF for the same set of numbers since the two are mathematically linked.

Formula

LCM(a,b) = a x b / GCF(a,b) | Prime factorisation: take highest powers of all primes | LCM(a,b) >= max(a,b)

How It Works

Method 1 — Using GCF: LCM(a,b) = a x b / GCF(a,b). Example: LCM(12, 18). GCF(12,18) = 6. LCM = 12 x 18 / 6 = 216/6 = 36. Verify: 36/12 = 3 and 36/18 = 2, both integers. Method 2 — Prime factorisation: take each prime factor at its highest power appearing in either number. 12 = 2^2 x 3. 18 = 2 x 3^2. LCM = 2^2 x 3^2 = 4 x 9 = 36. For fractions: to add 1/12 + 1/18, the LCD = LCM(12,18) = 36. Convert: 3/36 + 2/36 = 5/36. Three or more numbers: LCM(a,b,c) = LCM(LCM(a,b), c).

Tips & Best Practices

  • Fraction addition: the LCD (Least Common Denominator) for fractions with different denominators is the LCM of those denominators. Always find the LCM before adding or subtracting fractions.
  • LCM is always at least as large as the largest input: LCM(a,b) >= max(a,b). LCM equals the larger number only when the smaller divides evenly into the larger.
  • Coprime numbers: LCM(a,b) = a x b when GCF(a,b) = 1. The LCM of coprime numbers is their product: LCM(7,9) = 63 because GCF(7,9) = 1.
  • Scheduling problems: if event A repeats every 4 days and event B every 6 days, they next coincide after LCM(4,6) = 12 days. Gear synchronisation, traffic light coordination, and musical polyrhythm alignment are all LCM problems.
  • Three gears meshing: gears with 12, 18, and 24 teeth all return to their starting position after LCM(12,18,24) = 72 tooth-passes of rotation.
  • LCM in music: two rhythmic patterns — one repeating every 3 beats and one every 4 beats — realign every LCM(3,4) = 12 beats, creating the characteristic feel of 3-against-4 polyrhythm.
  • Large number LCMs: for numbers with large prime factors, the GCF-based formula is computationally more efficient than prime factorisation because it reuses the Euclidean algorithm result.
  • LCM of consecutive integers: LCM(1,2,3,...,n) grows approximately as e^n (exponentially) — this function appears in prime number theory and the proof that there are infinitely many primes.

Who Uses This Calculator

Students adding and subtracting fractions with unlike denominators find the LCD using the LCM calculator. Algebra students find common denominators for rational expressions. Number theory students explore divisibility and prime factorisation. Engineers synchronise periodic processes — machine cycles, sampling rates, and signal periods. Music composers and producers work with polyrhythmic structures. Programmers scheduling cron jobs at different intervals find when all tasks will run simultaneously. Teachers create fraction problems with specific LCD requirements.

Optimised for: USA · Canada · UK · Australia · Calculations run in your browser · No data stored

Frequently Asked Questions

What is LCM used for?

LCM is used to add fractions with different denominators. LCM(4,6) = 12, so 1/4 + 1/6 = 3/12 + 2/12 = 5/12.