GCD and LCM Calculator

Calculate the greatest common divisor (GCD) and least common multiple (LCM) of a list of two or more whole numbers using the Euclidean algorithm. No data is sent to a server.

Example:

How it works

a × b

What are GCD and LCM used for in practice?

The GCD is used, for example, to simplify a fraction as much as possible (divide numerator and denominator by their GCD), or to divide items into equal groups with no remainder. The LCM is useful for bringing fractions to a common denominator, or for synchronizing periodic events (for example, finding out every how many days two repeating events that occur at different intervals fall on the same day).

Does the calculation work with negative numbers?

By convention, GCD and LCM are expressed as positive values; negative numbers entered are therefore processed using their absolute value, which doesn't change the mathematical result (the GCD and LCM of -12 and 18 are the same as those of 12 and 18).

This purely arithmetic calculation runs entirely in your browser, with no data transmission.