LCM Calculator (Least Common Multiple)
Find the least common multiple of any set of numbers, with step-by-step working and prime factorizations.
✕ What is the Least Common Multiple?
The least common multiple (LCM) of two or more positive integers is the smallest positive integer that is perfectly divisible by all of them. For example, LCM(4, 6) = 12 because 12 is the smallest number that both 4 and 6 divide into evenly. The LCM is also called the Lowest Common Multiple (LCM), and when used in the context of fractions it is called the Least Common Denominator (LCD).
LCM appears in many practical contexts. Adding and subtracting fractions requires a common denominator: to add 1/4 + 1/6, the LCD is LCM(4, 6) = 12, giving 3/12 + 2/12 = 5/12. Scheduling problems use LCM to find when repeating events next coincide: if Bus A comes every 12 minutes and Bus B every 18 minutes, they next arrive together after LCM(12, 18) = 36 minutes. Gear problems use LCM to find when two meshing gears return to their starting alignment: gears with 8 and 12 teeth align after LCM(8, 12) = 24 teeth have passed.
There are two standard methods to compute LCM. The GCF method uses the relationship LCM(a, b) = (a × b) / GCF(a, b): find the GCF first using the Euclidean algorithm, then divide the product by it. This is the fastest method for two large numbers. The prime factorization method factors each number into primes, then multiplies each distinct prime raised to its highest exponent across all numbers. For three or more numbers, both methods apply iteratively.
A key relationship connects LCM and GCF: GCF(a, b) × LCM(a, b) = a × b. This means knowing one immediately gives the other. If two numbers are coprime (GCF = 1), their LCM equals their product. If one number divides the other, the LCM is the larger number. This calculator shows both LCM and GCF together, with prime factorizations and step-by-step arithmetic so you can verify or learn the method.
📐 Formula
📖 How to Use This Calculator
Steps
💡 Example Calculations
Example 1 — LCM of 12 and 18
Find LCM(12, 18) using the GCF method
Example 2 — Common denominator for 1/4 + 1/6
Find the least common denominator to add fractions 1/4 and 1/6
Example 3 — Bus scheduling problem
Bus A departs every 12 minutes, Bus B every 20 minutes. When do they next depart together?
Example 4 — LCM of three numbers: 4, 6, and 10
Find LCM(4, 6, 10) by applying LCM iteratively
❓ Frequently Asked Questions
🔗 Related Calculators
What is the least common multiple (LCM)?
The least common multiple (LCM) of two or more integers is the smallest positive integer that is divisible by all of them. For example, LCM(4, 6) = 12 because 12 is the smallest number divisible by both 4 and 6. LCM is also called the Lowest Common Multiple or, in the context of fractions, the Least Common Denominator (LCD).
How do you find the LCM using the GCF method?
The GCF method is the fastest approach: LCM(a, b) = (a × b) / GCF(a, b). First find GCF using the Euclidean algorithm, then divide the product by GCF. Example: LCM(12, 18): GCF(12, 18) = 6; LCM = (12 × 18) / 6 = 216 / 6 = 36.
What is the LCM of 4 and 6?
LCM(4, 6) = 12. The multiples of 4 are 4, 8, 12, 16, 20... The multiples of 6 are 6, 12, 18, 24... The first common value is 12. Confirmed by formula: GCF(4, 6) = 2; LCM = (4 × 6) / 2 = 24 / 2 = 12.
How do you find LCM using prime factorization?
Write each number as a product of prime factors. Identify all distinct primes across all numbers. Multiply each prime raised to its highest exponent. Example: LCM(12, 18): 12 = 2² × 3; 18 = 2 × 3². All primes with highest exponents: 2² and 3². LCM = 4 × 9 = 36.
What is LCM used for in adding fractions?
LCM gives the least common denominator (LCD) for adding or subtracting fractions. To add 1/4 + 1/6: find LCM(4, 6) = 12. Convert: 1/4 = 3/12 and 1/6 = 2/12. Sum: 3/12 + 2/12 = 5/12. Using LCM rather than a larger common denominator keeps the numbers small and the final fraction in lowest terms.
What is the difference between LCM and GCF?
GCF (Greatest Common Factor) is the largest number that divides all inputs; LCM is the smallest number that all inputs divide. GCF makes things smaller (simplifying fractions), while LCM makes things larger (finding common denominators). They are linked: GCF(a,b) × LCM(a,b) = a × b.
How do you find LCM of three or more numbers?
Apply LCM iteratively: find LCM of the first two, then find LCM of that result and the third number, and so on. LCM(4, 6, 10): LCM(4, 6) = 12; LCM(12, 10) = 60. So LCM(4, 6, 10) = 60. This works because LCM is associative: LCM(a, b, c) = LCM(LCM(a, b), c).
What is the LCM of two coprime numbers?
When GCF(a, b) = 1 (the numbers are coprime), LCM(a, b) = a × b. For example, 8 and 15 share no common factor (GCF = 1), so LCM(8, 15) = 120. Similarly, any two distinct primes p and q have LCM(p, q) = p × q because primes have no common factors.
What is the LCM of 12 and 18?
LCM(12, 18) = 36. Using the GCF method: GCF(12, 18) = 6; LCM = (12 × 18) / 6 = 216 / 6 = 36. Using prime factorization: 12 = 2² × 3 and 18 = 2 × 3². Highest exponents: 2² and 3². LCM = 4 × 9 = 36. Verify: 36 / 12 = 3 and 36 / 18 = 2, both exact.
What is the real-world use of LCM in scheduling problems?
LCM solves scheduling problems involving repeating cycles. If event A happens every 4 days and event B every 6 days, they next coincide after LCM(4, 6) = 12 days. A machine that cycles every 8 minutes and another every 12 minutes next synchronize after LCM(8, 12) = 24 minutes. Traffic lights, gear rotations, and planetary alignments all use this principle.
What is the LCM of a number and its multiple?
If b is a multiple of a (meaning b = k × a for some integer k), then LCM(a, b) = b. For example, LCM(6, 12) = 12 because 12 is already divisible by 6. LCM(5, 25) = 25. This makes sense: b is already a common multiple of both a and b, and it is the smallest one.