Least Common Multiple Calculator — LCM with Steps
Enter two, three or four positive whole numbers and instantly find their Least Common Multiple with every calculation step shown — ideal for fraction work, scheduling and number theory.
Smallest positive integer evenly divisible by every entered number
LCM(4, 6)
- 1
GCD(4, 6)
Euclidean algorithm → 2 = 2Repeatedly replace the pair with (b, a mod b) until the remainder is 0. - 2
LCM = a × b ÷ GCD
4 × 6 ÷ 2 = 12
How does this calculator work?
LCM(a, b) = |a × b| ÷ GCD(a, b). Compute GCD with the Euclidean algorithm (divide repeatedly until remainder = 0), then divide the product by it. Chain for more numbers: LCM(LCM(a, b), c). The result is always at least as large as the largest input. Enter up to four numbers; every step is shown.
Formula
How this is calculated
The Least Common Multiple (LCM) of two or more integers is the smallest positive integer that is divisible by every one of them. For example, LCM(4, 6) = 12 because 12 is the smallest number divisible by both 4 and 6.
The fastest way to compute LCM for a pair uses the identity LCM(a, b) = |a × b| ÷ GCD(a, b), where GCD is the Greatest Common Divisor found by the Euclidean algorithm. This avoids prime factorisation and works instantly even for large integers. For more than two numbers, the computation chains: LCM(a, b, c) = LCM(LCM(a, b), c), because LCM is associative — the order of inputs does not affect the result.
The LCM is always at least as large as the largest input and at most as large as the product of all inputs (equality when all inputs are pairwise coprime). When one input divides another, the LCM equals the larger one — for instance LCM(3, 12) = 12.
Frequently asked questions
LCM is used to add or subtract fractions (find the LCD — which is the LCM of the denominators), to find when two repeating events next coincide (e.g. two gears or two clocks), and in modular arithmetic. In scheduling, LCM(3, 5) = 15 tells you two tasks with periods of 3 and 5 days next align on day 15.
No. The LCM is always ≥ the largest input because every number is a multiple of itself. When one number is a multiple of all others, the LCM equals the largest number.
For two positive integers: LCM(a, b) × GCD(a, b) = a × b. They are complementary: GCD measures the largest common factor; LCM measures the smallest common multiple. Knowing one gives you the other via this identity.
Also known as
TG we-Calculate Editorial Team. (2026). Least Common Multiple Calculator — LCM with Steps [Online calculator]. TG we-Calculate. https://we-calculate.com/calculator/least-common-multiple-calculator
TG we-Calculate Editorial Team. "Least Common Multiple Calculator — LCM with Steps." TG we-Calculate. 2026. https://we-calculate.com/calculator/least-common-multiple-calculator.
TG we-Calculate Editorial Team, "Least Common Multiple Calculator — LCM with Steps," TG we-Calculate, 2026. [Online]. Available: https://we-calculate.com/calculator/least-common-multiple-calculator
@misc{wecalculate_least_common_multiple_calculator, title = {Least Common Multiple Calculator — LCM with Steps}, author = {{TG we-Calculate Editorial Team}}, howpublished = {\url{https://we-calculate.com/calculator/least-common-multiple-calculator}}, year = {2026}, note = {TG we-Calculate} }
Did this calculator help you?
