LCM Calculator
Least common multiple of two or more whole numbers, built from prime factorisations — with the GCF and the factorisation of every number shown.
Least common multiple
Note: Whole numbers only — decimals are rounded and signs ignored, since LCM is defined for positive integers.
Least Common Multiple, Built From Primes
The LCM of a set of numbers is the smallest number all of them divide into exactly. The reliable way to find it — the way this calculator works — is prime factorisation: write each number as a product of primes, take every prime at the highest power it appears anywhere, and multiply. For 12 = 22 × 3 and 18 = 2 × 32, that gives 22 × 32 = 36. The table under the result shows the factorisation of every number you entered, so the recipe is checkable at a glance.
Worked Example
Buses leave a station every 12 minutes and every 18 minutes; if they leave together at noon, they next leave together after LCM(12, 18) = 36 minutes. The GCF line in the result is the mirror concept — highest becomes lowest — and the two are locked together by the identity LCM × GCF = product of the two numbers: 36 × 6 = 216 = 12 × 18. For three or more numbers the identity breaks, but the prime method does not, which is why the calculator accepts a whole list.
Where LCM Earns Its Keep
Adding fractions is the everyday case: the common denominator of 1/12 + 1/18 is 36, turning them into 3/36 + 2/36. Gears, timetables, tiling patterns and anything periodic resynchronising — traffic lights, planetary alignments, maintenance schedules — are LCM problems wearing work clothes. If your numbers are large, factorise carefully: the method is only as good as the prime factorisations, which the table shows in full.
Frequently Asked Questions
How do I find the LCM of two numbers?
Factorise both into primes, take every prime at the highest power it appears, and multiply. For 12 and 18 that is 2 squared x 3 squared = 36.
What is the difference between LCM and GCF?
LCM is the smallest number both numbers divide into; GCF is the largest number that divides both. For two numbers, LCM x GCF equals their product.
What is the LCM used for in fractions?
It is the least common denominator. Adding 1/12 and 1/18 uses 36, turning them into 3/36 and 2/36.
Can I enter more than two numbers?
Yes — the prime method works for any list. Enter three or more numbers separated by commas and the calculator builds the LCM from all of them.