LCM Calculator
Find the Least Common Multiple of 2 to 5 numbers using prime factorization with a full step-by-step breakdown.
Enter 2 to 5 positive integers.
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 without a remainder. For example, LCM(4, 6) = 12 because 12 is the smallest number that both 4 and 6 divide into evenly. The LCM is the arithmetic counterpart to the Greatest Common Factor (GCF): while GCF finds the largest shared factor, LCM finds the smallest shared multiple.
The most efficient method for computing LCM uses the relationship LCM(a, b) = (a × b) / GCF(a, b), where the GCF is found using the Euclidean Algorithm. An alternative method is prime factorisation: express each number as a product of prime factors, then take the highest power of each prime that appears in any of the factorisations. The product of these highest powers is the LCM. For example: LCM(12, 18) = LCM(2²×3, 2×3²) = 2²×3² = 36.
LCM calculators are used in arithmetic for adding and subtracting fractions with unlike denominators (the LCM of the denominators gives the Least Common Denominator), in scheduling problems to find when recurring events next coincide, in music theory to find the length of rhythmic cycles, in computer science for synchronising processes, and in engineering for gear ratio and timing calculations.
LCM Formula
Worked Example
LCM(12, 18, 30)
How the LCM Calculator Works
Formula, assumptions, and calculation steps for this math tool.
Methodology
Math calculators apply the relevant arithmetic, algebraic, geometric, or numeric rule to the values entered and simplify the result where possible.
Calculation Steps
- Read the values and operation selected.
- Normalize signs, decimals, fractions, or units if needed.
- Apply the mathematical rule or formula.
- Format the answer and any intermediate values for checking.
Assumptions and Limits
- Inputs must be within the supported domain of the operation.
- Decimal answers may be rounded for readability.
- Symbolic simplification is limited to the calculator scope.
Frequently Asked Questions
The LCM of two or more integers is the smallest positive integer divisible by all of them. It is used to add fractions, find common denominators, and solve problems involving repeating cycles.
The GCF (Greatest Common Factor) is the largest number that divides all given numbers. The LCM is the smallest number that all given numbers divide into. For 12 and 18: GCF = 6, LCM = 36.
Factor each number into primes. For each unique prime, take the highest exponent that appears across all numbers. Multiply those prime powers together to get the LCM.
For two numbers a and b: LCM(a,b) × GCF(a,b) = a × b. This identity lets you find one if you know the other.
LCM is used when adding fractions (finding common denominators), scheduling repeating events that align simultaneously (e.g., two buses with different intervals), and in music theory for rhythm patterns.
Real-World Applications
Common Mistakes
LCM and GCF Quick Reference
| Numbers | GCF | LCM | Check: GCF×LCM = a×b |
|---|---|---|---|
| 4, 6 | 2 | 12 | 2 × 12 = 24 = 4 × 6 ✓ |
| 8, 12 | 4 | 24 | 4 × 24 = 96 = 8 × 12 ✓ |
| 7, 11 (primes) | 1 | 77 | 1 × 77 = 77 = 7 × 11 ✓ |
| 15, 25 | 5 | 75 | 5 × 75 = 375 = 15 × 25 ✓ |
| 6, 10, 15 | 1 | 30 | LCM of 3 numbers — 30 ÷ 6, 10, 15 all exact |
References
- Hardy, G.H. and Wright, E.M. An Introduction to the Theory of Numbers. Oxford University Press, 2008.
- Niven, Ivan, Zuckerman, Herbert S., and Montgomery, Hugh L. An Introduction to the Theory of Numbers. Wiley, 1991.
- Knuth, Donald. The Art of Computer Programming, Vol. 2. Addison-Wesley, 1997.
- National Council of Teachers of Mathematics. Principles and Standards for School Mathematics. NCTM, 2000.
- NIST/SEMATECH. e-Handbook of Statistical Methods. nist.gov, 2024.
Related Calculators
Browse all Math calculators →GCF Calculator
Calculate the Greatest Common Factor (GCF/GCD) of two or more numbers.
Factor Calculator
Find all factors and prime factors of any positive integer.
Prime Number Calculator
Check if a number is prime and find prime numbers up to any limit.