LCM of a List Calculator
Enter your positive integers separated by commas or spaces.
Result
How it is calculated
The text is split on commas and spaces. Only tokens made purely of digits and greater than zero are kept; anything else (negative numbers, decimals like 2.5, zero, letters) is skipped without a warning, and at least two valid numbers are required. The tool folds the list from left to right: lcm = lcm / gcd(lcm, x) × x for each next number x, where the gcd comes from the Euclidean algorithm (repeated remainders). The list's greatest common divisor is folded the same way, g = gcd(g, x).
It shows the LCM, the GCD and the count of numbers it actually used, so compare that count with what you typed. The arithmetic is exact whole-number arithmetic; if the LCM, or any single number, would exceed about 9.2 × 1018 (the 64-bit limit), there is no result rather than a rounded one.
Worked example
List: 12, 18, 30. Start with lcm = 12 and g = 12. Add 18: gcd(12, 18) = 6, so lcm = 12 / 6 × 18 = 36 and g = 6. Add 30: gcd(36, 30) = 6, so lcm = 36 / 6 × 30 = 180 and g = gcd(6, 30) = 6. Three numbers were used. Check: 180 / 12 = 15, 180 / 18 = 10 and 180 / 30 = 6, all whole.
Common mistakes
- Entering a negative number or a decimal and assuming it was used. The tool skips it silently: 12, -18, 2.5, 30 gives the LCM of 12 and 30 only (60, count 2), so check that the reported count matches what you typed.
- Typing a zero in the list, which is ignored rather than making the LCM zero.
- Writing numbers with thousands separators such as 1,200; the comma splits it into 1 and 200.
- Confusing the LCM with the GCD or with the product: for 12, 18 and 30 the product is 6480 but the LCM is only 180.
- Assuming the LCM of numbers with no common factor is small; then it equals the product and grows very fast, and several large numbers quickly exceed the limit and show no result.
About this calculator
The least common multiple (LCM) of a list of numbers is the smallest positive integer that all of them divide into evenly. This calculator extends the familiar two-number LCM to an entire list at once, computing it pairwise using the identity LCM(a,b) = a·b / GCD(a,b) and folding the result across every number you enter, while also reporting the list's overall greatest common divisor (GCD).
Finding the LCM of more than two numbers comes up whenever you need a common denominator for adding several fractions at once, or when scheduling recurring events that repeat on different cycles — for example, figuring out when three machines running on different maintenance intervals will all need servicing on the same day. It's a staple of middle- and high-school number theory as well as practical scheduling and manufacturing problems.
Was this helpful?
You can pick up to 3 reactions.
Popular calculators
Loan Calculator
Monthly payment, total interest and full amortization schedule.
Percentage Calculator
Percent change, percent of, and ratio calculations.
Discount Calculator
Calculate final price, savings, and discount amount.
BMI Calculator
Body mass index from height and weight (metric or imperial).
Age Calculator
Compute your exact age in years, months and days from a birth date.
Compound Interest Calculator
Calculate the final amount and interest earned with compounding.
All Calculators
- Loan Calculator
- Profit Calculator
- Discount Calculator
- BMI Calculator
- Percentage Calculator
- Ideal Weight Calculator
- Age Calculator
- Pregnancy Due Date Calculator
- Compound Interest Calculator
- BMR Calculator (Basal Metabolic Rate)
- Tip Calculator
- Fuel Cost Calculator
- Date Difference Calculator
- Sleep Cycle Calculator
- Daily Water Intake Calculator
- Simple Interest Calculator
- Heart Rate Zones Calculator
- Running Pace Calculator
- Pet Age Calculator
- Calories Burned Calculator
- Macro Calculator
- TDEE Calculator (Total Daily Energy Expenditure)
- Waist-to-Hip Ratio Calculator
- Honor Roll Calculator
- One Rep Max (1RM) Calculator
- Ovulation Calculator
- Electricity Cost Calculator
- Unit Price Calculator
- Savings Goal Calculator
- Break-Even Point Calculator
- Paint Calculator
- Course Grade Average Calculator
- Business Days Calculator
- Time Duration Calculator
- Fuel Economy Calculator
- Temperature Converter
- Tile Calculator
- Aspect Ratio Calculator
- Roman Numeral Converter
- Goal Weight Timeline Calculator
- Salary Converter (Hourly to Annual)
- Credit Card Validator (Luhn)
- Body Surface Area (BSA) Calculator
- Feels-Like Temperature Calculator
- Ohm’s Law Calculator
- PPI (Pixel Density) Calculator
- Molar Mass Calculator
- Zodiac Sign Calculator (Western + Chinese)
- IBAN Validator
- Shoe Size Converter
- Country Info & Dialing Code Lookup
- Time Zone Difference (World Clock)
- CAGR (Compound Annual Growth Rate) Calculator
- Rule of 72 Calculator
- Blood Alcohol Content (BAC) Calculator
- Lean Body Mass (LBM) Calculator
- Pythagorean Theorem Calculator
- Speed Converter
- Download Time Calculator
- Date Calculator (Add/Subtract)
No calculators found
Comments (1)
The preset list shows a typical use: three things that repeat every 4, 6 and 8 minutes line up again after 24 minutes, and the same 24 is the least common denominator if you want to add fractions with those denominators. The GCD line beside it is the largest step that divides every number in the list. What do you use LCMs for, fractions, schedules, gear teeth or something else?