Mathematics · Numbers and arithmetic
Find the least common multiple of integers
Enter at least two nonzero integers. The result is the smallest positive integer that is a multiple of each — useful for common denominators and repeating schedules.
Calculate
How the calculator works
For two numbers, LCM = |a × b| / GCF(a, b). For more than two, the engine folds: LCM(a, b, c) = LCM(LCM(a, b), c). Zeros are refused (every multiple of 0 is 0, which is not a positive LCM here).
Formula and method
LCM(a, b) = |a × b| / GCF(a, b)
LCM(12, 18) = |216| / 6 = 36.
LCM(a, b, c) = LCM(LCM(a, b), c)
LCM(12, 18, 24) = LCM(36, 24) = 72.
The identity LCM × GCF = |a × b| for two integers is the implementation, not a prime-factor listing. Intermediate products can grow quickly; very large inputs may overflow floating-point integers. Signs are ignored; the LCM is returned positive.
Worked example
12, 18, and 24
12 ; 18 ; 24
- LCM(12, 18) = 216 / 6 = 36.
- LCM(36, 24) = 864 / 12 = 72.
LCM = 72.
Input notes
- Integers
- At least two nonzero integers. Decimals are refused.
Assumptions and limits
Assumptions
- Positive LCM of nonzero integers.
- Folding pairwise is associative for this operation.
Limits
- Does not print a prime-factor table.
- Huge products may lose integer exactness in JavaScript.
How to read the result
72 is the smallest positive number that 12, 18, and 24 all divide. For adding 1/12 + 1/18, a common denominator can be 72 (or 36 for just those two). The GCF of the same list is 6, not 72.
Common mistakes
Taking the product 12 × 18 × 24 as the LCM.
The product is a common multiple, not the least. Divide out shared factors via the GCF identity.
Using the GCF when you needed a common multiple.
GCF 6 does not work as a common denominator for 1/12 and 1/18.
Related calculations
- GCF (GCD)Enter at least two integers. The result is the largest positive integer that divides all of them — the same GCF used to reduce a fraction or a ratio.
- FractionsTwo integer fractions and an operation. The engine uses a common denominator or cross-products, then reduces by the GCF so the answer is in lowest terms.
- ExponentEvaluate aᵇ. Integers, decimals, negative exponents (reciprocals), and 1/2 (square root, base ≥ 0) are possible, within the reals and floating-point limits.
- Square rootEnter a number that is not negative. The tool returns the principal (nonnegative) square root. It is the inverse of squaring, not a cube root or an nth root.
- RatioTwo integers in, a reduced ratio out (8 : 12 becomes 2 : 3), plus the quotient A/B and each term’s weight in the sum of absolute values — not “A as a percent of B.”
- Speed, distance, timeTwo known quantities, the third follows. Kilometres and km/h, or miles and mph, but not a mix of the two systems.
Frequently asked questions
Why not just multiply all the numbers?
That overshoots. Shared prime factors would be counted twice.
12 × 18 = 216 is a common multiple of 12 and 18, but 36 is smaller and still works. The GCF in the denominator removes the double-counted 6.
Is LCM defined for more than two numbers?
Yes, by repeating the two-number step.
LCM(a, b, c) is the least positive integer divisible by a, b, and c. Computing LCM(LCM(a, b), c) yields that value.
Can I include 1?
Yes. LCM(n, 1) = |n|.
1 divides every integer, so it does not raise the least common multiple.
Author and update
Written by Rédaction HexaCalc (editorial team). Content last updated: August 25, 2026. No third-party medical or financial review is claimed.
- Les Éléments, Livre I (théorème de Pythagore) et Livre VII (algorithme d’Euclide) — Tradition mathématique euclidienne
The companion divisor
GCF is the other half of the identity used here. Reduce fractions and ratios with it.
Calculate the GCFCategory: Mathematics