Math July 13, 2026 · 8 Min Read

Greatest Common Divisor Calculator – Guide & Formulas

Find the greatest common divisor (GCD) or highest common factor (HCF) for two or more numbers. Features Euclidean steps and prime factorizations.

Identify the greatest common divisor (GCD) of a set of numbers. Employs the highly efficient Euclidean Algorithm and displays prime factorization comparisons.

Key Takeaway

Use the free Greatest Common Divisor Calculator to find the greatest common divisor (gcd) or highest common factor (hcf) for two or more numbers. features euclidean steps and prime factorizations. Get instant results with step-by-step explanations.

How to Use the Greatest Common Divisor Calculator

  1. Enter two or more positive integers separated by commas or spaces.
  2. Check the computed GCD/HCF, alongside step-by-step modular division lines.
  3. Examine the prime factor tree intersection.

The Formula

gcd(a, b) = gcd(b, a % b)

Variable Definitions

  • gcd(a, b): Greatest common integer divisor of a and b
  • a mod b: The integer remainder of a divided by b

Finding GCD of 48 and 180

Calculate the highest common divisor for numbers 48 and 180.

  1. Step 1: Divide larger number by smaller: 180 = 48 * 3 + 36 (remainder 36).
  2. Step 2: Repeat with 48 and remainder 36: 48 = 36 * 1 + 12 (remainder 12).
  3. Step 3: Repeat with 36 and remainder 12: 36 = 12 * 3 + 0 (remainder 0).
  4. Step 4: The last non-zero remainder is 12. Therefore, GCD(48, 180) = 12.

Frequently Asked Questions

Is HCF different from GCD?

No. Highest Common Factor (HCF) and Greatest Common Divisor (GCD) are different names for the exact same mathematical concept.

What does it mean if the GCD of two numbers is 1?

It means the numbers are "coprime" or "relatively prime," sharing no common prime factors (e.g., 8 and 15).

How many numbers can I calculate at once?

You can input as many numbers as you like. The calculator will iteratively apply the GCD algorithm across all of them.