Sprint 8 Converter + Math
Least Common Multiple (LCM) Finder
LCM from product and GCD.
LCM
10
How it works
The Least Common Multiple (LCM) of two or more integers is the smallest positive integer divisible by all of them without a remainder. LCM arises wherever you need to align repeating cycles or find a common denominator for fraction arithmetic.
**Computing LCM** The fastest method uses the GCD: LCM(a, b) = |a × b| / GCD(a, b). The GCD is computed via the Euclidean algorithm in O(log n) time. For three or more numbers: LCM(a, b, c) = LCM(LCM(a, b), c).
**Fraction arithmetic** Adding or subtracting fractions requires a common denominator — ideally the LCD (Least Common Denominator), which is the LCM of the denominators. 1/4 + 1/6: LCM(4, 6) = 12. Convert: 3/12 + 2/12 = 5/12. Using LCM (instead of just multiplying denominators) keeps the fraction in the simplest form.
**Cyclic alignment examples** - Gear teeth: a 12-tooth gear meshing with an 18-tooth gear realigns to the same tooth-pair position every LCM(12,18) = 36 teeth of travel. - Schedule planning: if Team A meets every 4 days and Team B every 6 days, they meet together every LCM(4,6) = 12 days. - Music: a 3-beat pattern against a 4-beat pattern (polyrhythm) repeats every LCM(3,4) = 12 beats.
**Co-prime numbers** If GCD(a, b) = 1 (a and b share no common factors), then LCM(a, b) = a × b. For example, LCM(7, 11) = 77 because 7 and 11 are both prime.
**Overflow caution** For very large inputs, the intermediate product a × b may overflow 64-bit integers. The tool uses BigInt arithmetic to handle inputs up to 10¹⁵ without precision loss.
Privacy: all calculations run in the browser. No data is transmitted.
Frequently Asked Questions
- LCM(0, n) = 0 for any integer n. This follows from the definition: the LCM is the smallest positive integer divisible by both numbers. Since every integer divides 0 (0 ÷ n = 0 with remainder 0), any common multiple must be divisible by 0 as well — but the only non-negative multiple of 0 is 0 itself. In practice, LCM with 0 is mathematically defined as 0 but has no useful interpretation for scheduling or fraction problems.
- LCM determines when polyrhythms cycle back to their starting alignment. A 3-against-4 polyrhythm (one part plays 3 beats while another plays 4) repeats every LCM(3,4) = 12 subdivisions. African, Indian, and West African music extensively use polyrhythms — the djembe patterns in traditional West African music often use 3:4, 3:2, and 4:3 relationships. Steve Reich's minimalist compositions and Afrobeat are built around these cyclic alignments. Each cycle point is where all rhythmic lines coincide simultaneously.
- For two distinct primes p and q, LCM(p, q) = p × q, because GCD(p, q) = 1 (primes share no factors). Example: LCM(7, 11) = 77. This is why prime denominators in fractions require the most 'expansion' to find a common denominator: 1/7 + 1/11 requires denominator 77. For large primes, LCM is simply the product — there's no shortcut via GCD reduction.
- For simple fractions: find the LCD (LCM of denominators), scale each fraction so the denominator matches the LCD, add numerators. 1/4 + 1/6: LCM(4,6) = 12. Convert: 3/12 + 2/12 = 5/12. Mental shortcut when denominators are coprime: just multiply them: 1/7 + 1/9 → denominator 63 → 9/63 + 7/63 = 16/63. When one denominator divides the other (e.g., 1/4 + 1/8): LCM is the larger denominator (8). Convert: 2/8 + 1/8 = 3/8.