Mathematics · Updated 2026

LCM Calculator

Find the Least Common Multiple of two or three numbers instantly. Essential for adding and subtracting fractions with different denominators. Shows prime factorization method and GCF relationship.

Last updated

2 or 3 Numbers
Prime Factorization
GCF Relationship
Fraction LCD Demo
Our networkfavorit5The 5 worth buying.Top fives, comparisons and what reviewers say.See the top 5s
LCM Calculator
Least Common Multiple: up to 3 numbers
Leave blank to find LCM of two numbers only

Enter two or three whole numbers to find their Least Common Multiple.

Least Common Multiple Methods & Applications

The least common multiple (LCM) is the smallest positive number that every number in the set divides into evenly. For 4 and 6 it is 12. For two numbers the quickest route is LCM(a, b) = a × b ÷ GCF(a, b), so 4 × 6 ÷ 2 = 12. Enter two or three numbers above to get the LCM with prime factorization steps and the matching common denominator.

The Least Common Multiple (LCM) is the smallest positive number that is a multiple of all given numbers. LCM is most commonly used to find the Lowest Common Denominator (LCD) when adding or subtracting fractions with different denominators.

Formula: LCM(a, b) = (a × b) / GCF(a, b). This makes GCF and LCM closely related: knowing one gives you the other instantly.

LCM for Fraction Addition

To add 1/4 + 1/6: LCM(4,6) = 12. Convert: 3/12 + 2/12 = 5/12. Using LCM as the LCD keeps numbers as small as possible.

Prime Factorization Method

LCM(12,18): 12 = 2²×3. 18 = 2×3². Take highest power of each prime: 2²×3² = 4×9 = 36. Always take the highest, not the lowest (GCF takes lowest).

Listing Multiples Method

LCM(4,6): Multiples of 4: 4, 8, 12, 16... Multiples of 6: 6, 12, 18... First in common: 12. Simple for small numbers, slow for large ones.

Real-World Uses

Scheduling: two events repeat every 4 and 6 days. They coincide every LCM(4,6) = 12 days. Also used for gear ratios, tiling patterns, and synchronization problems.

LCM Reference Table

NumbersGCFLCMNumbersGCFLCM
2 and 3169 and 12336
3 and 411210 and 15530
4 and 621212 and 15360
4 and 1022012 and 18636
6 and 822415 and 20560
6 and 931816 and 24848
8 and 1242418 and 24672

Every row satisfies GCF × LCM = the product of the two numbers, for example 6 × 36 = 216 = 12 × 18. The LCM of all the numbers from 1 to 10 is 2,520, from 1 to 12 it is 27,720, and from 1 to 20 it is 232,792,560.

Worked Examples

LCM(8, 12, 18) by prime factors

8 = 2³, 12 = 2² × 3 and 18 = 2 × 3². Take the highest power of each prime that appears: 2³ and 3². LCM = 8 × 9 = 72. Check: 72 ÷ 8 = 9, 72 ÷ 12 = 6, 72 ÷ 18 = 4, all whole.

Adding three fractions: 1/6 + 3/8 + 5/12

The least common denominator is LCM(6, 8, 12) = 24. Rewrite: 4/24 + 9/24 + 10/24 = 23/24. Multiplying the denominators instead would give 576 and a lot of extra simplifying. The fraction calculator does this for two fractions at a time.

Packs that do not match

Hot dogs come 10 to a pack and buns 8 to a pack. To end up with none left over you need LCM(10, 8) = 40 of each: 4 packs of hot dogs and 5 packs of buns.

Three numbers with no common factor overall

For 6, 10 and 15 the GCF of all three is 1, yet the LCM is only 30, not 6 × 10 × 15 = 900. Each pair shares a factor (2, 3 or 5), so the product is far too big.

Edge Cases and Common Mistakes

  • LCM(a, 1) = a, and if one number divides the other, the LCM is the larger one: LCM(3, 12) = 12.
  • Zero. The only common multiple of 0 and another number is 0, so a positive LCM does not exist. By convention LCM(a, 0) = 0, and the calculator asks for numbers above 0.
  • Negative numbers. The LCM is taken as positive, so LCM(−4, 6) = 12. The calculator ignores signs.
  • Just multiplying. 4 × 6 = 24 is a common multiple, but not the least one (12). The product is the LCM only when the GCF is 1.
  • Using the two-number formula on three numbers. For 4, 6 and 8, the product 192 divided by the overall GCF (2) gives 96, but the real LCM is 24. With three or more numbers, chain the pairs: LCM(4, 6) = 12, then LCM(12, 8) = 24.
  • Taking the lowest powers. The lowest shared powers give the GCF. For the LCM you need the highest power of every prime, including primes found in only one number. The GCF calculator shows the other side.
Method and sources. LCM by prime factorization (highest power of each prime) and by LCM(a, b) = a × b ÷ GCF(a, b) with the Euclidean algorithm, chained pairwise for three numbers. All table values and examples were computed in exact integer arithmetic. The calculator uses exact big-integer math with the Miller-Rabin test (fixed bases, deterministic for every number it accepts) and Pollard's rho method for factoring, so results are exact for inputs up to 10^18, even when the LCM itself is much larger.

LCM Questions

The LCM is the smallest positive number that is a multiple of all given numbers. LCM(4, 6) = 12, because 12 is the smallest number that both 4 and 6 divide into evenly (4×3=12, 6×2=12). LCM is also called the Lowest Common Multiple or Smallest Common Multiple. Every common multiple of the numbers is a multiple of the LCM.

LCM(a, b) = (a × b) / GCF(a, b). Example: LCM(12, 18). GCF(12, 18) = 6. LCM = (12 × 18) / 6 = 216 / 6 = 36. This is the most efficient method for two numbers because you only need to find the GCF, which is quick with the Euclidean algorithm. For three numbers, find LCM of the first two, then LCM of that result and the third.

To add fractions, you need a common denominator. The LCM of the denominators is the LCD (Lowest Common Denominator). Example: 1/4 + 1/6. LCD = LCM(4, 6) = 12. Convert: 3/12 + 2/12 = 5/12. Using the LCM (not just any common multiple) keeps numbers as small as possible, which reduces the simplification needed afterward. If you used 24 instead: 6/24 + 4/24 = 10/24, which needs simplifying to 5/12.

Factor each number into primes. For each prime that appears in any factorization, take the highest power it appears at. Multiply these together. Example: LCM(12, 18, 20). 12 = 2²×3. 18 = 2×3². 20 = 2²×5. Highest powers: 2², 3², 5¹. LCM = 4×9×5 = 180. Key difference from GCF: LCM uses highest powers, GCF uses lowest powers.

If numbers are coprime (GCF = 1), their LCM is simply their product. LCM(7, 11) = 7 × 11 = 77. LCM(4, 9) = 36 (GCF(4,9) = 1, so LCM = 4 × 9 = 36). This makes sense: if they share no factors, the smallest number divisible by both must contain all factors of each, so it equals their product.

Find LCM of the first two numbers, then find LCM of that result and the third number. Example: LCM(4, 6, 10). LCM(4, 6) = 12. LCM(12, 10): GCF(12,10) = 2. LCM = (12×10)/2 = 60. Answer: LCM(4, 6, 10) = 60. Verify: 60/4=15, 60/6=10, 60/10=6. All divide evenly. This chaining method works for any number of inputs.

For two numbers a and b: GCF(a,b) × LCM(a,b) = a × b. This identity is extremely useful: if you find one, you can calculate the other. Example: a=12, b=18. GCF = 6. LCM = (12×18)/6 = 36. Verify: 6×36 = 216 = 12×18. GCF is always ≤ min(a,b) and LCM is always ≥ max(a,b).

LCM(a, a) = a. The smallest multiple both a and a share is a itself. Similarly, GCF(a, a) = a. These edge cases are consistent with the formula: LCM(a,a) = (a×a)/GCF(a,a) = a²/a = a. Also: LCM(a, 1) = a, and GCF(a, 1) = 1 for any positive integer a.

If event A repeats every 4 days and event B every 6 days, they coincide every LCM(4,6) = 12 days. Traffic lights: if one cycle takes 60 seconds and another 90 seconds, they sync every LCM(60,90) = 180 seconds = 3 minutes. Gear teeth: if gears have 12 and 18 teeth, a specific tooth pair meets again after LCM(12,18) = 36 rotations total. LCM solves any synchronization problem.

LCD (Lowest Common Denominator) is just the LCM applied specifically to fraction denominators. They are the same mathematical concept. When adding 1/4 + 1/6, the LCD is LCM(4,6) = 12. The term LCD is used in the context of fractions; LCM is the general mathematical term. Both refer to the smallest number that all given numbers divide into evenly.

2,520, which is 2³ × 3² × 5 × 7. It is the smallest number that 1, 2, 3 and every whole number up to 10 divide evenly. The LCM of 1 through 12 is 27,720 and of 1 through 20 it is 232,792,560.

No. The LCM is a multiple of each number, so it is always at least as large as the largest number. It equals the largest number exactly when the others divide it, as in LCM(3, 12) = 12, and it equals the product when the numbers share no factor, as in LCM(7, 11) = 77.