LCM Calculator
Calculate the least common multiple of multiple numbers.
Runs locally in your browser
Your inputs are processed locally in your browser and are not uploaded or stored by us.
The LCM Calculator computes the least common multiple—the smallest non-negative integer that is a multiple of every supplied integer.
How to use the LCM Calculator
- Enter two or more integer values in the input fields.
- Use the "Add value" button to compute the LCM for more numbers simultaneously.
- Click "Calculate" to determine the least common multiple across all inputs.
LCM Calculation Method
lcm(a, b) = |(a / gcd(a,b)) × b|
The division by the GCD is performed before multiplication to reduce intermediate growth, but the final exact result must still remain within JavaScript’s safe-integer range. If the exact LCM would exceed the supported safe-integer range, the tool rejects the calculation rather than returning an approximate integer.
Calculating LCM for 4, 6, and 8
Values4, 6, 8
lcm(4, 6) = 12
lcm(12, 8) = 24
Result: 24
Notes
- The calculator requires at least 2 values.
- Inputs must fit within JavaScript’s safe-integer range.
- Negative values are allowed (e.g., lcm(-4, 6) = 12).
- Zero is allowed (e.g., lcm(0, 10) = 0).
- Decimal values are rejected.
- The calculator preserves exact integer relationships within its documented limits.
- Your inputs are processed locally in your browser and are not uploaded or stored by us.