Least Common Multiple (LCM) Calculator

Find the least common multiple (LCM) of two or more whole numbers, or of every number from 1 to n. Pick a method (prime factors, listing multiples, the GCF formula or the division ladder) and the working is written out with your numbers. After finding a common denominator for fractions, the Percentage Calculator expresses the combined part as a percent.

Least common multiple
72
Numbers24, 36
LCM in prime factors2³ × 3²
GCF12
Check: LCM × GCF864 = 24 × 36
Prime factors of each number
  • 24 = 2³ × 3
  • 36 = 2² × 3²

Formula: LCM = highest power of each prime = |a × b| ÷ GCF(a, b), pairwise

Results update as you type
Step by step: Prime factors (highest powers)
  1. 24 = 2³ × 3
  2. 36 = 2² × 3²
  3. Highest power of 2: 2³ (from 24)
  4. Highest power of 3: 3² (from 36)
  5. LCM = 2³ × 3² = 8 × 9 = 72

What is the least common multiple

The least common multiple of a set of whole numbers is the smallest positive number that is a multiple of every one of them. It is also called the lowest common multiple. List the multiples of 4 and 6 and look for the first number in both lists:

  • Multiples of 4: 4, 8, 12, 16, 20, 24, …
  • Multiples of 6: 6, 12, 18, 24, 30, 36, …

The common multiples are 12, 24 and so on; the least of them is 12, so LCM(4, 6) = 12.

This least common multiple calculator finds the LCM of 2 to 20 whole numbers, or of 1 to n, with exact whole-number math. It also shows the greatest common factor (GCF) and the prime factors of every number as supporting working.

LCM formula

Two numbers: LCM(a, b) = |a × b| ÷ GCF(a, b)

For 24 and 36: GCF(24, 36) = 12, so LCM = (24 × 36) ÷ 12 = 864 ÷ 12 = 72.

Three or more numbers: LCM(a, b, c) = LCM(LCM(a, b), c), and so on for each extra number.

From prime factors: LCM = the product of the highest power of every prime that appears in any of the numbers.

GCF by the Euclidean algorithm: GCF(a, 0) = a and GCF(a, b) = GCF(b, a mod b).

Variable definitions

  • a, b, c…: The positive whole numbers you enter.
  • GCF(a, b): Greatest common factor (also called GCD): the largest number that divides both.
  • LCM: Least common multiple: the smallest positive number every input divides.
  • |a × b|: The product of the two numbers (always positive here).

How to find the LCM

If you are learning how to find LCM values by hand, there are four common methods. Each gives the same answer; the examples below use 24 and 36 (LCM 72), and the ladder uses 12, 18 and 30.

Method 1: Prime factors (highest powers)

Write each number as a product of prime powers, keep the highest power of each prime, and multiply them.

  1. 24 = 2³ × 3
  2. 36 = 2² × 3²
  3. Highest power of 2: 2³ (from 24)
  4. Highest power of 3: 3² (from 36)
  5. LCM = 2³ × 3² = 8 × 9 = 72

Method 2: Listing multiples

List the multiples of each number until one appears in every list. This is quick for small numbers; the calculator lists them only when no number needs more than 50 multiples.

  1. Multiples of 24: 24, 48, 72
  2. Multiples of 36: 36, 72
  3. The first number that appears in every list is the LCM = 72

Method 3: GCF formula

Find the GCF with the Euclidean algorithm, then divide the product by it. For three or more numbers, repeat with the running LCM and the next number.

  1. GCF(24, 36) = 12 (36 = 1 × 24 + 12; 24 = 2 × 12 + 0)
  2. LCM(24, 36) = (24 × 36) ÷ 12 = 864 ÷ 12 = 72
  3. LCM = 72

Method 4: Division (ladder) method

Write the numbers in a row. Divide by the smallest prime that divides at least one of them, bring down any number it does not divide, and repeat until every number is 1. The LCM is the product of the divisors. For 12, 18 and 30:

