LCM Calculator
Find the least common multiple of two or more integers, with step-by-step working.
Written by Golam Rabbani, Founder & Lead Engineer
How to use this lcm calculator
- Enter two or more non-zero integers separated by spaces, commas, or semicolons.
- Press Calculate to see the LCM and step-by-step working.
- Read the pairwise reductions in the Step-by-step list.
- Use Copy to put the result on your clipboard, or Reset to clear the input.
About this lcm calculator
The lcm calculator finds the least common multiple — the smallest positive integer that every input divides exactly — using the GCD-based shortcut. It accepts two or more non-zero integers in a single field.
The formula is lcm(a, b) = |a × b| ÷ gcd(a, b), and for more than two inputs the tool applies the pairwise rule lcm(a, b, c) = lcm(lcm(a, b), c). For example, lcm(4, 6, 8) reduces in two steps. First gcd(4, 6) = 2, so lcm(4, 6) = (4 × 6) ÷ 2 = 24 ÷ 2 = 12. Then gcd(12, 8) = 4, so lcm(12, 8) = (12 × 8) ÷ 4 = 96 ÷ 4 = 24. So lcm(4, 6, 8) = 24 — the smallest number that 4, 6, and 8 each divide evenly.
The LCM is used when adding fractions with different denominators (the lowest common denominator is the LCM), when synchronising cyclic events, and in modular arithmetic problems.
FAQ
- What does the lcm calculator return?
- It returns the least common multiple of two or more non-zero integers — the smallest positive integer that every input divides exactly — along with step-by-step working.
- What formula does it use?
- lcm(a, b) = |a × b| ÷ gcd(a, b). For more than two inputs the tool applies pairwise reduction: lcm(a, b, c) = lcm(lcm(a, b), c).
- What happens if I include zero?
- The tool returns an error. lcm(a, 0) is 0 by the usual definition, which is rarely the answer the user wants, so the calculator requires every input to be non-zero.
- Why does the calculation use GCD?
- Because |a × b| = gcd(a, b) × lcm(a, b) for any two integers, you can compute LCM from GCD without separately factoring the numbers. This is much faster than prime factorisation for large inputs.
- Does this tool store my numbers?
- No. The calculation runs entirely in your browser; nothing is sent to a server or saved between visits.
- Is the lcm calculator free?
- Yes. It is free to use with no signup, no account, and no usage limit.