LCM Calculator
Find the least common multiple (LCM) and greatest common factor (GCF)—also called the greatest common divisor (GCD)—of two or more positive integers. Separate values with commas, spaces, or new lines. When you work with fractions, the LCM of denominators is the least common denominator (LCD)—the same step shown in our Simple Fraction Calculator.
Calculate LCM & GCF
Results
| LCM | — |
|---|---|
| GCF (GCD) | — |
How to find the least common multiple
The LCM of a set of numbers is the smallest positive integer that every number in the set divides evenly. Two common methods are listing multiples and prime factorization.
- List multiples of each number until you find the smallest value that appears in every list. Example: multiples of 4 are 4, 8, 12, … and multiples of 6 are 6, 12, 18, … so LCM(4, 6) = 12.
- Prime factorization: write each number as a product of primes, take the highest power of each prime that appears, and multiply. For 4 = 2² and 6 = 2 × 3, LCM = 2² × 3 = 12.
- For three or more numbers, find LCM(a, b), then LCM of that result with c, and continue through the list—the approach this calculator uses.
LCM and fractions
When adding or subtracting fractions, you need a common denominator. The smallest shared denominator is the LCD, which equals the LCM of the denominators. Our Simple Fraction Calculator and Mixed Fraction Calculator show that step when you combine fractions. For comparing fractions, see our guide on butterfly method vs. common denominators.
Units, rounding, and limits
This tool accepts positive integers only. Results are whole numbers formatted for display with up to 14 decimal places (trailing zeros trimmed). Very large inputs may exceed practical limits of integer arithmetic in the browser—typical homework-sized values work reliably.
FAQ
What is the difference between LCM and LCD?
LCM (least common multiple) is the smallest positive integer divisible by every number in your list. LCD (least common denominator) is the LCM of the denominators when you add or subtract fractions.
Can I find the LCM of more than two numbers?
Yes. Enter at least two positive whole numbers separated by commas, spaces, or new lines. The calculator folds the LCM across the full list.
Why does the calculator reject zero or decimals?
The least common multiple is defined for positive integers. Zero and non-whole inputs would not produce a meaningful LCM in standard school math, so the tool asks for positive whole numbers only.