LCM Calculator

Find the Least Common Multiple (LCM) of any set of numbers. See the step-by-step prime factorization, the listing multiples method, and the GCD relationship. Free, private, and runs entirely in your browser.

Enter Your Numbers

Enter two or more numbers and click Calculate LCM to see the result with a step-by-step breakdown.

LCM =
—
GCD (HCF)
—
Numbers Count
—

Step-by-step breakdown

Summary

What does this LCM Calculator do?

This free online LCM calculator finds the Least Common Multiple of any set of two or more numbers. The LCM is the smallest positive integer that is divisible by each of the given numbers. For example, the LCM of 4, 6, and 8 is 24, because 24 is the smallest number that all three divide into evenly.

Unlike a basic calculator that just gives you the answer, this tool walks you through the entire process. It shows you the prime factorization of each number, identifies the highest power of every prime that appears, and multiplies them together to arrive at the LCM. If you prefer the listing-multiples method, you'll find that too in the steps.

Everything runs locally in your browser. The numbers you enter never leave your device — no server, no logs, no tracking. You can calculate as many LCMs as you want, with no limits and no signup.

How to calculate the LCM

  1. Enter your numbers: Type or paste two or more positive integers into the text area. Separate them with commas, spaces, or new lines.
  2. Click Calculate: The calculator instantly finds the LCM and displays it at the top of the result panel.
  3. Review the steps: Below the result, you'll see the prime factorization of each number, the highest powers of each prime, and the final multiplication that gives the LCM.
  4. Check the GCD: The related Greatest Common Divisor is also shown, along with the LCM × GCD = product relationship for two-number cases.
  5. Copy if needed: Use the "Copy Results" button to grab a formatted summary.

That's it. No signup, no email, no waiting. The entire process takes seconds.

LCM formula and methods

There are three common ways to find the LCM. This calculator uses prime factorization because it works well for any size of number and shows the reasoning clearly.

Prime factorization method
Step 1: Write the prime factorization of each number
Step 2: For each prime, take the highest power that appears in any number
Step 3: Multiply those highest powers together

Example: LCM(4, 6, 8)
4 = 2² | 6 = 2 × 3 | 8 = 2³
Highest powers: 2³, 3¹
LCM = 2³ × 3 = 24
GCD formula (for two numbers)
LCM(a, b) = (a × b) ÷ GCD(a, b)

Example: LCM(12, 18)
GCD(12, 18) = 6
LCM = (12 × 18) ÷ 6 = 216 ÷ 6 = 36
For more than two numbers
LCM(a, b, c) = LCM(LCM(a, b), c)

Apply the two-number LCM repeatedly.
Listing multiples method
Write out the multiples of each number and find the smallest one they share.

Example: LCM(4, 6)
Multiples of 4: 4, 8, 12, 16, 20, 24, …
Multiples of 6: 6, 12, 18, 24, 30, …
Smallest shared multiple: 12

The listing-multiples method is easy to understand but slow for large numbers. Prime factorization is faster and scales well. The GCD formula is fastest for exactly two numbers, since the Euclidean algorithm makes GCD computation very efficient.

LCM vs GCD: what's the difference?

LCM and GCD are related but opposite in spirit. Here's a quick comparison.

Concept What it means Example (12 and 18) Typical size
LCM Smallest number that both given numbers divide into LCM(12, 18) = 36 ≥ largest number
GCD / HCF Largest number that divides both given numbers GCD(12, 18) = 6 ≤ smallest number
Relationship LCM × GCD = product of the two numbers 36 × 6 = 216 = 12 × 18 Only for 2 numbers

Memory trick: LCM is about multiples — it's always bigger than or equal to the largest number. GCD is about divisors — it's always smaller than or equal to the smallest number. When you need to combine things (add fractions, sync schedules), think LCM. When you need to simplify or group things (reduce fractions, tile a floor), think GCD.

LCM values for common number pairs

Here's a quick reference table for common pairs. Notice how the LCM grows when the numbers share few common factors.

Numbers LCM GCD Relationship
2, 361LCM = 2 × 3
4, 6122LCM × GCD = 24
6, 8242LCM × GCD = 48
12, 18366LCM × GCD = 216
15, 25755LCM × GCD = 375
9, 201801LCM = 9 × 20 (coprime)
24, 367212LCM × GCD = 864
7, 13911LCM = 7 × 13 (both prime)
100, 7530025LCM × GCD = 7,500
48, 60, 7272012Multi-number case

Note: The LCM of two coprime numbers (numbers with no common factors other than 1) is simply their product. For example, LCM(9, 20) = 180 because GCD(9, 20) = 1.

Where the LCM is used in real life

The LCM isn't just a classroom exercise — it shows up in several practical situations.

Adding and subtracting fractions

To add fractions, you need a common denominator. The smallest common denominator is the LCM of the denominators. For example, to add 3/4 + 5/6, you find LCM(4, 6) = 12, rewrite both fractions with denominator 12, and then add them: 9/12 + 10/12 = 19/12. Every time you add or subtract fractions by hand, you're using the LCM.

Scheduling repeating events

If one bus arrives every 12 minutes and another every 18 minutes, they'll meet again at the bus stop after LCM(12, 18) = 36 minutes. This kind of problem comes up all the time in scheduling — traffic light cycles, factory production runs, and any situation with periodic events.

Gear rotation problems

If two gears have 12 and 18 teeth, they'll return to their starting alignment after LCM(12, 18) = 36 rotations of the smaller gear (or 24 rotations of the larger one). Mechanical engineers use LCM to calculate when moving parts will sync up again.

Music theory

In music, the LCM helps determine when two rhythmic patterns will line up. If one instrument plays a note every 4 beats and another every 6 beats, the pattern repeats every LCM(4, 6) = 12 beats. This is used to compose polyrhythmic music and analyze complex rhythms.

Computer science and cryptography

The LCM appears in several algorithms, including the Chinese Remainder Theorem, the RSA cryptosystem, and in computing periods of pseudo-random number generators. It's also used in the implementation of modular arithmetic libraries.

Why use this calculator?

Instant results

No server round-trip means your answer appears the moment you click Calculate. Zero waiting.

Step-by-step breakdown

See the prime factorization of each number and the exact multiplications that produce the LCM.

100% private

Everything runs in your browser. The numbers you enter never leave your device — no server, no logs, no tracking.

Any number of values

Two numbers, three numbers, ten numbers — the calculator handles them all.

No limits

Calculate as many LCMs as you want. No daily caps, no watermarks, no "upgrade to pro" nonsense.

Works offline

Once the page loads, you can use the calculator without an internet connection. Bookmark it for exam prep.

Common mistakes to avoid

  • Confusing LCM with GCD. LCM is the smallest multiple (bigger), GCD is the largest divisor (smaller). If your answer is smaller than the biggest input, you probably calculated GCD instead of LCM.
  • Taking the lowest powers in prime factorization. For LCM you take the highest power of each prime. Taking the lowest gives you the GCD. This is the single most common error.
  • Assuming LCM is always the product. LCM(a, b) = a × b only when the numbers are coprime. For 4 and 6, the product is 24, but LCM(4, 6) = 12. Don't skip the GCD step.
  • Forgetting to include every prime. When prime factoring, list every prime that appears in any number — not just the ones that appear in all of them. Common primes are for GCD; all primes are for LCM.
  • Using the listing-multiples method for large numbers. If you need LCM(48, 60, 72), listing multiples by hand would take forever. Use prime factorization instead — it's what this calculator does under the hood.

Frequently asked questions

The LCM is the smallest positive integer that is divisible by each of two or more given numbers. For example, the LCM of 4 and 6 is 12, because 12 is the smallest number that both 4 and 6 divide into evenly.
LCM (Least Common Multiple) is the smallest number that all given numbers divide into. GCD (Greatest Common Divisor) is the largest number that divides all given numbers evenly. LCM is about multiples (larger than or equal to the biggest number), GCD is about divisors (smaller than or equal to the smallest number).
The fastest method is LCM(a, b) = (a × b) ÷ GCD(a, b). You can also list the multiples of each number and find the smallest one they share, or use prime factorization: take the highest power of every prime that appears in any of the numbers.
Yes. This calculator supports any number of values. The LCM of multiple numbers is computed by repeatedly applying the two-number LCM: LCM(a, b, c) = LCM(LCM(a, b), c).
If two numbers are coprime (relatively prime), their LCM is simply their product. For example, LCM(9, 20) = 180 because GCD(9, 20) = 1, so LCM = 9 × 20 = 180.
LCM is used to add and subtract fractions (by finding a common denominator), to schedule repeating events (buses that arrive on different cycles), to solve gear rotation problems, and in music theory for finding rhythmic patterns.
Yes, completely free. No signup, no watermark, no hidden charges. Use it as many times as you want, for homework, work, or personal projects.
Absolutely. Everything runs in your browser using JavaScript. The numbers you enter never leave your device — there is no server processing, no logging, and no data storage. Close the tab and it's gone.