Divide byNumbers
2121830
26915
33915
3135
5115
111

All numbers are 1. Multiply the divisors: LCM = 2 × 2 × 3 × 3 × 5 = 180

Worked example

Numbers: 8, 9, 21

  1. 8 = 2³
  2. 9 = 3²
  3. 21 = 3 × 7
  4. Highest power of 2: 2³ (from 8)
  5. Highest power of 3: 3² (from 9)
  6. Highest power of 7: 7 (from 21)
  7. LCM = 2³ × 3² × 7 = 8 × 9 × 7 = 504

Check with the GCF formula, pairwise:

  1. Step 1: GCF(8, 9) = 1 (9 = 1 × 8 + 1; 8 = 8 × 1 + 0)
  2. LCM(8, 9) = (8 × 9) ÷ 1 = 72 ÷ 1 = 72
  3. Step 2: GCF(72, 21) = 3 (72 = 3 × 21 + 9; 21 = 2 × 9 + 3; 9 = 3 × 3 + 0)
  4. LCM(72, 21) = (72 × 21) ÷ 3 = 1,512 ÷ 3 = 504
  5. LCM = 504

How to use this calculator

  1. Choose List of numbers and type 2 to 20 whole numbers separated by commas, spaces or new lines, or choose 1 to n and enter n (2 to 100).
  2. Pick the method whose working you want to see.
  3. Read the LCM as the headline result, with the GCF and prime factors below it, then the step-by-step working.
  4. Use Copy or Share to send the result with its prime factors.

Common mistakes

  • Multiplying the numbers together: 4 × 6 = 24 is a common multiple, but the least one is 12. The product is the LCM only when the numbers share no factor, as with 5 and 7 (LCM 35).
  • Confusing LCM with GCF: the LCM is the smallest shared multiple (never smaller than the largest number); the GCF is the largest shared factor (never larger than the smallest number). For 24 and 36 they are 72 and 12.
  • Taking the lowest power of a prime: the LCM needs the highest power (2³ from 24, not 2² from 36). Lowest powers give the GCF instead.
  • Including zero or decimals: the LCM is found for positive whole numbers; the calculator names any entry that is not one.

LCM of 1 to 10

The LCM of 1 to 10 is 2,520. Take the highest power of each prime up to 10: 2³ = 8 (from 8), 3² = 9 (from 9), 5 and 7. So LCM = 2³ × 3² × 5 × 7 = 8 × 9 × 5 × 7 = 2,520. Every number from 1 to 10 divides it, and no smaller number works. Choose 1 to n in the calculator for any n up to 100.

NumbersLCM
1 to 22
1 to 36
1 to 412
1 to 560
1 to 660
1 to 7420
1 to 8840
1 to 92,520
1 to 102,520
1 to 1127,720
1 to 1227,720

The LCM only grows when n is a prime or a power of a prime (for example 8 = 2³ or 9 = 3²); that is why 1 to 6 and 1 to 5 share the same LCM.

LCM vs GCF

The LCM is the smallest number that all your numbers divide into; the GCF is the largest number that divides all of them. For 24 and 36 the LCM is 72 and the GCF is 12. Use the LCM when things must line up on a common multiple, and the GCF when you split something into equal groups or simplify a fraction.

Adding fractions: the least common denominator (LCD) is the LCM of the denominators. For 1/4 + 1/6 the LCD is 12, so 1/4 + 1/6 = 3/12 + 2/12 = 5/12. As a decimal that is about 0.4167 (to 4 decimal places with the Rounding Calculator), or 41.67% with the Percentage Calculator.

Repeating events: if two buses leave a stop together and then every 12 and 18 minutes, they next leave together after LCM(12, 18) = 36 minutes; the Time Duration Calculator gives the time between two departures. If one task repeats every 4 days and another every 6 days, both fall on the same day every 12 days; add 12 days to the start date with the Days Between Dates Calculator to find that date.

