---
slug: lcm-calculator
title: "LCM Calculator"
category: math
updated: 2026-11-17
canonical: https://calcseed.com/c/math/lcm-calculator/
html: /c/math/lcm-calculator/
---

# LCM Calculator

Find the least common multiple of three numbers. Free and instant.

## Quick answer

**Quick answer:** with the default inputs (12, 18, 30), the least common multiple is **180**. Change any input to update the result.

## Default calculation

Values computed by this calculator at exactly the default inputs listed below.

### Inputs (defaults)

| Input | Value | Unit |
| --- | --- | --- |
| First number | 12 |  |
| Second number | 18 |  |
| Third number | 30 |  |

### Outputs at these defaults

| Output | Value | Unit |
| --- | --- | --- |
| Least common multiple | 180 |  |

## Formula

```text
lcm(a, b) = a × b ÷ gcd(a, b)
```

## Inputs

| Variable | Type | Unit | Default |
| --- | --- | --- | --- |
| First number | number |  | 12 |
| Second number | number |  | 18 |
| Third number | number |  | 30 |

## Outputs

| Result | Format |
| --- | --- |
| Least common multiple | primary |

## How it works

### What this calculator does

Enter three positive integers and the calculator returns the least common multiple: the smallest positive number that all three divide into exactly. At the defaults, 12, 18 and 30 all divide 180 — 180 ÷ 12 = 15, 180 ÷ 18 = 10 and 180 ÷ 30 = 6 — and no smaller positive number manages all three divisions at once. The LCM answers every question about when repeating cycles line up for the first time.

### The pairwise formula

Multiplying the two numbers gives a common multiple immediately, but usually not the smallest one, because the product counts their shared factors twice. Dividing by the GCD removes exactly that duplication. The formula also encodes a famous identity: for any pair, LCM × GCF = a × b, so knowing one hands you the other. For three numbers, the calculator applies the formula twice — first to the opening pair, then to that result and the third number — and the pairing order never changes the answer.

### Worked example at the defaults

#### Two pairwise rounds

- First pair: gcd(12, 18) = 6, so lcm(12, 18) = 12 × 18 ÷ 6 = 216 ÷ 6 = 36.
- Second pair: gcd(36, 30) = 6, so lcm(36, 30) = 36 × 30 ÷ 6 = 1,080 ÷ 6 = 180.
- Check: 180 ÷ 12 = 15, 180 ÷ 18 = 10, 180 ÷ 30 = 6.
- Result: lcm(12, 18, 30) = 180.

Notice how the running answer grows but stays efficient: the raw product 12 × 18 = 216 was already a common multiple of the first pair, but 36 is the smallest one, and that discipline carries through the second step. Multiplying all three inputs instead — 12 × 18 × 30 = 6,480 — also produces a common multiple, yet it is 36 times larger than necessary, which is the price of never dividing out the shared factors.

### The prime factorization view

| Number | Prime factors | Contribution to LCM |
| --- | --- | --- |
| 12 | 2 × 2 × 3 | 2 × 2 (needs two 2s) |
| 18 | 2 × 3 × 3 | 3 × 3 (needs two 3s) |
| 30 | 2 × 3 × 5 | 5 (the only source of 5) |

Where the GCF takes the lowest power of every shared prime, the LCM takes the highest power of every prime that appears anywhere. The prime 2 reaches 2 × 2 in 12, the prime 3 reaches 3 × 3 in 18, and the prime 5 appears once in 30, so the LCM is 2 × 2 × 3 × 3 × 5 = 4 × 9 × 5 = 180. This view makes the size jump intuitive: each number donates whatever factors the others are missing, and 180 must carry all of them simultaneously.

### Where the LCM shows up

- Scheduling: three maintenance routines running every 12, 18 and 30 days all fall due on the same day for the first time after 180 days, then every 180 days after that.
- Adding fractions: 1/12 + 1/18 + 1/30 uses 180 as the common denominator, giving 15/180 + 10/180 + 6/180 = 31/180.
- Gears and mechanics: gears with 12, 18 and 30 teeth return to their exact starting orientation after 180 tooth-passes.
- Event planning: a club meeting every 12 days, a payment cycle every 18 days and a report every 30 days collide — usefully or badly — on day 180.

