About the LCM Calculator
This LCM calculator finds the least common multiple — the smallest positive number that every number in your list divides into exactly. Enter two or more whole numbers and it returns the LCM together with the greatest common factor, so you have both answers you usually need for fraction work.
It shows the working two ways: the prime factorization method (take each prime at the highest power that appears in any number) and a table listing the first multiples of each number, where the LCM is the first value they all share. That makes it easy to check homework or explain the idea to someone else.
The LCM is used to find the least common denominator when adding fractions, to line up repeating schedules (buses every 12 minutes and 18 minutes meet every 36), to plan gear and rotation cycles, and to buy packs that come out even — such as hot dogs in 10s and buns in 8s. Negative signs are ignored and decimals are rounded to whole numbers.
With the default inputs, the least common multiple is 60. Change any value above to recalculate instantly.
How to use the lcm calculator
- 1Type two or more whole numbers separated by commas or spaces.
- 2Read the least common multiple at the top.
- 3Check the prime factorizations and the LCM’s prime powers.
- 4Scan the multiples table to see where the lists first meet.
Formula and method
The fastest way to compute the least common multiple is through the greatest common divisor: divide the product of two numbers by their GCD. For more than two numbers the calculator applies this pairwise, because lcm(a, b, c) = lcm(lcm(a, b), c).
The prime-factor method gives the same result and shows why: write each number as a product of prime powers, then multiply every prime that appears, each raised to the highest power found in any of the numbers. For 4 = 2², 6 = 2 × 3 and 15 = 3 × 5, the LCM is 2² × 3 × 5 = 60.
- a, b, c
- Positive whole numbers
- gcd
- Greatest common divisor (GCF)
Worked examples
LCM of 4, 6 and 15
Taking the highest power of each prime — 2² from 4, 3 from 6 or 15, and 5 from 15 — gives 4 × 3 × 5 = 60.
Buses every 12 and 18 minutes
lcm(12, 18) = 12 × 18 ÷ gcd 6 = 36, so if both buses leave together they meet again every 36 minutes.
LCM of 8, 9 and 21
8 = 2³, 9 = 3² and 21 = 3 × 7. The LCM is 2³ × 3² × 7 = 504.
Smallest number divisible by 1 to 10
The highest prime powers up to 10 are 2³, 3², 5 and 7, whose product is 2,520 — the smallest number every value from 1 to 10 divides.
Frequently asked questions
What is the least common multiple?+
The least common multiple (LCM) of two or more whole numbers is the smallest positive number that each of them divides into with no remainder. The LCM of 4 and 6 is 12.
How do you find the LCM of two numbers?+
Divide their product by their greatest common factor: lcm(a, b) = a × b ÷ gcd(a, b). For 8 and 12, gcd is 4, so the LCM is 96 ÷ 4 = 24.
What is the difference between LCM and GCF?+
The GCF is the largest number that divides all your numbers; the LCM is the smallest number all your numbers divide into. The GCF is never bigger than the smallest number, and the LCM is never smaller than the largest.
How is the LCM used with fractions?+
The least common denominator of a set of fractions is the LCM of their denominators. To add 1/4 + 1/6, use lcm(4, 6) = 12: 3/12 + 2/12 = 5/12.
What is the LCM of two prime numbers?+
For two different primes the LCM is simply their product, because they share no factors. For example, lcm(7, 11) = 77.