gcd calculator


Fill the calculator form and click on Calculate button to get result here
Gcd: --
The common multiples are: --
TThe greatest common divisor is: --

Get gcd calculator For Your Website

Get Now

GCD or GCF calculator is used to calculate the greatest common divisor between two or more numbers. GCD stands for greatest common divisor, and as the name suggests, it is a method to list out all the common divisors of different numbers. In this post, we will discuss what GCD is, how to find GCD by factorization and prime factorization.

What is the Greatest Common Divisor?

The greatest common divisor of whole numbers (GCD or GCF) is the biggest positive integer that is evenly divided into all zero remainders. For the number set 12, 18 and 28, the GCD will be 2.

Need to calculate the LCM? You can use our LCM calculator anytime.

How to Find the Greatest Common Divisor (GCD)?

There are different ways to find the GCD. The best method to use depends on the scale of numbers (i.e. how big they are), what will you do with the outcome and the numbers you have to get the greatest common divisor. Most common methods to find the greatest common divisor are:

Method 1 - Factoring

List all factors of each number in order to find the GCD by factoring method. A number is considered as a factor of another number if it completely divides that number and remainder is zero after division. After getting a list of all factors of a number, the largest one will be considered as the greatest common divisor GCD.

Example: Find the GCD of 20 and 30 by factoring method

Follow these steps to find the GCD of any numbers by factoring method.

Step 1: Find the factors of the first number.

The factors of 20 are \(1, 2, 4, 5, 10, and 20\).

Step 2: Find out the factors of the 2nd number.

The factors of 30 are \(1, 2, 3, 5, 6, 10, 15, and 30\).

Step 3: List out all common factors or divisors.

The common divisors of the numbers 20 and 30 are \(1, 2, 5, and 10\).

Step 4: The biggest number will be GCD.

The greatest common divisor of 20 and 30 is 10.

Method 2 - Prime Factorization

List out all the prime factors of each number to find out the GCD by prime factorization. Then you have to list out all the common prime factors on these numbers. Include the most frequently occurred instances of each primary factor that are common in all numbers. To get the GCD, multiply these numbers.

You can see that the prime factorization approach is simpler than direct factoring when the numbers are greater.

Example: Let’s find the greatest common divisor \((12, 18, 27)\)

Step 1: Find prime factors of all numbers.

The prime factors of 12 is \(2 \times 2 \times 3 = 16\).

The prime factors of 18 is \(2 \times 3 \times 3 = 18\).

The prime factors of 27 is \(3 \times 3 \times 3 = 27\).

Step 2: Find out the most common occurrences.

The instances of common prime factors of \(16, 18 and 27 are 3\) in all numbers.

So the greatest common divisor of \(16, 18 and 27 is 3\).

What is the Greatest Common Divisor of 0?

Non-zero whole numbers 0 are equal to 0, so each non-zero whole number is a factor of 0.

\(n x 0 = 0\) so, \(\dfrac{0}{n} = 0\) for any whole number n.

If \(2 x 0 = 0\), it means \(\dfrac{0}{2} = 0. 2\) and 0 are factors of 0 in this example.

We can say that \(GCD (2, 0) = 2\) and in general \(GCD (2, 0) = n\) for any whole number n.

However, the greatest common divisor of 0 is undefined.

Other Languages
Not Available for gcd calculator