Least common multiple calculator

Enter two integers with up to 100 digits each to find their exact least common multiple.

First integer a
Second integer b

Least common multiple

144

GCD(a, b)6
GCD ร— LCM = |a ร— b|Yes

Contents

How the LCM calculator works

Two repeating intervals reaching the same endpoint

Enter two integers. The calculator returns their least common multiple and can reveal the GCD, Euclidean divisions and the exact substitution used to obtain it.

The first positive multiple shared by both numbers

For two nonzero integers, the LCM is the smallest positive integer divisible by each input without a remainder. Signs are ignored, so 21 and 6 have the same LCM as -21 and 6.

lcmโก(a,b)=โˆฃagcdโก(a,b)โ‹…bโˆฃ\operatorname{lcm}(a,b)=\left|\frac{a}{\gcd(a,b)}\cdot b\right|

Dividing by the GCD before multiplying keeps the intermediate value smaller and exact. For 48 and 18, the GCD is 6, so |48 รท 6 ร— 18| = 144.

gcdโก(a,b)โ‹…lcmโก(a,b)=โˆฃaโ‹…bโˆฃ\gcd(a,b)\cdot\operatorname{lcm}(a,b)=|a\cdot b|

Three ways to use the answer

Two coprime inputs have an LCM equal to their product. That is why LCM(13, 17) = 221.

Zero, signs and exact limits

If either input is zero, the calculator returns 0 by the standard computational convention and skips the division formula. This also makes LCM(0, 0) unambiguous inside the tool.

The LCM is never negative, even when one or both inputs are negative.

Each input may contain up to 100 digits. The result can be longer than either input and is calculated without rounding. Decimal fractions, exponent notation and letters are rejected.

Questions about least common multiples

The short answers below cover common denominators, zero and the relation between GCD and LCM.

What does LCM mean?

It is the least common multiple: the smallest positive number divisible by both nonzero inputs.

How is an LCM different from a GCD?

The LCM is a shared multiple above the inputs, while the GCD is the largest shared divisor. Their product equals the absolute product of the two inputs.

Why is LCM(0, 25) equal to 0?

Integer arithmetic convention defines the LCM of any pair containing zero as zero. The calculator handles it without division.

Can the LCM be smaller than both inputs?

For nonzero integers it is at least as large as the greater absolute value. Equal inputs have an LCM equal to that value.

How does the LCM help add fractions?

The LCM of the denominators gives the least common denominator, reducing the amount by which each fraction must be expanded.

Are long results rounded?

No. Inputs up to 100 digits are processed with exact integer arithmetic.

Similar calculators

You may find the following calculators on the same topic useful:

Share on social media

If you liked it, please share the calculator on your social media platforms. It`s easy for you and beneficial for the project`s promotion. Thank you!