Lcm Two Numbers
Calculator

Inputs

Least common multiple
12

Results

Least common multiple
12
Greatest common divisor
2

Results

Least common multiple12
Greatest common divisor2

formula-map diagram

Least common multiple
12
Greatest common divisor
2

Formula map

Formula

lcm(a, b) = |a × b| ÷ gcd(a, b)

= 12

Note

Simplified model: these are exact results of the stated idealised formulas, assuming perfect shapes and exact inputs. Real measurements carry error, and the ellipse perimeter is a Ramanujan approximation. Verify independently before relying on these figures.

Example: with the default inputs, calculator.mathematics.lcm_result is 12.

More in Mathematics

See all →

Frequently asked questions

What is the least common multiple (LCM)?+

The LCM of two numbers is the smallest positive whole number that both divide evenly. For 4 and 6, it is 12.

What formula does this calculator use?+

It uses lcm(a, b) = |a × b| ÷ gcd(a, b), where the GCD comes from the Euclidean algorithm. The GCD is shown alongside the LCM.

What if I enter decimals?+

Inputs are rounded to the nearest whole number before the calculation, since multiples and divisors are defined for integers.

What is the LCM when one number is 0?+

If both numbers are 0 the calculator returns 0. Otherwise the formula is applied to the rounded values, and a 0 input gives an LCM of 0.

When do I need an LCM?+

A typical use is finding a common denominator when adding fractions, or the first time two repeating cycles line up, such as events every 4 and every 6 days.