GCD and LCM Calculator

Find the greatest common divisor and least common multiple of numbers.

The largest shared factor and smallest shared multiple

The greatest common divisor is the largest number that divides into a set of numbers evenly, and the least common multiple is the smallest number they all divide into. This finds both for the numbers you enter, the two quantities that come up constantly when working with fractions and ratios.

Enter your numbers to find the GCD and LCM.

Where they're actually used

These are not just textbook exercises. The greatest common divisor is exactly what you use to simplify a fraction to its lowest terms — divide the top and bottom by their GCD. The least common multiple is what you need to add fractions with different denominators, since you must first put them over a common denominator, and the LCM gives the smallest one. They also appear in real scheduling problems: if two events repeat on different cycles, the LCM tells you when they next coincide. Understanding both turns a lot of fraction and timing problems from fiddly into straightforward.

Common questions

What is the difference between GCD and LCM?

The GCD is the largest number that divides all your numbers evenly; the LCM is the smallest number they all divide into.

Where are they used?

The GCD simplifies fractions to lowest terms; the LCM finds a common denominator to add fractions, and tells you when repeating cycles coincide.

Is anything uploaded?

No. The calculation happens in your browser.

More Math tools