GCD Calculator

Find the greatest common divisor of two positive whole numbers quickly and accurately with our free GCD Calculator.

Enter two numbers to find their GCD, common factors, and a clear explanation of how the result is calculated.

Calculate the GCD

Enter two positive whole numbers below.

Enter a positive whole number.
Enter a positive whole number.

What Is the Greatest Common Divisor?

The greatest common divisor (GCD) is the largest positive whole number that divides two numbers evenly without leaving a remainder.

For example, the factors of 12 are 1, 2, 3, 4, 6, and 12. The factors of 18 are 1, 2, 3, 6, and 18.

The common factors are 1, 2, and 6. The largest of these is 6, so the GCD of 12 and 18 is 6.

Example: GCD of 48 and 18

The factors of 48 include:

1, 2, 3, 4, 6, 8, 12, 16, 24, 48

The factors of 18 include:

1, 2, 3, 6, 9, 18

Their common factors are:

1, 2, 3, 6

The greatest common factor is 6.

GCD(48, 18) = 6

GCD Using the Euclidean Algorithm

The Euclidean algorithm is an efficient method for finding the GCD of two whole numbers. It repeatedly divides the larger number by the smaller number and uses the remainder for the next step.

For 48 and 18:

48 ÷ 18 = 2 remainder 12

18 ÷ 12 = 1 remainder 6

12 ÷ 6 = 2 remainder 0

When the remainder becomes 0, the last non-zero remainder is the GCD.

GCD = 6

Common GCD Examples

First Number Second Number GCD
6 9 3
8 12 4
12 18 6
15 25 5
18 24 6
20 30 10
36 48 12
48 60 12

How to Use the GCD Calculator

  1. Enter the first positive whole number.
  2. Enter the second positive whole number.
  3. Click Calculate GCD.
  4. Review the GCD and common factors.
  5. Click Reset to perform another calculation.

When Is GCD Useful?

The greatest common divisor is useful for simplifying fractions, dividing quantities into equal groups, and solving problems involving common factors.

For example, if you have 48 items and want to divide them into equal groups with 18 other items while using the largest possible equal group size, the GCD can help identify the appropriate common divisor.

GCD is also closely related to the least common multiple (LCM). For two positive integers, their GCD and LCM can be used together to describe important relationships between the numbers.

Frequently Asked Questions

What does GCD stand for?

GCD stands for Greatest Common Divisor.

What is the GCD of 12 and 18?

The GCD of 12 and 18 is 6 because 6 is the largest positive number that divides both 12 and 18 evenly.

Is GCD the same as GCF?

Yes. Greatest Common Divisor (GCD) and Greatest Common Factor (GCF) describe the same mathematical concept.

What is the GCD of two equal numbers?

When two positive numbers are equal, their GCD is that number itself. For example, the GCD of 12 and 12 is 12.

What is the difference between GCD and LCM?

The GCD is the largest positive number that divides both numbers evenly. The LCM is the smallest positive number that is a multiple of both numbers.