CalcChef
Search tools (e.g. 'calc', 'converter')... (Press '/' or 'Cmd+K')

LCM GCD Calculator

Find the Least Common Multiple (LCM) and Greatest Common Divisor (GCD) of 2 to 10 integers. Shows the Euclidean algorithm and prime factorization step by step.

Loading Tool...

Applications

Used by students verifying homework for the Euclidean algorithm, by engineers sizing gear teeth and pulley ratios in mechanical systems, by bakers scaling recipes by the LCM of batch sizes, and by musicians aligning polyrhythms from note durations.

The Formulas

GCD is found with the Euclidean algorithm, which repeatedly replaces the larger number with the remainder until the remainder is zero. LCM is computed via the identity LCM(a, b) = |a × b| / GCD(a, b), or by taking the maximum prime exponent from each input's prime factorization. BigInt is used throughout to keep results exact for very large inputs.

Fun Fact: The Euclidean algorithm is one of the oldest algorithms still in common use — it was described by Euclid in his Elements around 300 BCE, more than 2,300 years ago.

Related Tools

View all tools