LCM Calculator
Find the least common multiple of two or more numbers with prime factorization.
What Is the Least Common Multiple?
The least common multiple (LCM) of two or more integers is the smallest positive integer that is evenly divisible by each of them. For example, the LCM of 4 and 6 is 12, because 12 is the smallest number that both 4 and 6 divide into without a remainder.
How to Calculate the LCM
There are two common methods:
- Prime factorization: Write the prime factorization of each number, then take the highest power of each prime that appears in any factorization and multiply them together.
- Using the GCD: For two numbers, LCM(a, b) = |a × b| ÷ GCD(a, b). For more than two numbers, apply this iteratively.
For example, to find the LCM of 12, 18, and 24: their prime factorizations are 12 = 2² × 3, 18 = 2 × 3², and 24 = 2³ × 3. Take the highest power of each prime: 2³ × 3² = 8 × 9 = 72. So LCM(12, 18, 24) = 72.
Prime Factorization Explained
Prime factorization breaks a number down into a product of prime numbers. For example, 60 = 2² × 3 × 5. Every positive integer greater than 1 has a unique prime factorization (the Fundamental Theorem of Arithmetic). The calculator shows the factorization of each input number so you can see how the LCM is built from the highest powers of each prime.
Real-World Uses of the LCM
- Adding fractions: The LCM of denominators gives the least common denominator, simplifying addition and subtraction.
- Scheduling: If two events repeat every 4 and 6 days, the LCM (12) tells you when they next coincide.
- Gear ratios: The LCM helps determine when meshed gears return to their starting position.
- Number theory: The LCM is fundamental in modular arithmetic and cryptography.
LCM vs GCD
The LCM and GCD (Greatest Common Divisor) are closely related. The GCD is the largest number that divides all given numbers, while the LCM is the smallest number they all divide into. They are connected by the formula: LCM(a, b) × GCD(a, b) = a × b. This calculator shows both values so you can see the relationship.
Frequently Asked Questions
The LCM (Least Common Multiple) is the smallest positive integer that is divisible by each of the given numbers. For example, the LCM of 4 and 6 is 12, because 12 is the smallest number divisible by both 4 and 6.
The LCM can be found using prime factorization: list the prime factors of each number, take the highest power of each prime that appears, and multiply them together. Alternatively, use the relationship LCM(a, b) = |a × b| ÷ GCD(a, b).
Yes. Enter any number of comma-separated values and the calculator finds the LCM of all of them. The LCM of multiple numbers is found by iteratively computing LCM(a, b) and then LCM(result, next number).