Skip to content
School

LCM Calculator (Least Common Multiple) with Steps

LCM calculator. Enter two or more whole numbers separated by commas or spaces. The calculator finds the least common multiple and shows the work using prime factorization (highest power of each prime) and the GCF method, plus a short list-of-multiples check for small numbers. It also shows the GCF, which helps when adding fractions with unlike denominators.

Two to twenty positive integers. Commas or spaces both work, for example 8, 9, 21. Do not put a comma inside a number.

LCM result

LCM
12
GCF
2

Prime factorization

  • 4 = 2^2
  • 6 = 2 × 3

Highest power of each prime: 2^2 × 3 = 12

GCF method

  1. LCM(4, 6) = |4 × 6| / GCF(4, 6) = 24 / 2 = 12

LCM × GCF = 12 × 2 = 24, which equals the product of the two numbers.

List of multiples

Multiples of 6 up to the LCM: 6, 12. 12 is the first multiple divisible by every number.

The math stays in your browser. Nothing you type is uploaded.

How to use

  1. Enter two or more positive whole numbers, separated by commas or spaces. Up to 20 numbers, each up to 1,000,000,000,000.
  2. Read the least common multiple and the greatest common factor.
  3. Follow each prime factorization and the highest power of every prime.
  4. Check the pairwise steps, LCM(a, b) = |a × b| / GCF(a, b), and the list of multiples when the numbers are small.

Formula

Prime factorization writes each number as primes, then multiplies the highest power of every prime that appears. For two numbers, LCM(a, b) = |a × b| / GCF(a, b). For a longer list, that identity is applied one pair at a time. The GCF is the largest positive integer that divides every number.

Example. LCM(4, 6) = 12. The factorizations are 4 = 2^2 and 6 = 2 × 3, so the highest powers are 2^2 × 3 = 12. GCF(4, 6) = 2, and |4 × 6| / 2 = 12.

Example. LCM(8, 9, 21) = 504. LCM(12, 15, 20) = 60 with GCF 1. LCM(18, 24) = 72 with GCF 6.

Fractions

The LCM of the denominators is the least common denominator. That is the smallest shared denominator when you add or subtract fractions.

Frequently asked questions

What is the least common multiple?

The least common multiple (LCM) is the smallest positive number that every number in your list divides into evenly. For 4 and 6 it is 12.

How do you find the LCM using prime factorization?

Write each number as a product of primes, take the highest power of every prime that appears, and multiply them together.

What is the difference between LCM and GCF?

The GCF is the largest number that divides all of your numbers, while the LCM is the smallest number they all divide into. For two numbers, LCM times GCF equals their product.

Can I find the LCM of more than two numbers?

Yes. Enter as many numbers as you like and the calculator combines them one pair at a time to get the LCM of the whole list.

How is the LCM used with fractions?

The LCM of the denominators is the least common denominator, which lets you add or subtract fractions with unlike denominators.