Calculators

GCD and HCF Calculator

Find the greatest common divisor (GCD), also called the highest common factor (HCF), of two or more numbers.

GCD (HCF)—
LCM of the same numbers
—

What is the GCD and HCF Calculator?

Find the greatest common divisor (GCD), also called the highest common factor (HCF), of two or more numbers.

Enter whole numbers, separated by commas and the GCD and HCF Calculator returns GCD (HCF) and LCM of the same numbers. Results update as you type, and nothing you enter leaves your device.

How it is calculated

Euclid's algorithm: GCD(a, b) = GCD(b, a mod b) until the remainder is 0

How to use it

  1. Enter whole numbers, separated by commas.
  2. Read GCD (HCF) in the results panel. It updates as you type.
  3. Change any value to compare scenarios, or use Share to send the result as a link.

Common questions

What formula does the GCD and HCF Calculator use?

It uses: Euclid's algorithm: GCD(a, b) = GCD(b, a mod b) until the remainder is 0.

What do I need to use the GCD and HCF Calculator?

You need whole numbers, separated by commas. Sensible starting values are filled in so you can see how it works straight away.

Is the GCD and HCF Calculator free, and is my data stored?

It is free with no sign-up. The calculation runs in your browser, so the values you enter are not sent to or stored on our server.

Your calculations