GCD Calculator

Find the Greatest Common Divisor (GCD), also known as the Highest Common Factor (HCF), of two or more whole numbers.

Enter at least two whole numbers. Separate them using commas, spaces, semicolons or new lines.

Result

GCD / HCF -
Numbers -
Number of Values -

Euclidean Algorithm Steps

What is GCD?

The Greatest Common Divisor is the largest positive whole number that divides all the given numbers without leaving a remainder.

Example:

Factors of 24: 1, 2, 3, 4, 6, 8, 12, 24

Factors of 36: 1, 2, 3, 4, 6, 9, 12, 18, 36

GCD(24, 36) = 12

Euclidean Algorithm

Instead of listing every factor, the calculator uses the Euclidean algorithm. It repeatedly divides and uses the remainder until the remainder becomes zero.

36 = 24 x 1 + 12

24 = 12 x 2 + 0

Therefore: GCD = 12

If the GCD of a set of numbers is 1, those numbers are collectively coprime.

Back to Vedicaly