LCM Calculator (Least Common Multiple)
Use commas or spaces. Supports negative numbers and zero (integers only).
What Is LCM?
The least common multiple (LCM) of two or more integers is the smallest positive number that each of those integers divides evenly. If you are searching for a fast and reliable calculator lcm tool, this page gives you both an instant calculator and a practical guide.
For example, the LCM of 4 and 6 is 12 because 12 is the first number that appears in both multiplication lists:
- Multiples of 4: 4, 8, 12, 16, 20, ...
- Multiples of 6: 6, 12, 18, 24, ...
How This LCM Calculator Works
This calculator uses the relationship between LCM and GCD (greatest common divisor):
LCM(a, b) = |a × b| / GCD(a, b)
For more than two numbers, it computes pair-by-pair:
LCM(a, b, c) = LCM(LCM(a, b), c).
The result section also shows intermediate steps so you can verify the math.
Why use GCD instead of listing multiples?
Listing multiples can become slow and messy for larger numbers. The GCD method is efficient, accurate, and scales better when you have three, four, or more values.
Real-World Uses of LCM
- Scheduling: Find when repeating events align again (e.g., buses every 12 and 18 minutes).
- Fractions: Find a common denominator quickly.
- Manufacturing cycles: Synchronize production intervals.
- Computer science: Coordinate periodic tasks and timers.
Step-by-Step Example
Find LCM of 8, 12, and 20
First compute LCM(8, 12):
- GCD(8, 12) = 4
- LCM(8, 12) = (8 × 12) / 4 = 24
Now combine that with 20:
- GCD(24, 20) = 4
- LCM(24, 20) = (24 × 20) / 4 = 120
So, LCM(8, 12, 20) = 120.
Common Mistakes to Avoid
- Using non-integers (LCM is defined for integers in this calculator).
- Confusing GCD with LCM (they are related but not the same).
- Forgetting that the least common multiple is usually treated as non-negative.
- Ignoring zero: if any number is 0, pairwise LCM with 0 becomes 0.
Quick FAQ
Can I enter negative numbers?
Yes. The calculator uses absolute values for the final multiple, so the LCM output is non-negative.
Can I calculate LCM for many numbers at once?
Yes. Enter a list separated by commas or spaces, such as 14 21 35 70.
Does this support large integers?
Yes. It uses BigInt in JavaScript, which handles very large whole numbers accurately.