The fraction case is the one students meet most. Any common denominator works for adding fractions, but the LCM gives the least common denominator, which keeps every number in the computation small: with 180 the numerators stay at 15, 10 and 6, while the full product 12 × 18 × 30 = 6,480 would push the numerators into the hundreds for no benefit.

### LCM versus GCF

#### Reading the size rule

The two answers bracket the pair from opposite directions. For 12 and 18 the GCF is 6 — the largest piece living inside both — while the LCM is 36 — the smallest number both live inside. Their product identity ties them together: 6 × 36 = 216 = 12 × 18. A quick size rule catches most mix-ups: for numbers greater than 1, the GCF never exceeds the smallest input and the LCM never falls below the largest one, so an answer of 6 and an answer of 180 describe fundamentally different questions. If you need the shared-divisor direction, the GCF calculator runs the same three inputs through the Euclidean algorithm, and the GCD & LCM calculator shows both results at once.

### Common mistakes

- Multiplying all three numbers and stopping: 12 × 18 × 30 = 6,480 is a common multiple but not the least one, overshooting by a factor of 36.
- Dividing by the wrong quantity in the formula: lcm(12, 18) divides by gcd(12, 18) = 6, not by 3 or 12. Using the wrong divisor gives 72 or 18 instead of 36.
- Assuming the LCM of a set is just the largest input: 30 divides 30 but not 12 or 18, so 30 fails as the answer for the defaults.
- Confusing the LCM with the GCF: they differ by 30 times here (180 versus 6), and the size rule above flags the error instantly.

The same two-second verification works every time: divide your answer by each of the three inputs. Three whole-number quotients and no smaller candidate means the LCM is right — for 180 the quotients are 15, 10 and 6.

## FAQ

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

180. It is divisible by all three — giving quotients of 15, 10 and 6 — and no smaller positive number is divisible by all three.

### How do I find the LCM of three numbers?

Apply lcm(a, b) = a × b ÷ gcd(a, b) to the first pair, then to that result and the third number. For 12, 18, 30: lcm(12, 18) = 36, then lcm(36, 30) = 180.

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

36. The GCD of 12 and 18 is 6, so lcm = 12 × 18 ÷ 6 = 216 ÷ 6 = 36.

### Why does the formula divide by the GCD?

The plain product a × b counts the factors the two numbers share twice, so dividing by the GCD removes the duplication. That is why 12 × 18 = 216 shrinks to 36 once the shared 6 is divided out.

### What is the least common denominator of 12, 18 and 30?

180, because the least common denominator is the LCM of the denominators. Adding 1/12 + 1/18 + 1/30 with it gives 15/180 + 10/180 + 6/180 = 31/180.

### How are LCM and GCF related?

For any two numbers, LCM × GCF equals their product: for 12 and 18, 36 × 6 = 216 = 12 × 18. Find one and the identity hands you the other.

### Does the order of the inputs change the LCM?

No. Pairing 12 with 18 first or 18 with 30 first leads to the same 180, because a number divisible by all three is divisible regardless of how the computation is staged.

### What is the LCM when two numbers divide evenly into the third?

The LCM is the largest number. For 6, 10 and 30, both 6 and 10 divide 30, so lcm(6, 10, 30) = 30 with no extra factors needed.

### Can the LCM be smaller than the largest input?

No. Every common multiple must be a multiple of the largest input, so the LCM is at least that value. For 12, 18 and 30 the floor is 30, and the true answer of 180 sits above it.

## Method and sources

Methodology: Results follow exact mathematical definitions; the arithmetic is deterministic and can be verified by hand from the steps shown.

Last updated: 2026-11-17.
- LCM via lcm(a,b) = a x b / gcd(a,b), applied pairwise.
