LCM Calculator

: Find the least common multiple of two or more numbers or fractions, with the prime factorization method shown step by step
Whole numbers or fractions
Two or more whole numbers or fractions (3/4), separated by commas or spaces. No thousands separators.
Exact for whole numbers of any size up to 60 digits; prime factorizations are shown up to 10¹⁸.
Result
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 powers: the LCM takes the highest power of each prime
Prime121830GCFLCM
221122²
312133²
5001—5
Prime factorization
NumberPrime factors
122² × 3
182 × 3²
302 × 3 × 5
Euclid's algorithm
Step: a = q × b + r
18 = 1 × 12 + 6
12 = 2 × 6 + 0
30 = 5 × 6 + 0

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.

  1. Type two or more numbers in Numbers, separated by commas or spaces, such as 12, 18, 30. Fractions such as 3/4 work too.
  2. Read the LCM at the top, the GCF under it, and the LCM written as a multiple of each number.
  3. 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.
  4. Use Copy all, or Download for a CSV or text file with the figures and tables.

The LCM of 12, 18 and 30 by prime factorization: take every prime that appears, at its highest power.

Input
12, 18, 30
Output
12 = 2² × 3
18 = 2 × 3²
30 = 2 × 3 × 5

Every prime at its highest power: 2² × 3² × 5
LCM = 180
GCF = 6

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.