Calculators

LCM Calculator

Find the least common multiple of two or more whole numbers, with prime factorization steps.

Loading interactive tool…

Embed this tool on your site

About this tool

The least common multiple (LCM) of two or more whole numbers is the smallest positive number that each of them divides into exactly. For 12, 18 and 30 the LCM is 180. Type your numbers separated by commas or spaces and this LCM calculator shows the answer as you type, together with the greatest common factor (GCF) of the same numbers. Below the result it shows the working with the prime factorization method: each number is broken into primes, and the LCM is the product of every prime at its highest power. When you enter exactly two numbers it also shows the shortcut LCM = a × b ÷ GCF. The calculator accepts 2 to 50 whole numbers from 1 to one trillion, uses exact integer arithmetic so very large results are not rounded, and runs entirely in your browser.

Why use it

  • Shows the working: every number is factored into primes, and the highest power of each prime is multiplied to give the LCM.

  • Handles lists: enter up to 50 numbers at once instead of working through pairs by hand.

  • Exact big-number arithmetic: results are computed with integer arithmetic, so an LCM with 20 or more digits is still exact.

  • Two answers in one: the GCF of the same numbers is shown next to the LCM.

  • Private and instant: results update as you type and nothing is sent to a server.

How to use

  1. Type two or more whole numbers into the box, separated by commas or spaces (for example 12, 18, 30).
  2. Read the least common multiple in the result card; the GCF of the same numbers appears beside it.
  3. Scroll to the prime factorization working to see each number written as a product of primes.
  4. For two numbers, check the second method, which divides the product of the numbers by their GCF.
  5. Press Copy result to copy the LCM to your clipboard.

When it helps

  • Finding the lowest common denominator before adding or subtracting fractions such as 5/12 + 7/18.
  • Checking homework answers for least common multiple questions and seeing the factor tree method.
  • Working out when repeating events line up, such as buses every 12 and 18 minutes leaving together again.
  • Planning packs or batches so items sold in different group sizes come out even.

Examples

Three numbers

Input

12, 18, 30

Expected result

LCM = 180 (2² × 3² × 5); GCF = 6

Two numbers with the GCF method

Input

24, 36

Expected result

LCM = 72; 24 × 36 ÷ 12 = 72

Numbers with no common factor

Input

8, 9, 21

Expected result

LCM = 504 (2³ × 3² × 7); GCF = 1

Tips

  • To add fractions, use the LCM of the denominators as the common denominator and rescale each numerator.
  • If one number in your list is a multiple of all the others, it is already the LCM.
  • Very large LCMs usually mean the numbers share few factors; check the GCF shown next to it.

Frequently Asked Questions

What is the least common multiple?
The LCM of a set of whole numbers is the smallest positive number that is a multiple of every number in the set. The multiples of 4 are 4, 8, 12, 16… and the multiples of 6 are 6, 12, 18…, so the LCM of 4 and 6 is 12.
How do you find the LCM with prime factorization?
Write each number as a product of primes, then multiply every prime that appears at its highest power. 12 = 2² × 3 and 18 = 2 × 3², so the LCM is 2² × 3² = 36.
How is the LCM related to the GCF?
For two numbers a and b, LCM(a, b) × GCF(a, b) = a × b, so LCM = a × b ÷ GCF. For 24 and 36 the GCF is 12, so the LCM is 24 × 36 ÷ 12 = 72. The calculator shows this method whenever you enter exactly two numbers.
How do you find the LCM of three or more numbers?
Take the highest power of every prime across all the numbers, or find the LCM of the first two and then the LCM of that result with the next number. Both give the same answer, for example LCM(12, 18, 30) = 180.
What numbers can I enter?
Enter 2 to 50 whole numbers from 1 to 1,000,000,000,000 (one trillion). Decimals, fractions, negative numbers and zero are rejected with a message that names the value to fix.
What is the LCM of two prime numbers?
Two different primes share no factors, so their LCM is simply their product. The LCM of 7 and 11 is 77.
Is the LCM ever smaller than the numbers?
No. The LCM is always at least as large as the biggest number in the list, and it equals that number when every other number divides into it, as with 4, 8 and 16 (LCM 16).

Explore the category

Glossary

Multiple
The result of multiplying a number by a whole number. 12, 24 and 36 are multiples of 12.
Prime factorization
Writing a whole number as a product of prime numbers, such as 360 = 2³ × 3² × 5.
Least common denominator
The LCM of the denominators of two or more fractions, used to add or compare them.
A LITTLE HELP. A LOT DONE.
Good tools.
Great flow.

Your shortcut to the everyday. Create, convert, calculate,
and get back to what you love.

✓ Free to use✓ No sign-up✓ 500+ possibilities