LCM Calculator (Least Common Multiple)

Find the least common multiple of any set of numbers, with step-by-step working and prime factorizations.

✕ LCM Calculator (Least Common Multiple)
Enter 2 to 8 numbers, separated by commas
LCM (Least Common Multiple)
GCF (Greatest Common Factor)
Prime Factorizations
Step-by-Step Calculation

✕ What is the Least Common Multiple?

The least common multiple (LCM) of two or more positive integers is the smallest positive integer that is perfectly divisible by all of them. For example, LCM(4, 6) = 12 because 12 is the smallest number that both 4 and 6 divide into evenly. The LCM is also called the Lowest Common Multiple (LCM), and when used in the context of fractions it is called the Least Common Denominator (LCD).

LCM appears in many practical contexts. Adding and subtracting fractions requires a common denominator: to add 1/4 + 1/6, the LCD is LCM(4, 6) = 12, giving 3/12 + 2/12 = 5/12. Scheduling problems use LCM to find when repeating events next coincide: if Bus A comes every 12 minutes and Bus B every 18 minutes, they next arrive together after LCM(12, 18) = 36 minutes. Gear problems use LCM to find when two meshing gears return to their starting alignment: gears with 8 and 12 teeth align after LCM(8, 12) = 24 teeth have passed.

There are two standard methods to compute LCM. The GCF method uses the relationship LCM(a, b) = (a × b) / GCF(a, b): find the GCF first using the Euclidean algorithm, then divide the product by it. This is the fastest method for two large numbers. The prime factorization method factors each number into primes, then multiplies each distinct prime raised to its highest exponent across all numbers. For three or more numbers, both methods apply iteratively.

A key relationship connects LCM and GCF: GCF(a, b) × LCM(a, b) = a × b. This means knowing one immediately gives the other. If two numbers are coprime (GCF = 1), their LCM equals their product. If one number divides the other, the LCM is the larger number. This calculator shows both LCM and GCF together, with prime factorizations and step-by-step arithmetic so you can verify or learn the method.

📐 Formula

LCM(a, b) = (a × b) ÷ GCF(a, b)
a, b = positive integers
GCF(a, b) = greatest common factor (found via Euclidean algorithm)
Example: LCM(12, 18): GCF = 6; LCM = (12 × 18) ÷ 6 = 216 ÷ 6 = 36
LCM by Prime Factorization = product of all primes (highest exponents)
Step 1: Factor each number into primes
Step 2: List all distinct prime bases across all numbers
Step 3: Multiply each prime raised to its highest exponent
Example: LCM(12, 18): 12=22×3; 18=2×32 → LCM = 22×32 = 4×9 = 36
GCF(a,b) × LCM(a,b) = a × b
Special case 1: If GCF(a,b) = 1 (coprime), then LCM = a × b
Special case 2: If b is a multiple of a, then LCM(a, b) = b

📖 How to Use This Calculator

Steps

1
Enter your numbers in the input field, separated by commas. You can enter 2 to 8 positive integers up to 100,000. For example: 4, 6, 10.
2
Click Find LCM to see the least common multiple and GCF, the prime factorization of each number, and a step-by-step calculation showing the GCF-division method.
3
Read the results. The LCM is the primary result. The steps section shows the exact arithmetic for each pair in sequence so you can verify the computation.

💡 Example Calculations

Example 1 — LCM of 12 and 18

Find LCM(12, 18) using the GCF method

1
Find GCF(12, 18) using Euclidean algorithm: 18 = 1×12+6; 12 = 2×6+0 → GCF = 6
2
LCM = (12 × 18) ÷ GCF = 216 ÷ 6 = 36
3
Verify: 36 ÷ 12 = 3 ✓ and 36 ÷ 18 = 2 ✓
LCM(12, 18) = 36   |   GCF = 6
Try this example →

Example 2 — Common denominator for 1/4 + 1/6

Find the least common denominator to add fractions 1/4 and 1/6

1
LCM(4, 6): GCF(4, 6) = 2; LCM = (4 × 6) ÷ 2 = 24 ÷ 2 = 12
2
Convert: 1/4 = 3/12 and 1/6 = 2/12 (multiply each by the needed factor)
3
Add: 3/12 + 2/12 = 5/12
LCD = LCM(4, 6) = 12   |   1/4 + 1/6 = 5/12
Try this example →

Example 3 — Bus scheduling problem

Bus A departs every 12 minutes, Bus B every 20 minutes. When do they next depart together?

1
Find LCM(12, 20): GCF(12, 20) = 4; LCM = (12 × 20) ÷ 4 = 240 ÷ 4 = 60
2
Bus A: 60 ÷ 12 = 5 departures. Bus B: 60 ÷ 20 = 3 departures. They meet at 60 minutes.
LCM(12, 20) = 60 minutes until next simultaneous departure
Try this example →

