LCM Calculator

Find the Least Common Multiple (LCM) of two or more integers using prime factorization. Also shows GCF and step-by-step prime factor method.

Input

LCM
60
of 4, 6, 10
GCF / GCD
2

Prime Factorization Method

Number235Factors
42^2——2^2
623—2 × 3
102—52 × 5
LCM (max)2^2352^2 × 3 × 5
LCM(4, 6, 10) = 60

LCM Chain Method

For multiple numbers, LCM is computed iteratively.

StepCalculationResult
1LCM(4, 6)12
2LCM(12, 10)60

Formulas & Properties

PropertyFormula
LCM from GCFLCM(a,b) = a×b / GCF(a,b)
Prime factorizationTake highest power of each prime
RelationshipGCF × LCM = a × b
LCM ≥ max(nums)Always true
If GCF = 1LCM = a × b

Common LCM Examples

NumbersLCMUse case
2, 36Adding ½, ⅓, ⅙
4, 612Adding ¼, ⅙
3, 412Adding ⅓, ¼
6, 1030Adding ⅙, 1/10
5, 735Adding ⅕, 1/7

You have three LED strips that blink every 4, 6 and 10 seconds, and you need to know how long until all three flash together. The answer is the least common multiple, 60 seconds, and you can type the three numbers as a list instead of working it out on paper. The page also returns the greatest common factor, a prime-factor grid and a step-by-step chain so you can check the arithmetic.

Two routes to the same LCM, and where the page stops

For two numbers, LCM(a, b) = a ÷ GCF(a, b) × b, with GCF found by Euclid's remainder method. For a longer list the page folds left to right: LCM(a, b, c) = LCM(LCM(a, b), c). A second route gives the same answer: write each number as prime powers and keep the highest power of every prime that appears.

Worked example: 4, 6, 10. In primes, 4 = 2², 6 = 2 × 3 and 10 = 2 × 5. Highest powers are 2², 3 and 5, so the LCM is 4 × 3 × 5 = 60. The chain agrees: LCM(4, 6) = 12, then LCM(12, 10) = 60. The GCF of all three is 2. The textbook relation GCF × LCM = a × b is true for two numbers (4 and 6: 2 × 12 = 24) but not for three: 2 × 60 = 120, while 4 × 6 × 10 = 240.

Limits. The page reads only positive whole numbers. Any other entry in the list, whether a decimal, a zero, a negative or a stray word, is silently dropped, so 4, 6.5, 10 is treated as 4, 10 with an LCM of 20. Every number must be 1,000,000,000 or less, and at least two valid numbers are needed. The LCM itself is a standard JavaScript number, exact only up to 9,007,199,254,740,991. For 999999937 and 999999929, which share no factor, the true LCM is 999999866000004473, but the page shows 999,999,866,000,004,500.

How to Use This Calculator

  1. Type your numbers into the one box, separated by commas, spaces or semicolons. It starts as 4, 6, 10.
  2. Read the LCM and GCF tiles at the top.
  3. Open the prime factorization table. Each prime found gets a column, and the last row shows the highest power of each, which multiplies out to the LCM.
  4. Use the LCM Chain Method on the right to follow the pairwise steps. The final row is highlighted.

Frequently Asked Questions

When is the LCM just the two numbers multiplied?

When they share no prime factor, meaning their GCF is 1. For 5 and 7 it is 35. For 6 and 10, which share a 2, it is 30 instead of 60.

What happens if I include 1 or repeat a number?

A 1 never changes the LCM, and repeats make no difference either, so 6, 6 gives 6. Repeated numbers still appear as rows in the factor table.

How do I use it to add fractions?

Enter the denominators. For 1/2 + 1/3 + 1/6 the LCM of 2, 3, 6 is 6, so the sum is 3/6 + 2/6 + 1/6 = 1.

What is the smallest number divisible by every whole number from 1 to 20?

Type 1, 2, 3 and so on up to 20. The LCM is 232,792,560. The same trick for 1 to 10 gives 2,520.