LCM Calculator
: Find the least common multiple of two or more numbers or fractions, with the prime factorization method shown step by step- LCM (least common multiple)
- 180
- GCF (greatest common factor)
- 6
- Numbers
- 12, 18, 30
- LCM as a multiple of each
- 12 × 15, 18 × 10, 30 × 6
| Prime | 12 | 18 | 30 | GCF | LCM |
|---|---|---|---|---|---|
| 2 | 2 | 1 | 1 | 2 | 2² |
| 3 | 1 | 2 | 1 | 3 | 3² |
| 5 | 0 | 0 | 1 | — | 5 |
| Number | Prime factors |
|---|---|
| 12 | 2² × 3 |
| 18 | 2 × 3² |
| 30 | 2 × 3 × 5 |
| Step: a = q × b + r |
|---|
| 18 = 1 × 12 + 6 |
| 12 = 2 × 6 + 0 |
| 30 = 5 × 6 + 0 |
LCM Calculator
The least common multiple (LCM) is the smallest positive number that every number in a list divides into evenly. This LCM calculator finds it for two or more whole numbers or fractions and shows the prime factorization method step by step, with the greatest common factor (GCF) alongside. Use it to find a least common denominator before adding fractions, or to see when repeating cycles line up. It runs in your browser, so nothing you type is sent anywhere.
How to find the least common multiple
- Type two or more numbers in
Numbers, separated by commas or spaces, such as12, 18, 30. Fractions such as3/4work too. - Read the LCM at the top, the GCF under it, and the LCM written as a multiple of each number.
- Check the working: the prime power table (the LCM takes each prime at its highest power), each number's prime factorization and Euclid's steps.
- Use
Copy all, orDownloadfor a CSV or text file with the figures and tables.
Example
The LCM of 12, 18 and 30 by prime factorization: take every prime that appears, at its highest power.
12, 18, 3012 = 2² × 3
18 = 2 × 3²
30 = 2 × 3 × 5
Every prime at its highest power: 2² × 3² × 5
LCM = 180
GCF = 6Details
- Prime factorization method: split each number into primes, then multiply every prime that appears in any of them, each at the highest power it reaches. This is the method the tables show.
- For two numbers there is a shortcut: LCM = a × b ÷ GCF(a, b), with the GCF from Euclid's algorithm. For three or more numbers the calculator takes the LCM of the first two, then of that and the third, and so on; the result is the same.
- Least common denominator: enter the denominators of the fractions you want to add. For quarters, sixths and tenths, the LCM of 4, 6 and 10 is 60, so each fraction is rewritten over 60.
- LCM of fractions: the LCM of the numerators over the GCF of the denominators, after putting each fraction in lowest terms. For 1/2, 3/4 and 5/6 that is 15/2: the smallest number that each of the three fractions goes into a whole number of times.
- Negative numbers count as their absolute value. If one of the numbers is 0, the LCM is 0, because 0 is a multiple of everything.
Limits
- Whole numbers and fractions only, up to 100 numbers of up to 60 digits each. Decimals such as 1.5 are refused; write them as fractions (3/2).
- The LCM itself is exact at any size; prime factorizations are shown for numbers up to 10¹⁸, and the prime power table for up to 8 numbers.
- Numbers, not algebra: it does not find the LCM of polynomials.
FAQ
How do you find the LCM of two numbers?
Divide their product by their GCF: for 4 and 6, 4 × 6 ÷ 2 = 12. Or list multiples of the larger number (6, 12, 18 …) until one is divisible by the smaller.
How do you find the LCM of three numbers?
Take the LCM of two, then of that result and the third. For 4, 6 and 15: LCM(4, 6) = 12, then LCM(12, 15) = 60. The prime way gives the same: 2² × 3 × 5 = 60.
Is the LCM the same as the least common denominator?
The least common denominator of some fractions is the LCM of their denominators. Enter just the denominators to get it.
What is the LCM of 8 and 12?
24. 8 = 2³ and 12 = 2² × 3, so the LCM is 2³ × 3 = 24.
What is the difference between the LCM and the GCF?
The GCF is the largest number that divides all of them; the LCM is the smallest number they all divide. The GCF is never more than the smallest number, the LCM never less than the largest.
Runs entirely in your browser. Nothing is uploaded.