Example 4 — LCM of three numbers: 4, 6, and 10

Find LCM(4, 6, 10) by applying LCM iteratively

1
LCM(4, 6): GCF(4, 6) = 2; LCM = 24 ÷ 2 = 12
2
LCM(12, 10): GCF(12, 10) = 2; LCM = 120 ÷ 2 = 60
LCM(4, 6, 10) = 60
Try this example →

❓ Frequently Asked Questions

What is the least common multiple (LCM)?+
The least common multiple (LCM) is the smallest positive integer that is divisible by all given numbers. LCM(4, 6) = 12 because 12 is the smallest number that both 4 and 6 divide into evenly. It is also called the Lowest Common Multiple or, when used with fractions, the Least Common Denominator (LCD).
How do you find the LCM of two numbers?+
The fastest method uses GCF: LCM(a, b) = (a × b) / GCF(a, b). Step 1: find GCF using the Euclidean algorithm. Step 2: divide the product by GCF. Example: LCM(12, 18): GCF = 6; LCM = (12 × 18) / 6 = 216 / 6 = 36. Verify: 36 / 12 = 3 and 36 / 18 = 2, both exact integers.
What is LCM(4, 6)?+
LCM(4, 6) = 12. The multiples of 4 are 4, 8, 12, 16, 20... The multiples of 6 are 6, 12, 18, 24... The first common value is 12. Via formula: GCF(4, 6) = 2; LCM = (4 × 6) / 2 = 24 / 2 = 12. LCM(4, 6) is used as the common denominator when adding 1/4 + 1/6.
What is the difference between LCM and GCF?+
GCF (Greatest Common Factor) is the largest number that divides all inputs exactly. LCM is the smallest number that all inputs divide exactly. GCF simplifies (fractions), LCM scales up (common denominators). They are linked: GCF(a,b) × LCM(a,b) = a × b. For a=12, b=18: GCF=6, LCM=36, and 6 × 36 = 216 = 12 × 18.
How do you find LCM using prime factorization?+
Write each number as a product of prime factors. Take each distinct prime base and raise it to its highest exponent across all numbers, then multiply. Example: LCM(12, 18, 20): 12=2²×3; 18=2×3²; 20=2²×5. Primes with highest exponents: 2², 3², 5. LCM = 4 × 9 × 5 = 180. Verify: 180/12=15, 180/18=10, 180/20=9, all exact.
How is LCM used to add fractions?+
To add fractions with different denominators, find the LCM of the denominators (the LCD). Convert each fraction to an equivalent fraction with that denominator, then add the numerators. To add 1/4 + 1/6: LCD = LCM(4,6) = 12. Convert: 1/4 = 3/12 and 1/6 = 2/12. Sum: 5/12. Using LCM rather than a larger common denominator keeps the result in lowest terms automatically.
What is the LCM of two consecutive numbers?+
The LCM of any two consecutive integers n and n+1 equals their product n × (n+1), because consecutive integers are always coprime (GCF = 1). For example: LCM(7, 8) = 56; LCM(15, 16) = 240; LCM(99, 100) = 9,900. This is why fractions with consecutive denominators (like 1/7 + 1/8) produce relatively large common denominators.
How do you find LCM of three or more numbers?+
Apply LCM iteratively. Find LCM of the first two numbers, then find LCM of that result and the third number, continuing until all numbers are included. LCM(4, 6, 10): LCM(4, 6) = 12; LCM(12, 10) = 60. Result: 60. This works because LCM is associative: LCM(a, b, c) = LCM(LCM(a, b), c).
What happens to LCM when one number divides the other?+
If one number is a multiple of the other, their LCM equals the larger number. LCM(6, 12) = 12 because 12 is already a multiple of 6. LCM(5, 25) = 25. LCM(a, b) = b whenever b is divisible by a. This is the simplest case: the larger number is already the common multiple.
What is LCM used for in real life?+
LCM solves synchronization and scheduling problems. When do two events with different cycles next coincide? If a security camera rotates on a 8-second cycle and a motion sensor resets every 12 seconds, LCM(8, 12) = 24 seconds. Bus schedules, gear alignments, planetary conjunctions, and repeating task schedules all use LCM. In construction, LCM finds the shortest repeating tile pattern length when mixing tiles of different widths.
Is the LCM always larger than the original numbers?+
Yes, LCM(a, b) is always greater than or equal to max(a, b). It equals max(a, b) only when one number divides the other (e.g., LCM(4, 12) = 12). Otherwise LCM is strictly larger than both. The LCM can never be smaller than either input because it must be divisible by both, which requires it to be at least as large as each.