Browse the math calculators for related percentage, statistics and measurement tasks.

Frequently asked questions

›What is the least common multiple?

The least common multiple (LCM) of a set of whole numbers is the smallest positive number that every one of them divides evenly. Multiples of 4 are 4, 8, 12, 16, 20, 24…; multiples of 6 are 6, 12, 18, 24, 30, 36…; the smallest number in both lists is 12, so LCM(4, 6) = 12.

›What is the LCM of 24 and 36?

The LCM of 24 and 36 is 72. In prime factors 24 = 2³ × 3 and 36 = 2² × 3²; the highest powers are 2³ × 3² = 72. With the GCF formula: GCF(24, 36) = 12, so (24 × 36) ÷ 12 = 864 ÷ 12 = 72.

›What is the LCM of 1 to 10?

The LCM of the numbers 1 to 10 is 2,520 = 2³ × 3² × 5 × 7. It is the smallest number that 1, 2, 3, 4, 5, 6, 7, 8, 9 and 10 all divide: 8 needs 2³, 9 needs 3², and 5 and 7 appear once.

›What is the LCM of 12 and 48?

The LCM of 12 and 48 is 48. Because 48 = 4 × 12, 48 is already a multiple of 12. Whenever one number divides the other, the LCM is the larger number.

›How do you find the LCM of 3 numbers?

Work pairwise: find the LCM of the first two, then the LCM of that result and the third. For 8, 9 and 21: LCM(8, 9) = 72, then LCM(72, 21) = 504. Prime factors give the same answer: 8 = 2³, 9 = 3², 21 = 3 × 7, so LCM = 2³ × 3² × 7 = 504. The same rule works for any count of numbers.

›Is LCM the same as LCD?

The least common denominator (LCD) is the LCM of the denominators of a set of fractions. For 1/4 + 1/6 the LCD is LCM(4, 6) = 12, so 1/4 = 3/12 and 1/6 = 2/12, and the sum is 5/12. LCD is the LCM used for fractions. To express the sum as a share per hundred, use the Percentage Calculator.

›How is LCM related to GCF?

For two positive whole numbers, LCM(a, b) × GCF(a, b) = a × b. For 24 and 36: 72 × 12 = 864 = 24 × 36. The greatest common factor (GCF, also called GCD) is the largest number that divides both. This product rule holds for two numbers only; for three or more, work pairwise.

›What happens if one of the numbers is zero?

Zero is a multiple of every number, so a list containing 0 has no positive common multiple and the LCM is not useful. The calculator names the zero entry and asks for positive whole numbers.

›Can I use negative numbers or decimals?

No. The calculator accepts positive whole numbers and names any negative or decimal entry. For negatives, use the size of the number: the LCM of −4 and 6 is the LCM of 4 and 6, which is 12. Decimals have no LCM in the usual sense; scale them to whole numbers first.

›Why does the calculator show prime factors?

Every whole number above 1 splits into primes in exactly one way. The LCM uses the highest power of each prime found in any of the numbers, so the prime factors explain where the answer comes from and let you check it by hand.

›Does the calculator also show the GCF?

Yes, but only as supporting working, because the GCF formula LCM(a, b) = (a × b) ÷ GCF(a, b) uses it. The headline answer is always the LCM.

›How large can the numbers be?

You can enter up to 20 numbers of up to 12 digits each, or the range 1 to n with n up to 100. All arithmetic is exact whole-number math, so very large answers such as the LCM of 1 to 50 (3,099,044,504,245,996,706,400) are shown in full without rounding.

Related calculators

If this helped, the following calculators are useful for everyday math problems:

Last updated: November 14, 2026 · Checked against standard formulas and sample test cases.

Uses exact whole-number (BigInt) arithmetic, so the LCM, GCF and every step are exact for any allowed input, including answers with dozens of digits. Inputs are limited to 20 numbers of up to 12 digits, or 1 to n with n up to 100.