ToolNimba

🔢 LCM Calculator: Find the Least Common Multiple

Shihab Mia By Shihab Mia · Updated 2026-07-03

LCM (least common multiple)
-
GCD of the set
-
First common multiples
-
GCD method
-
Prime factorization method
Number Prime factorization
-

Enter two or more positive whole numbers to find their least common multiple.

This least common multiple calculator finds the LCM of two or more whole numbers instantly. Enter your numbers separated by commas or spaces and you will see the LCM, the GCD of the set, the first few common multiples, and two full methods worked out: the fast GCD method and the classic prime factorization method. It doubles as a lowest common denominator calculator for fractions, and it is built for scheduling problems and any time you need a shared multiple.

What is the LCM Calculator?

The least common multiple (LCM) of a set of whole numbers is the smallest positive number that every one of them divides into evenly. For example, the multiples of 4 are 4, 8, 12, 16, 20, and the multiples of 6 are 6, 12, 18, 24. The first value that appears in both lists is 12, so the LCM of 4 and 6 is 12. Listing multiples works for small numbers, but it becomes slow fast, which is why this LCM calculator uses a faster route.

The quickest way to compute the LCM is through the greatest common divisor (GCD). The two are linked by a simple identity: lcm(a, b) = a times b divided by gcd(a, b). Because dividing by the GCD removes the factors the two numbers share, you are left with the smallest number that both divide into. The calculator finds the GCD with the Euclidean algorithm, then applies this formula, folding it one pair at a time across your whole list. So for three numbers it computes lcm of the first two, then combines that result with the third. Because the GCD is shown alongside every answer, this tool also works as a gcd calculator when the divisor is what you actually need.

The other standard approach is the prime factorization method, and this LCM calculator shows it too. You break each number into its prime factors, then for every prime that appears anywhere in the set you take the highest power of that prime. Multiply those highest powers together and you have the LCM. For 8 = 2^3 and 12 = 2^2 times 3, the highest power of 2 is 2^3 and the highest power of 3 is 3^1, so the LCM is 2^3 times 3 = 24. This method makes it obvious why the LCM is what it is, which is useful when you are learning or teaching.

The most common reason people reach for an LCM calculator is fractions. To add or subtract fractions you need a common denominator, and the smallest one, the lowest common denominator, is exactly the LCM of the denominators. Finding it with the LCM keeps the arithmetic small and the final fraction close to lowest terms. The LCM also answers repeating-event questions: if one event happens every 4 days and another every 6 days, they coincide every 12 days, the LCM of 4 and 6.

A few rules keep the results sensible. The LCM is only defined for positive whole numbers, so this tool ignores decimals, blanks, and zeros, and uses the absolute value of any negative you type. The LCM of a set is never smaller than the largest number you entered, which is a handy sanity check. And when numbers share no common factor, such as 3, 5, and 7, their LCM is simply the product of all of them, because there is nothing to cancel.

When to use it

  • Finding the lowest common denominator so you can add or subtract fractions with different denominators.
  • Checking least common multiple homework and seeing both the GCD method and the prime factorization method.
  • Working out when two or more repeating events line up again, such as machines serviced every 4, 6, and 8 weeks.
  • Synchronizing cycles in scheduling, such as shifts, deliveries, or maintenance that repeat on different intervals.
  • Solving ratio and rate problems that need a shared multiple of several quantities.
  • Teaching or learning the relationship between the LCM, the GCD, and prime factorization.

How to use the LCM Calculator

  1. Type two or more positive whole numbers, separated by commas, spaces, or new lines.
  2. Read the LCM (least common multiple) and the GCD of the set shown straight away.
  3. Check the first common multiples and the two worked methods below the result.
  4. Press Copy LCM to put the answer on your clipboard.
  5. Use an example button to load a sample set, or Clear to start over.
  6. Decimals and zeros are ignored automatically, since the LCM is defined for positive whole numbers.

Formula & method

GCD method: gcd(a, b) by the Euclidean algorithm, then lcm(a, b) = a × b ÷ gcd(a, b). Fold across the list one pair at a time. Prime factorization method: factor each number, then multiply the highest power of every prime that appears, for example lcm(8, 12) = 23 × 3 = 24.
LCM of 4 and 6 = 12Multiples of 4Multiples of 648166181212

Worked examples

Find the LCM of 4 and 6.

  1. GCD by Euclid: gcd(4, 6) = gcd(6, 4) = gcd(4, 2) = gcd(2, 0) = 2
  2. LCM: 4 × 6 ÷ 2 = 24 ÷ 2 = 12
  3. Check with prime factors: 4 = 2^2, 6 = 2 × 3, highest powers give 2^2 × 3 = 12

Result: LCM = 12

Find the LCM of 8 and 12 using prime factorization.

  1. Factor: 8 = 2^3 and 12 = 2^2 × 3
  2. Highest power of 2 across the set is 2^3; highest power of 3 is 3^1
  3. Multiply the highest powers: 2^3 × 3 = 8 × 3 = 24

