GCF Calculator

Enter two or more whole numbers to find their greatest common factor. The least common multiple is shown as well.

Two or more whole numbers above 0, separated by commas, spaces or semicolons, for example 12, 18, 24.

This result is an estimate only. Double-check important figures before relying on them.

How it is calculated

  • For two numbers, the Euclidean method: GCF(a, b) = GCF(b, a mod b), repeating until the remainder is 0
  • For more numbers, take the GCF of the first two, then of that result and the next number, and so on
  • LCM(a, b) = a ÷ GCF(a, b) × b

To find the multiple instead, use the LCM calculator. For other number work, use the scientific calculator.

Worked example

The numbers 12, 18 and 24:

  • GCF(12, 18): 18 mod 12 = 6, 12 mod 6 = 0, so the GCF is 6
  • GCF(6, 24): 24 mod 6 = 0, so the GCF is 6
  • The least common multiple is 72

Why your number may differ

The calculator accepts whole numbers from 1 up to one trillion, and at most 20 numbers. Negative numbers and decimals are not used.

Frequently asked questions

What is the greatest common factor?

It is the largest whole number that divides every number in the list without a remainder. It is also called the greatest common divisor (GCD) or highest common factor (HCF).

How do I find the GCF?

The Euclidean method repeatedly replaces the larger number by the remainder of dividing it by the smaller one until the remainder is 0. The last non-zero number is the GCF.

What is it used for?

Simplifying fractions and ratios, splitting things into equal groups, and tiling or cutting problems.