LCM Calculator
Calculate the Least Common Multiple (LCM) of any list of positive integers with prime factorisation, repeated-division ladder, and step-by-step solutions.
Enter numbers (comma, space, or new line separated)
Accepts comma, space, semicolon, or newline-separated positive whole numbers up to 1,000,000,000,000.
What is the LCM Calculator?
The Least Common Multiple (LCM) of a list of positive integers is the smallest positive integer that every member of the list divides cleanly. It is the natural answer to questions like 'When do two recurring events coincide?' or 'What is the smallest common denominator that lets me add these fractions?'
This LCM calculator accepts any list of whole numbers (separated by commas, spaces, or new lines), runs trial-division factorisation on each, and combines the results using the highest power of every prime. It pairs every result with the GCD, the full prime factorisation table, the LCM × GCD identity verification, a repeated-division ladder, and an interactive prime-exponent chart so you can see the structure of the answer as well as the answer itself.
How the LCM Calculator works
1. Parse the inputs
Comma, space, or newline-separated values are split, validated as positive whole numbers ≤ 10¹², and de-duplicated.
2. Factor each input
Trial division by 2 then odd primes finds the full prime factorisation in O(√n) time per input — fast enough for ten or more 12-digit inputs in a single tap.
3. Combine prime exponents
For every prime that appears in any input, take the highest exponent across the list. Multiply the chosen prime powers to get the LCM.
4. Show your work
The result panel renders the per-input factorisation, the chosen prime powers, the multiplication, the GCD, the LCM × GCD identity, an exponent chart, and a repeated-division ladder — every intermediate value is visible.
LCM formula library
LCM × GCD identity
LCM(a, b) × GCD(a, b) = a × b
True for any pair of positive integers. Use it to read one off the other in constant time.
Prime-factor LCM
LCM = p₁^max(e) × p₂^max(e) × …
Take the HIGHEST exponent of each prime that appears in any input.
Prime-factor GCD
GCD = p₁^min(e) × p₂^min(e) × …
Take the LOWEST exponent of each prime that appears in EVERY input.
Euclidean algorithm
gcd(a, b) = gcd(b, a mod b)
Replace the larger by the remainder. Terminates in O(log min(a, b)) steps.
Divisor count τ(n)
τ(n) = (e₁+1)(e₂+1)…(eₖ+1)
Total positive divisors of n from its prime exponents.
When to use the LCM calculator
Adding or subtracting fractions
Use the LCM of the denominators as the common denominator. The result is already in lowest terms because the LCM uses the smallest possible denominator.
Lining up recurring schedules
Two events occur every a and b days respectively. They next coincide LCM(a, b) days from now — and again every LCM(a, b) days thereafter.
Engineering gear ratios
When two gears with N and M teeth mesh, every tooth of each gear contacts the same tooth of the other gear once every LCM(N, M) teeth — useful for predicting wear patterns.
Distributing items into equal groups
When you need a group size compatible with multiple constraints (divisible by 3 AND by 4), the smallest valid size is the LCM of the constraints (12 here).
Why LCM matters
LCM is one of the most-used operations in elementary number theory. It shows up in fraction arithmetic from primary school onwards, in scheduling problems through high-school competitions, in computer-algebra systems, in cryptographic key generation, and in the design of cyclic data structures.
The reason LCM feels simple but powerful is the Fundamental Theorem of Arithmetic — unique factorisation into primes — which turns 'find the smallest common multiple' into a clean multiplicative operation on exponents. Take the max instead of the sum, and you get the LCM. Take the min, and you get the GCD. Two of the most important integer functions, side by side.
Frequently Asked Questions
Related Calculators
More number-theory, fraction, and arithmetic tools that pair with LCM work.
- GCD CalculatorGreatest Common Divisor (HCF/GCF) using Euclidean algorithm, prime factorisation, or ladder with step-by-step solutions.
- Common Factor CalculatorGreatest common factor (GCF, HCF, GCD) with step-by-step prime factorization.
- Prime Factorization CalculatorPrime factors with a visual factor tree and step-by-step working.
- Fraction CalculatorAdd, subtract, multiply, divide, simplify, and convert fractions with step-by-step solutions.
- Scientific CalculatorAdvanced trig, log, exponent, root, factorial, and memory functions.
- Ratio CalculatorSimplify, scale, and compare ratios; solve equivalent ratios and proportions.