LCM Calculator
Find the least common multiple of two to five whole numbers and see the prime factors, GCD shortcut and verification steps.
How to Use the LCM Calculator
Select two to five whole numbers. Additional input fields appear only when needed.
Type non-negative integers. The calculator treats negative entries by using their absolute value and defines any set containing zero as having LCM zero.
Review the least common multiple, the highest prime powers used, the GCD shortcut and a multiple check.
Copy the formatted answer for homework or share the URL so the same numbers reopen with one click.
Formula & Calculation Logic
The least common multiple is the smallest positive whole number divisible by every input. For two numbers, the fastest method is to divide their product by the greatest common divisor. For three or more numbers, apply that rule pairwise or use prime factorisation: take each prime that appears in any number, raised to the highest exponent found anywhere, then multiply.
Worked Example
Scheduling With a Three-Number LCM
Buses on three routes leave every 12, 18 and 30 minutes. The LCM of 12, 18 and 30 is 180, so all three routes leave together every 180 minutes, or every three hours. Prime factors are 12 = 2² × 3, 18 = 2 × 3² and 30 = 2 × 3 × 5; taking the highest powers gives 2² × 3² × 5 = 180.
Common LCM Reference
Useful least common multiples for fractions, timetables and repeating events.
| Numbers | GCD | LCM | Typical use |
|---|---|---|---|
| 4 and 6 | 2 | 12 | Fraction denominators |
| 8 and 12 | 4 | 24 | Common schedules |
| 12 and 18 | 6 | 36 | Repeating work cycles |
| 15 and 20 | 5 | 60 | Clock and timing problems |
| 24 and 36 | 12 | 72 | Large interval planning |
Visual Explanation Diagram
An LCM takes the highest power of each prime factor present in any input.
Frequently Asked Questions
The least common multiple, or LCM, is the smallest positive number that is a multiple of every number in a set. For 4 and 6, the LCM is 12.
For two numbers, multiply them and divide by their greatest common divisor: LCM(a, b) = a × b ÷ GCD(a, b). For 12 and 18, 216 ÷ 6 = 36.
A GCD is the largest number that divides every input, while an LCM is the smallest number that every input divides into. For 12 and 18, the GCD is 6 and the LCM is 36.
Write the fractions in lowest terms, then divide the LCM of the numerators by the GCD of the denominators. This calculator handles whole numbers; use those whole-number LCM and GCD results as the inputs to that method.
LCM is used to add fractions with different denominators, align repeating schedules such as bus or medication intervals, and find when cycles coincide.