LCM Calculator
Find the least common multiple of two or more positive whole numbers. The LCM is the smallest number that is a multiple of every input — the number you need when adding fractions with different denominators or lining up repeating schedules.
LCM Calculator tool
About the LCM Calculator
Enter 2 to 12 integers. The calculator folds pairwise LCM using |a × b| ÷ GCF(a, b). It refuses a result that would not be an exact safe integer instead of rounding a huge multiple.
Zero is rejected on purpose: a classroom LCM is a positive common multiple. For the largest shared divisor, use the GCF calculator. To list every divisor of one number, use the factor calculator.
How the LCM Calculator works
For two positive integers, LCM(a, b) = |a × b| ÷ GCF(a, b). For three or more, take LCM of the running result and the next number.
Example: GCF(12, 18) = 6, so LCM(12, 18) = 12 × 18 ÷ 6 = 36. Then LCM(36, 24) = 36 × 24 ÷ 12 = 72.
LCM(a, b) = |a × b| ÷ GCF(a, b)
LCM(a, b, c) = LCM(LCM(a, b), c)
Example
LCM(12, 18, 24) = 72, the default on this page.
How to Use the LCM Calculator
- Type at least two positive whole numbers, separated by commas or spaces.
- Read the least common multiple as soon as the list is valid.
- If the result is refused as too large, split the list or use smaller values.
- To add fractions, convert each denominator to this LCM, then add numerators.
- Open the GCF calculator if you wanted the greatest shared divisor instead.
LCM Calculator Examples
Two numbers
LCM(8, 12) = 24 because 24 is the smallest number in both 8, 16, 24… and 12, 24, 36….
Three numbers
LCM(12, 18, 24) = 72. 12 × 6 = 72, 18 × 4 = 72, 24 × 3 = 72.
Coprime pair
LCM(7, 3) = 21. When GCF is 1, LCM is just the product.
Powers of the same prime
LCM(8, 32) = 32. The LCM keeps the highest power of each prime.
How to Find the LCM by Listing Multiples
List multiples of the largest number until you find one that the others also divide. For 12 and 18: 12, 24, 36 — 36 ÷ 18 = 2, so LCM is 36. Listing fails for three large numbers; the GCF formula is faster and is what this calculator uses. Prime factorization is the same idea: for each prime, keep the highest exponent that appears, then multiply. 12 = 2² × 3, 18 = 2 × 3², 24 = 2³ × 3, so LCM = 2³ × 3² = 8 × 9 = 72.
LCM for Adding Fractions
To add 1/12 + 1/18, convert both to the LCM of 12 and 18, which is 36: 3/36 + 2/36 = 5/36. The fraction calculator does the addition and simplification; this LCM calculator is the denominator step. For mixed lists of denominators in a worksheet, paste them here first.
LCM versus GCF
GCF is the largest number that divides every input. LCM is the smallest number that every input divides. They are linked: LCM(a, b) × GCF(a, b) = |a × b| for two numbers. 12 and 18 have GCF 6 and LCM 36; 6 × 36 = 216 = 12 × 18. That identity does not extend unchanged to three numbers, which is why the calculator folds pairwise LCM.
| Numbers | GCF | LCM |
|---|---|---|
| 8, 12 | 4 | 24 |
| 12, 18 | 6 | 36 |
| 12, 18, 24 | 6 | 72 |
| 7, 3 | 1 | 21 |
| 8, 32 | 8 | 32 |
| 9, 15, 21 | 3 | 315 |
Schedules and repeating events
If one bus comes every 12 minutes and another every 18, they meet every 36 minutes — the LCM. The same pattern appears in gear teeth, repeating calendar events, and least-common-period problems. This is integer math, not a calendar: it does not know time zones or business days. Use the time calculator or date calculator for clock durations and calendar dates.
Frequently Asked Questions
Is LCM the same as LCD?
For two denominators, the least common denominator is the LCM of those denominators. This tool does not add the fractions for you.
Can I enter one number?
No. LCM of a single value is the value itself, but the form expects 2 to 12 numbers so the intent is a common multiple.
Why is 0 rejected?
LCM(0, n) is 0 in some number-theory texts. Here a classroom LCM is a positive common multiple, so 0 is refused.
What if the LCM is huge?
If |a × b| ÷ GCF is not an exact JavaScript safe integer, the tool shows an error instead of an approximate multiple.
Does this simplify a fraction?
No. Use the GCF calculator or the fraction calculator to reduce a/b.
Are decimals allowed?
No. Counting numbers only, from 1 through 1,000,000,000,000.
Guides that use this calculator
- How to Find Factors of a Number
Factors come in pairs up to the square root. Here is the list for 84, prime factorization, and the free factor calculator — not factorial n!.
- How to Check a Prime Number
Prime means exactly two positive divisors. Here is the square-root test, why 1 is not prime, and the free prime number checker.
- How to Find GCF (Greatest Common Factor)
GCF is the largest integer that divides every input. Euclid’s algorithm, a 48-18-30 example and the free GCF calculator.