# GCD calculator

For example, lets find the gcd of 14 and 24.

14 has divisor set {1;2;7;14}. 24 has divisor set {1;2;3;4;6;8;12;24}. The largest number in both divisor sets is 2. So 2 is the gcd of 14 and 24.

Alternatively, you could calculate the gcd by comparing the prime factorizations of both numbers. The gcd is then the product of all prime factors of those numbers.

The most common way to find the gcd is the Euclidean algorithm. This is used by this calculator.