LCM calculator (least common multiple)
The least common multiple (LCM) is the smallest positive number that every number in your list divides into evenly. Enter 2 to 10 whole numbers and this calculator finds the LCM using prime factorization, showing each factor tree and which prime powers it keeps. For example, the LCM of 12 and 18 is 36.
LCM(12, 18) = 36
Step by step
- Break each number into prime factors
- Take every prime with its highest power
: highest power ; : highest power .
- Multiply them
How the LCM calculator works
Every whole number above 1 can be written as a product of primes. The LCM has to contain every number’s factors, so the calculator:
- Breaks each number into primes.
- For each prime that appears, keeps the highest power found in any of the numbers.
- Multiplies those powers together.
For two numbers there’s also a shortcut: . For and : . Use the GCF calculator to find the GCF.
Where you use the LCM
- Adding fractions: the least common denominator is the LCM of the denominators. Try it in the fraction calculator.
- Schedules and cycles: two buses every 12 and 18 minutes leave together again after 36 minutes.
Common mistakes
- Multiplying the numbers together () gives a common multiple, not the least one.
- Mixing up LCM and GCF: LCM keeps the highest powers, GCF keeps the lowest shared powers.
Worked example: three numbers
LCM of , and :
- , ,
- Highest powers: , ,
Another way: list the multiples
For small numbers you can list multiples until one appears in every list. Multiples of 4: 4, 8, 12, 16, 20, 24. Multiples of 6: 6, 12, 18, 24. The first shared one is 12, so LCM(4, 6) = 12. This works, but it gets slow with bigger numbers, which is why the calculator uses prime factors.
Quick facts
- The LCM of two numbers is never smaller than the larger number.
- If one number divides the other, the LCM is the larger one: LCM(5, 20) = 20.
- If two numbers share no factors, the LCM is their product: LCM(7, 9) = 63.
Frequently asked questions
What is the LCM of 12 and 18?
. and , so the LCM is .
What is the difference between LCM and GCF?
The LCM is the smallest number all your numbers divide into. The GCF is the largest number that divides all of them. For 12 and 18, LCM = 36 and GCF = 6.
How many numbers can I enter?
From 2 to 10 whole numbers, each up to one billion.
Why is the LCM used for adding fractions?
Fractions need the same denominator to be added, and the LCM of the denominators is the smallest one that works, which keeps the numbers small.