Enter the integers and calculate
Enter at least two nonzero integers in the Integers (comma or space separated) field, then select Calculate.
- Enter two or more nonzero integers in the Integers (comma or space separated) field.
- Separate values with commas, spaces, or a mixture of both. Multiple separators are accepted.
- Select Calculate to display the LCM and its calculation steps.
Review the result and calculation steps
After a successful calculation, review the displayed LCM and the visible Formula & steps area. It shows the values used and each intermediate result. For two integers, the calculator uses:
LCM(a, b) = |a × b| / GCF(a, b)
It finds the GCF with the Euclidean algorithm. For more than two integers, it processes the values pairwise:
LCM(a, b, c, ...) = LCM(LCM(a, b), c, ...)
Copy, download, or reset the result
- Select Copy result to copy the displayed calculation as text.
- Select Download result (.txt) to save the result and steps in a text file.
- Select Reset to clear the input, any displayed error, and the result section.
If copying is not permitted by the browser, the tool displays a message asking you to select and copy the result manually.
Accepted input and validation limits
- Enter nonzero integer strings with an optional leading
+or-sign. - Enter at least two and no more than 50 integers.
- Each integer may contain up to 100 digits, not counting its optional sign.
- Arithmetic uses exact
BigIntvalues. - The tool treats inputs as plain integers and does not interpret units or their real-world meaning.
Empty input, fewer than two integers, a zero, an invalid integer, more than 50 values, or a value longer than 100 digits produces a validation error instead of a result.
Privacy and local calculation
The calculator’s arithmetic runs locally in your browser. Its script.js calculation code does not make a request that sends the entered integers.
Frequently Asked Questions
What is the least common multiple (LCM)?
The least common multiple (LCM) of two or more integers is the smallest positive integer that is evenly divisible by every one of them. For example, the LCM of 4 and 6 is 12.
How is the LCM calculated?
This calculator uses LCM(a, b) = |a × b| / GCF(a, b), where the greatest common factor (GCF) is found with the Euclidean algorithm. For more than two numbers, the LCM is found pairwise: LCM(a, b, c) = LCM(LCM(a, b), c).
How is LCM related to GCF?
LCM and GCF (greatest common factor) are related by the identity LCM(a, b) × GCF(a, b) = |a × b| for any two nonzero integers a and b. This calculator computes the GCF first with the Euclidean algorithm, then uses it to derive the LCM.
What is the LCM of two numbers that share no common factors?
If two integers are coprime (their GCF is 1), their LCM is simply the product of their absolute values - for example, LCM(4, 9) = 36.
What is the LCM of a number and 0?
LCM involving 0 is undefined, since 0 is not a positive multiple of any nonzero integer. This tool requires every entered number to be nonzero.