Small tools. Clear answers.
ƒ MATH Ready to calculate

Greatest Common Factor Calculator

Find the largest positive integer that divides every number in a set.

Let’s work it out

06 / 15

Enter two or more positive integers.

◈ Calculated in your browser. Your inputs stay here.
EXAMPLE RESULT
—

Calculate to see your answer.

01

How to use this calculator

  1. Enter two or more whole numbers.
  2. Compare their factors or apply the Euclidean algorithm.
  3. Use the GCF to simplify fractions or divide quantities into equal groups.
02

A little understanding goes a long way.

The greatest common factor, also called GCD or HCF, is the largest positive integer shared by the factor lists. The Euclidean algorithm repeatedly replaces a pair with the smaller number and the remainder.

THE FORMULA gcd(a, b) = gcd(b, a mod b)
TRY IT ON PAPER

A worked example

The common factors of 18 and 24 are 1, 2, 3 and 6. Their greatest common factor is 6.

03

A few common questions

Is GCF the same as GCD?

Yes. Greatest common factor, greatest common divisor and highest common factor describe the same quantity.

What about zero?

The GCF of a nonzero integer and zero is the absolute value of the nonzero integer. The all-zero case requires an explicit convention.

ONE LESS THING TO WORK OUT

There’s a tool for that.

Explore all calculators ↗