Skip to content
Everyday Tools

Greatest Common Divisor Calculator

Find the greatest common divisor (GCD) and lowest common multiple (LCM) of two whole numbers using the Euclidean algorithm.

Your results

Greatest common divisor6
Lowest common multiple144

Calculation breakdown

GCD
Euclidean algorithm: repeatedly replace the larger number with the remainder of dividing it by the smaller
LCM
|A × B| ÷ GCD(A, B)

Worked example

The GCD of 48 and 18 is 6, and the LCM is (48 × 18) ÷ 6 = 144.

Assumptions

  • Inputs are rounded to the nearest whole number.
  • If one number is zero, the GCD is the other number.

How this calculator works

This calculator finds the greatest common divisor (also called the highest common factor) of two whole numbers using the Euclidean algorithm, and also reports the lowest common multiple. It's useful for simplifying fractions or scheduling repeating events.

Frequently asked questions

What is the GCD used for?

It's used to simplify fractions to their lowest terms and to solve problems involving evenly dividing quantities.

What's the difference between GCD and LCM?

The GCD is the largest number that divides both inputs evenly, while the LCM is the smallest number that both inputs divide into evenly.

Does it work with zero?

If both numbers are zero the result is undefined and the calculator shows an error; if one number is zero, the GCD is the other number.

Related calculators

← Back to all calculators