What this calculator does
Find the smallest number that all of your numbers divide into evenly, with every step shown. That number is the least common multiple, or LCM. A multiple of a number is what you get when you count by it: the multiples of 4 are 4, 8, 12 and so on. You need the LCM when you add fractions with different bottom numbers (denominators). It also tells you when repeating cycles will next line up, such as buses on different timetables.
Enter two to ten whole numbers, none of them zero. The calculator finds the LCM of the first two using their greatest common factor (GCF), the largest number that divides into both. Then it brings in each remaining number the same way, one at a time, and shows every step.
Where it's used
Why this math matters outside the classroom:
- Hot dogs and buns. Hot dogs sold in 10s and buns in 8s come out even at LCM(10, 8) = 40, so buy 4 packs of hot dogs and 5 of buns.
- Bus schedules. Two buses leaving together every 12 and 18 minutes next leave together after LCM(12, 18) = 36 minutes.
- Adding fractions. Students add 1/4 + 1/6 using the least common denominator 12, getting 3/12 + 2/12 = 5/12.
- Meshing gears. Gears with 12 and 20 teeth return to their starting position together after LCM(12, 20) = 60 teeth pass.
- Party supplies. A planner buying plates in packs of 6 and cups in packs of 9 gets equal counts at 18, from 3 packs of plates and 2 of cups.
Grade level and standards: Grade 6; Common Core State Standards for Mathematics 6.NS.B.4. © Copyright 2010. National Governors Association Center for Best Practices and Council of Chief State School Officers. All rights reserved.
How to use it
- Enter 2 to 10 whole numbers, separated by commas, spaces or new lines. Zero isn't allowed.
- Read the LCM at the top, along with how many times each number goes into it.
- Open the working to see each pair combined with the GCF shortcut.
What the inputs mean
- Whole numbers
- Whole numbers other than zero. Negative numbers are treated by their size, since −4 and 4 have the same positive multiples.
Formula and method
lcm(a, b) = |a × b| ÷ gcf(a, b) lcm(a, b, c) = lcm(lcm(a, b), c)
Here a, b and c are your numbers, and gcf(a, b) is the greatest common factor of a and b. The bars in |a × b| mean "ignore any minus sign". Multiplying two numbers always gives a number they both divide into. But it counts the factors they share twice. Dividing by the GCF removes that double count, which leaves the smallest common multiple. The second formula says that for three or more numbers, you combine them two at a time.
Behind the scenes, the calculator divides before it multiplies, as (a ÷ gcf) × b, to keep the numbers small. 9,007,199,254,740,991 is the largest whole number a computer can store exactly. If the LCM would go past it, the calculator stops and explains why, rather than giving you a rounded answer.
Worked example
Three events repeat every 4, 6 and 15 days. After how many days do they all fall on the same day again?
- gcf(4, 6) = 2, so lcm(4, 6) = 4 × 6 ÷ 2 = 24 ÷ 2 = 12.
- gcf(12, 15) = 3, so lcm(12, 15) = 12 × 15 ÷ 3 = 180 ÷ 3 = 60.
Result: The LCM is 60, so all three line up every 60 days. 60 is 15 × 4, 10 × 6 and 4 × 15.
Understanding the result
The LCM is always at least as big as the biggest number in your list. It equals the numbers simply multiplied together only when they share no common factors.
For fractions, the LCM of the denominators is the least common denominator. That's the smallest bottom number you can rewrite all of them over.
Assumptions and limitations
- Inputs are whole numbers between −9,007,199,254,740,991 and 9,007,199,254,740,991.
- The result is the positive LCM, whatever signs you enter.
- A list of many large numbers, or of numbers that share no factors (called coprime), can go past that exact range. In that case, no result is given.
- Zero is turned away because the only multiple of 0 is 0.
Frequently asked questions
What is the difference between the LCM and the GCF?
The GCF is the largest number that divides into all of them. The LCM is the smallest number they all divide into. For two positive numbers, GCF × LCM equals the two numbers multiplied together.
How do I use the LCM to add fractions?
Find the LCM of the denominators and rewrite each fraction over it. For 1/4 + 1/6, the LCM is 12, so the sum is 3/12 + 2/12 = 5/12.
Why does the calculator refuse very large results?
Beyond about 9 quadrillion, ordinary computer numbers can't hold every whole number exactly. So an answer up there could be off by a few. An error message is more honest than a quietly wrong answer.
Is the LCM of two prime numbers just their product?
Yes. Two different prime numbers share no factor other than 1. So their GCF is 1, and the LCM is the two multiplied together: lcm(7, 13) = 91.
How this calculator is checked
Method: Identity lcm(a, b) = |ab| ÷ gcd(a, b); associativity of lcm; gcd by the Euclidean algorithm. The calculation is covered by automated tests with known reference values and edge cases. Last updated 2026-10-18. Found a problem? Tell us.
Embed this calculator
Put this LCM Calculator on your own website or blog for free. Paste this code where you want it to appear: