CalculatorsConvertersDeveloperTextAll toolsDirectory
Submit your tool Sign in
Theme
Home/Answers/Math
How-to

How do I find the greatest common divisor of two numbers?

Short answer

The greatest common divisor (GCD) is the largest number that divides both values with no remainder, and it is found quickly with the Euclidean algorithm. The browser-based GCD and LCM calculator returns the GCD of two or more integers instantly, computed locally with nothing uploaded.

What the GCD is

The greatest common divisor of two integers is the biggest whole number that divides both of them exactly, leaving no remainder. The GCD of 12 and 18 is 6, because 6 divides both and nothing larger does. It is also called the greatest common factor. The GCD is what you use to reduce a fraction to lowest terms, by dividing the numerator and denominator by it.

The Euclidean algorithm

The fast way to find the GCD is the Euclidean algorithm: repeatedly replace the larger number with the remainder of dividing it by the smaller, until the remainder is zero; the last nonzero value is the GCD. The calculator applies this for you and handles more than two numbers at once, running entirely in your browser.

Step by step

  1. Open the calculator. Open the GCD and LCM calculator in your browser.
  2. Enter your integers. Type two or more whole numbers.
  3. Read the GCD. The greatest common divisor is shown instantly.

Frequently asked questions

Is the GCD the same as the greatest common factor?

Yes. Greatest common divisor and greatest common factor are two names for the same thing.

Can I find the GCD of more than two numbers?

Yes. The calculator accepts several integers at once and returns their overall GCD.

Is anything uploaded?

No. The calculation runs in your browser and your numbers are never sent anywhere.

Related answers