GCD calculator

First number:
Second number:

The greatest common divisor (gcd)

What is the gcd of two numbers?

The gcd of two numbers is the largest number dividing both numbers.

How to find the gcd?

There are many ways. The simplest one is to compare the divisor sets and find the greatest number dividing both numbers.
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.

Calculate the gcd

Mathepower can calculate the gcd. Just enter your number and it will be calculated.