# Least Common Multiple Calculator - LCM of Two or More Numbers

Find the LCM of a list of positive integers with the gcd identity for whole numbers. Default 12, 18, 30 → 180. Runs in your browser.

### Integers (two or more)

Positive integers - commas, spaces, or new lines_12, 18, 30_

Clear

This page is LCM-search focused. For a full common-factor table see the [common factor calculator](https://www.toolcomb.com/common-factor-calculator); for GCF alone see the [greatest common factor calculator](https://www.toolcomb.com/greatest-common-factor-calculator).

### LCM result

The least common multiple will appear here

### What the Least Common Multiple Is For

The **least common multiple** (LCM) of a set of positive integers is the smallest positive integer that every member of the set divides. It is the first time the multiplication tables of those numbers line up. If two gears have 12 and 18 teeth, they return to the same mesh after 36 teeth; if a third gear with 30 teeth joins the train, the first common turn is 180 teeth. That is why the default example on this page is **12, 18, 30 → LCM 180**.

This **free online LCM calculator** is search-focused: you paste two or more whole numbers and you get one LCM, calculated for the whole-number inputs you enter so the intermediates stay exact. The identity is **lcm(a, b) = |a × b| / gcd(a, b)**, folded across the list. The GCD of the same set is shown as an optional check - it is not the headline. If you wanted a combined GCD + LCM + common-factor dump, that is the [common factor calculator](https://www.toolcomb.com/common-factor-calculator). If you wanted only the greatest shared factor, that is the [greatest common factor calculator](https://www.toolcomb.com/greatest-common-factor-calculator).

Display is capped at **8000 digits**. An LCM can grow much faster than the inputs (coprime 500-digit numbers have a ~1000-digit LCM; many pairwise-coprime inputs explode). The tool refuses to print a truncated false answer past the cap. Each input is limited to 500 digits and 200 numbers per paste so a tab cannot freeze on a malicious wall of text.

### How to Use This Free Online LCM Calculator

Using this **least common multiple finder** is straightforward:

1. **Paste at least two positive integers** in the textarea. Separate them with commas, spaces, or new lines. The default is 12, 18, 30.
2. Read the **LCM** in the result panel. The GCD of the set is listed underneath so you can sanity-check lcm × gcd against a two-number product when you only entered a pair.
3. **Copy** the LCM, or clear the box. The last list is saved locally for up to 30 days.

**Note:** zero is rejected. Some programming libraries define lcm(a, 0) = 0; school exercises do not.

### The Identity lcm(a, b) = |ab| / gcd(a, b)

lcm(a, b) = |a × b| / gcd(a, b)

Divide before you multiply: (a / gcd) × b

Why divide first? a × b can be larger than a language’s naive integer type; a / gcd is always an integer, so (a / gcd) × b is the LCM and stays smaller until the last multiply. This page keeps the calculation practical, but the order matters for the 8000-digit cap: we check the decimal length of the result, not an overflowed scratch product.

#### Example - lcm(12, 18)

- gcd(12, 18) = 6 by Euclid: 18 = 1×12 + 6, 12 = 2×6 + 0
- (12 / 6) × 18 = 2 × 18 = 36
- Multiples of 12: 12, 24, **36**, 48, …
- Multiples of 18: 18, **36**, 54, …

#### Example - fold in 30

- lcm(12, 18, 30) = lcm(36, 30)
- gcd(36, 30) = 6
- (36 / 6) × 30 = 6 × 30 = **180**

Association does not care about order: lcm(12, lcm(18, 30)) is also 180. The calculator reduces left to right.

### Prime-Power Shortcut Versus Listing Multiples

Two classroom methods sit beside the gcd identity. The **prime-power method** writes each input in primes and keeps the highest exponent: 12 = 2² × 3, 18 = 2 × 3², 30 = 2 × 3 × 5, so LCM = 2² × 3² × 5 = 180. That is the same number this page computes, and you can inspect the primes on the [prime factorization calculator](https://www.toolcomb.com/prime-factorization-calculator) or the individual divisor list on the [factor calculator](https://www.toolcomb.com/factor-calculator).

The **listing-multiples method** writes multiples of the largest input until one of them is divisible by every other input. For 12 and 18 you stop at 36. For 12, 18, and 30 you walk 30, 60, 90, 120, 150, 180. Listing is honest and slow. It becomes impractical for large inputs. Use the calculator result rather than trying to list every multiple.

### LCM Versus GCF - Opposite Ends of the Same Pair

GCF asks “what is the largest integer that divides all of these?” LCM asks “what is the smallest integer that all of these divide?” For two numbers they lock together: **gcd(a, b) × lcm(a, b) = a × b**. For 12 and 18, 6 × 36 = 216 = 12 × 18. The identity does _not_ say gcd(a, b, c) × lcm(a, b, c) = a × b × c. Check the default: gcd(12, 18, 30) = 6 and lcm = 180, and 6 × 180 = 1080, while 12 × 18 × 30 = 6480. Do not use the two-argument product formula on a triple.

Word problems tell you which end you want. “When do the blinking lights next coincide?” is LCM. “What is the largest tile that covers both rooms?” is GCF. Adding fractions with unlike denominators uses LCM of the denominators as the common denominator.

### Where LCM Shows Up in Real Work

#### 1. Adding fractions and mixed clocks

1/12 + 1/18 + 1/30 needs a common denominator. 180 works and is the least one. Smaller common denominators do not exist; larger ones (360, 540) work but waste arithmetic.

#### 2. Scheduling and repeating events

Buses every 12 and 18 minutes meet every 36 minutes if they started together. Three routes at 12, 18, and 30 minutes meet every 180 minutes - three hours.

#### 3. Gear trains and digital audio

Tooth counts and sample-rate conversions are LCM problems in disguise: find a period that contains a whole number of each cycle. The numbers are often larger than 12, 18, and 30, so listing multiples is not a practical check.

### Coprime Inputs, Extra Worked LCMs, and Typical Traps

When two positive integers share no common prime, they are **coprime** (gcd = 1) and the identity collapses to lcm(a, b) = a × b. lcm(8, 9) = 72, lcm(7, 15) = 105, lcm(11, 13) = 143. Students who “take the bigger number” because 9 does not look like a multiple of 8 miss those products. Conversely, when one number already divides the other, the LCM is the larger one: lcm(12, 36) = 36, lcm(10, 100) = 100. The default triple is neither of those extremes: 12, 18, and 30 overlap on 2 and 3 but 30 brings a 5, so 180 is bigger than any input and smaller than the product 6480.

**lcm(4, 6, 8).** lcm(4, 6) = 12 because gcd(4, 6) = 2 and (4/2)×6 = 12. Then lcm(12, 8) = 24 because gcd(12, 8) = 4 and (12/4)×8 = 24. Prime-power check: 4 = 2², 6 = 2×3, 8 = 2³, so LCM = 2³ × 3 = 24. Listing multiples of 8: 8, 16, 24 - and 24 is divisible by 4 and 6.

**lcm(21, 6, 35).** gcd(21, 6) = 3, lcm = 42. gcd(42, 35) = 7, lcm = 210. Primes: 21 = 3×7, 6 = 2×3, 35 = 5×7 → 2×3×5×7 = 210. This is a standard “when do three warning lights coincide” number.

**Adding three fractions.** 1/12 + 1/18 + 1/30 = 15/180 + 10/180 + 6/180 = 31/180, which does not simplify further because gcd(31, 180) = 1. If you had used a common denominator of 360 you would still get an equivalent fraction and then have to cancel. The LCM denominator is the one that usually arrives already reduced or close to it.

Traps: (1) Computing gcd and reporting it as the LCM - 6 instead of 180 for the default. (2) Multiplying all three numbers: 6480 is a common multiple, not the least. (3) Taking pairwise LCMs and then multiplying those: lcm(12,18)=36 and lcm(18,30)=90, and 36×90 is 3240, which is not 180. You must fold, not multiply the pairwise answers. (4) Ignoring a repeated number: lcm(12, 12, 18) is still 36; duplicates do not change LCM. (5) Pasting a decimal or a fraction; this page wants whole numbers. LCM of rationals is a different (and rarer) exercise: clear denominators first, take integer LCM, then adjust - not implemented here.

Another trap is overflow-as-silence. A naive program that multiplies a×b before dividing by gcd can wrap a 64-bit integer and print a garbage LCM that still looks like a plausible whole number. BigInt plus the 8000-digit cap is how this page refuses to lie: either you see the exact LCM or you see an error, never a wrapped residue.

### Why LCM Grows Faster Than GCF

GCF can only shrink or stay as you add numbers to the set: gcd(a, b, c) divides gcd(a, b). LCM can only grow or stay: lcm(a, b) divides lcm(a, b, c). Adding a coprime 5 to 12 and 18 multiplies the LCM by 5 (36 → 180) while the GCD stays 6. That is why an LCM calculator needs a digit cap and a GCF calculator usually does not: one output explodes, the other is bounded by the smallest input.

If your homework wants both numbers, compute LCM here and GCF on the sibling page rather than trusting a single product identity on a triple. For two numbers only, you may compute one and recover the other from a × b, which is a useful exam-day check: after you get lcm(12, 18) = 36, 12 × 18 / 36 should return 6.

### LCM for More Than Three Numbers, and Time Units

Folding does not stop at three inputs. lcm(2, 3, 4, 5, 6, 7) is a popular puzzle: lcm(2,3)=6, lcm(6,4)=12, lcm(12,5)=60, lcm(60,6)=60, lcm(60,7)=420. The 6 never increases the running LCM because 6 already divides 60. The 7, being coprime to 60, multiplies it. 420 is also 2^2 × 3 × 5 × 7, the max-exponent product. Paste those six numbers in the textarea to watch the same 420 appear without listing a hundred multiples of 7.

Clock arithmetic is the same fold with named units. Seconds in a minute (60), minutes in an hour (60), and 24 hours are already multiples of smaller integers; LCM questions at that scale are usually “two events every a and b minutes.” If a bell rings every 12 minutes and a chime every 18, they coincide every 36 minutes, twelve times in 432 minutes if they started together - but the first coincidence is still the LCM, 36. A third bell every 30 minutes pushes the first common ring to 180 minutes, the default on this page. That is the pedagogical reason 12, 18, 30 is the example rather than a random triple.

Programming loops that sleep for coprime periods (7 ms and 11 ms) theoretically align every 77 ms. Real-time systems rarely want that; they want a single scheduler tick that is an LCM of the task periods. This calculator will not design your RTOS, but it will tell you that lcm(10, 25, 40) = 200, so a 200-unit tick captures all three periods whole. gcd of that set is 5, shown underneath as the optional check: 10, 25, and 40 are all multiples of 5, and 200 is a multiple of each.

Fractions of an inch in shop drawings (1/8, 1/16, 1/32) use LCM of denominators after you write them as integers 8, 16, 32 - whose LCM is 32, already the finest ruler mark. LCM of 8, 12, 18 is 72, which is why some inch/metric conversion tables look crowded. Convert mixed numbers to improper integers before you paste; this textarea will not parse 1/8.

### Frequently Asked Questions (FAQ) - LCM

#### How do I find the LCM of two or more numbers?

For two positive integers, lcm(a,b)=|a×b|/gcd(a,b). Divide one number by the GCF, then multiply by the other. For more than two numbers, continue the same calculation across the list: lcm(a,b,c)=lcm(lcm(a,b),c). Enter whole numbers separated by commas, spaces, or new lines.

#### What is the difference between LCM and GCF?

The least common multiple is the smallest positive integer that every input divides. The greatest common factor (GCF/GCD/HCF) is the largest positive integer that divides every input. For 12 and 18, LCM is 36 and GCF is 6. They are linked by lcm(a,b)×gcd(a,b)=|a×b|. This page is LCM-search focused; use the GCF calculator when the greatest shared factor is the goal.

#### What is the LCM of 12 and 18?

lcm(12,18)=|12×18|/gcd(12,18)=216/6=36. Multiples of 12 begin 12, 24, 36, 48, … and multiples of 18 begin 18, 36, 54, … so 36 is the first shared multiple. Adding a third number changes the answer: lcm(12,18,30)=180, which is the default example on this calculator.

#### How do I find the LCM of more than two numbers?

Fold the two-argument identity: lcm(a,b,c)=lcm(lcm(a,b),c). Order does not matter because LCM is associative. Example: lcm(12,18)=36, then lcm(36,30)=180. You can also take the highest power of each prime that appears: 12=2²×3, 18=2×3², 30=2×3×5, so LCM=2²×3²×5=180.

#### How does the listing-multiples method work?

Write multiples of the largest number until one of them is divisible by every other input. For 12 and 18: 18, 36 - and 36÷12=3, so LCM=36. For 12, 18, and 30 you would list 30, 60, 90, 120, 150, 180 and stop at 180. Listing is fine for small classroom numbers; the gcd identity is what this calculator uses because listing is impractical for large integers.

#### Does this LCM calculator upload my numbers?

No. The LCM is computed in your browser with JavaScript your browser. Nothing is sent to a server. After the page loads, the tool still works if the network drops. The last input is stored only in localStorage on your device for up to 30 days.

### Why Choose Our Least Common Multiple Calculator?

- **Free, no account.** Unlimited LCM lookups.
- **Private.** Euclid and the lcm identity stay in the browser.
- **Two or more integers** in one textarea, folded associatively.
- **Large-result safeguard** - results beyond the supported display length are refused, not truncated.
- **GCD of the set** shown as a secondary check.
- **Works offline** after the first page load.

## Related Tools

Discover more free tools that might help with your next task.

[Area Calculator Calculate area of squares, rectangles, triangles, circles, and more Use Tool](https://www.toolcomb.com/area-calculator)

[Average Calculator Calculate mean, median, mode, and range from a list of numbers Use Tool](https://www.toolcomb.com/average-calculator)

[Basic Calculator Add, subtract, multiply, and divide with a free online calculator Use Tool](https://www.toolcomb.com/basic-calculator)

[Big Number Calculator Add, subtract, multiply, and divide integers too large for a standard calculator Use Tool](https://www.toolcomb.com/big-number-calculator)

[Binary Calculator Add, subtract, and convert binary numbers to decimal and hex Use Tool](https://www.toolcomb.com/binary-calculator)

[Circle Calculator Find radius, diameter, circumference, area, arc length, and sector area Use Tool](https://www.toolcomb.com/circle-calculator)

### Related guides

Read the how-to, then come back to this tool when you are ready to run it locally.

- [GCF vs LCM: Which Calculator When Homework Asks GCD/HCF vs LCM, prime factorization, and adding fractions with unlike denominators. A comparison table for picking the right ToolComb tool.](https://www.toolcomb.com/blog/gcf-lcm-when-homework-asks-which-tool)

[View All Tools](https://www.toolcomb.com/tools)
