Skip to content
Calculator Tools
Number Theory Calculators

GCD / HCF Calculator

Find the greatest common divisor (GCD), also called the highest common factor (HCF) or GCF, with Euclidean algorithm steps.

Enter values

Separate values with commas, spaces or new lines.

Results update as you type.

Result

GCD (HCF)

12

LCM of first two
720
Step-by-stepShow
  1. 48 = 0 × 180 + 48
  2. 180 = 3 × 48 + 36
  3. 48 = 1 × 36 + 12
  4. 36 = 3 × 12 + 0
  5. GCD = 12

About the GCD / HCF Calculator

Find the greatest common divisor (GCD), also called the highest common factor (HCF) or GCF, with Euclidean algorithm steps.

Also known as: hcf calculator, greatest common divisor, highest common factor, gcf calculator, greatest common factor, gcd calculator.

How to use this calculator

  1. Enter whole numbers.
  2. The result updates instantly as you type — press Calculate (or Enter) at any time.
  3. Open “Step-by-step” to see how the answer was worked out.
  4. Use Copy result or Share to save the answer or send a link with your inputs.

Formula

Euclid: GCD(a, b) = GCD(b, a mod b), GCD(a, 0) = a

Worked example

Using the values pre-filled in the calculator above:

  • Whole numbers: 48, 180

the calculator returns:

  • GCD (HCF): 12
  • LCM of first two: 720

Working

  1. 48 = 0 × 180 + 48
  2. 180 = 3 × 48 + 36
  3. 48 = 1 × 36 + 12
  4. 36 = 3 × 12 + 0
  5. GCD = 12

Frequently asked questions

Are GCD, HCF and GCF the same thing?

Yes. Greatest common divisor, highest common factor and greatest common factor are three names for the largest whole number that divides every number in the set.

How is the GCD used with fractions?

Divide the numerator and denominator by their GCD to reduce a fraction to lowest terms, e.g. 48/180 ÷ 12 = 4/15.