GCD/HCF Calculation


GCD
The greatest common divisor, sometimes also called the highest common divisor of two positive integers a and b is the largest divisor common to a and b.
For example, GCD(3,5)=1, GCD(12,60)=12, and GCD(12,90)=6. The GCD of 54 and 24 is,

Thus the divisors of 54 are:

1, 2, 3, 6, 9, 18, 27, 54.

Similarly the divisors of 24 are:

1, 2, 3, 4, 6, 8, 12, 24.

The numbers that these two lists share in common are the common divisors of 54 and 24:

1, 2, 3, 6.

The greatest of these is 6. That is the greatest common divisor of 54 and 24.
gcd(54,24) = 6.

Number of Values: