Common Multiple Calculator
Calculate the Least Common Multiple (LCM) of two or more numbers instantly. Shows prime factorization, step-by-step GCD, and supports large integers.
About
Incorrect LCM computation leads to misaligned scheduling intervals, broken gear ratios, and wrong denominators in fraction arithmetic. The Least Common Multiple of integers a and b is derived through the Euclidean algorithm: first compute gcd(a, b), then apply lcm = |a ร b| รท gcd(a, b). This tool extends the computation to n integers by iterative reduction. It performs full trial-division prime factorization for each input and displays the maximum exponent method as verification. Results use BigInt arithmetic internally, so values up to 1015 remain exact. The tool approximates nothing. Every digit is precise.
Practical applications: synchronizing periodic events (traffic lights cycling at 30s, 45s, 60s), finding common denominators for fraction addition, calculating gear mesh intervals, and tiling problems. Note: input of 0 is mathematically undefined for LCM since gcd(a, 0) = a but a ร 0 = 0 collapses the result. This calculator rejects zero and negative inputs to maintain mathematical rigor.
Formulas
The Least Common Multiple is computed from the Greatest Common Divisor. The Euclidean algorithm finds gcd by repeated division:
Once gcd is known, the LCM of two numbers follows:
For n numbers, the LCM is computed by iterative reduction:
The prime factorization method provides an alternative verification. Each ai is decomposed as ai = p1e1 ร p2e2 ร โฆ Then:
Where p ranges over all distinct primes appearing in any factorization, and ep is the exponent of p in each number. The maximum exponent for each prime is selected.
Variable legend: a, b = input integers. p = prime factor. e = exponent of prime factor. n = total count of input numbers.
Reference Data
| Number Set | GCD | LCM | Prime Factorization (per number) |
|---|---|---|---|
| 4, 6 | 2 | 12 | 22; 2 ร 3 |
| 12, 18 | 6 | 36 | 22 ร 3; 2 ร 32 |
| 5, 7 | 1 | 35 | 5; 7 (coprime) |
| 8, 12 | 4 | 24 | 23; 22 ร 3 |
| 3, 5, 7 | 1 | 105 | 3; 5; 7 |
| 6, 10, 15 | 1 | 30 | 2 ร 3; 2 ร 5; 3 ร 5 |
| 4, 6, 8 | 2 | 24 | 22; 2 ร 3; 23 |
| 9, 12, 15 | 3 | 180 | 32; 22 ร 3; 3 ร 5 |
| 14, 21 | 7 | 42 | 2 ร 7; 3 ร 7 |
| 100, 75 | 25 | 300 | 22 ร 52; 3 ร 52 |
| 24, 36, 48 | 12 | 144 | 23 ร 3; 22 ร 32; 24 ร 3 |
| 7, 11, 13 | 1 | 1001 | 7; 11; 13 (all prime) |
| 2, 3, 4, 5 | 1 | 60 | 2; 3; 22; 5 |
| 16, 20, 25 | 1 | 400 | 24; 22 ร 5; 52 |
| 1, 1 | 1 | 1 | 1; 1 (trivial) |
| 17, 19 | 1 | 323 | 17; 19 (twin primes) |
| 360, 240 | 120 | 720 | 23 ร 32 ร 5; 24 ร 3 ร 5 |
| 1000, 1500 | 500 | 3000 | 23 ร 53; 22 ร 3 ร 53 |