Result: LCM = 24

Find the LCM of three numbers: 4, 6, and 8.

  1. First pair: lcm(4, 6) = 4 × 6 ÷ gcd(4, 6) = 24 ÷ 2 = 12
  2. Fold in the third number: lcm(12, 8) = 12 × 8 ÷ gcd(12, 8) = 96 ÷ 4 = 24
  3. Check with prime factors: highest powers are 2^3 (from 8) and 3^1 (from 6), so 2^3 × 3 = 24

Result: LCM = 24

LCM and GCD for common number pairs

NumbersGCDLCM
4 and 6212
8 and 12424
3 and 5115
6 and 9318
10 and 15530
7 and 11177
2, 3 and 4112
4, 6 and 8224

Prime factorization method at a glance

NumberPrime factorizationContributes
82^3highest power of 2
122^2 × 3the factor 3
LCM2^3 × 3= 24

Common mistakes to avoid

  • Confusing the LCM with the GCD. The LCM is never smaller than the largest number you entered, while the GCD is never larger than the smallest. If your least common multiple came out smaller than an input, you have found the GCD instead.
  • Multiplying the numbers together and stopping. The product is always a common multiple, but it is only the least common multiple when the numbers share no common factor. For 4 and 6 the product is 24, yet the LCM is 12, because they share a factor of 2.
  • Taking the lowest power instead of the highest in prime factorization. For the LCM you take the highest power of each prime across the set. Taking the lowest power gives the GCD, not the least common multiple. This is the most common slip in the prime factorization method.
  • Assuming the two-number identity works for three or more. The rule gcd × lcm = a × b only holds for exactly two numbers. With three or more you must fold the LCM across the list one pair at a time, which is what this LCM calculator does.
  • Including zero in the list. Zero is a multiple of every number, so it has no meaningful least common multiple with other values. This tool ignores zeros and decimals so the answer stays well defined.

Glossary

Least common multiple (LCM)
The smallest positive whole number that every number in a set divides into evenly.
Multiple
A number obtained by multiplying a given number by a whole number, for example 4, 8, and 12 are multiples of 4.
Greatest common divisor (GCD)
The largest whole number that divides every number in a set exactly. Also called the greatest common factor (GCF).
Euclidean algorithm
A fast method for the GCD: repeatedly replace the larger number with the remainder of dividing it by the smaller, until the remainder is zero.
Prime factorization
Writing a number as a product of prime numbers, for example 12 = 2^2 × 3.
Lowest common denominator
The smallest shared denominator for a set of fractions, which equals the LCM of their denominators.
Coprime
Numbers whose only common factor is 1, so their LCM is simply their product.

Frequently asked questions

What is the least common multiple?

The least common multiple (LCM) is the smallest positive whole number that every number in your set divides into evenly. For 4 and 6 it is 12, the first value that appears in both lists of multiples.

How to find the LCM of two numbers?

If you are wondering how to find LCM by hand, find the GCD first, then use lcm(a, b) = a times b divided by the GCD. For example, gcd(4, 6) is 2, so the LCM is 4 times 6 divided by 2, which is 12. This LCM calculator does that automatically.

How do you find the LCM using prime factorization?

Break each number into prime factors, then multiply the highest power of every prime that appears. For 8 = 2^3 and 12 = 2^2 times 3, the highest powers are 2^3 and 3, giving an LCM of 24.

Can this calculator find the LCM of three or more numbers?

Yes. Enter any list of whole numbers and the tool folds the LCM across all of them one pair at a time, giving a single least common multiple for the whole set.

What is the difference between LCM and GCD?

The LCM is the smallest common multiple, so it is at least as big as your largest number. The GCD is the largest common divisor, so it is at most as big as your smallest number. They are linked by lcm times gcd equals the product of two numbers.

Is the LCM the same as the lowest common denominator?

Yes, for fractions. The lowest common denominator of a set of fractions is exactly the LCM of their denominators, which is why you use an LCM calculator when adding or subtracting fractions.

What is the LCM of two coprime numbers?

When numbers share no common factor other than 1, such as 3 and 5, their LCM is simply their product. So the LCM of 3 and 5 is 15. This is correct, not an error.

Why does the calculator ignore decimals and zeros?

The least common multiple is only defined for positive whole numbers. Zero is a multiple of everything, so it has no meaningful LCM, and decimals are not whole numbers, so both are dropped from the working set.

What is the LCM of 4, 6, and 8?

It is 24. Working through it: lcm(4, 6) is 12, then lcm(12, 8) is 24. By prime factors, the highest powers are 2^3 from 8 and 3 from 6, giving 2^3 times 3, which is 24.

How is the LCM used in real life?

The LCM answers when repeating cycles line up. If one event repeats every 4 days and another every 6 days, they coincide every 12 days. It is used in scheduling, gears, and any problem that combines different intervals.