Skip to content

GCF Calculator (Greatest Common Factor)

Enter two or more whole numbers to find the largest number that divides all of them. The steps are shown for two numbers.

Result

Greatest common factor (GCF)
12
Prime factorizations
48 = 2⁴ × 3
180 = 2² × 3² × 5
Euclidean algorithm
180 = 3 × 48 + 36
48 = 1 × 36 + 12
36 = 3 × 12 + 0
Least common multiple (LCM)
720
Numbers entered
2

Formula

  • Euclidean algorithm: gcf(a, b) = gcf(b, a mod b), until the remainder is 0
  • lcm(a, b) = |a × b| ÷ gcf(a, b)
  • GCF uses the lowest power of each shared prime, LCM uses the highest power of every prime

How the GCF Calculator works

The greatest common factor, also called the greatest common divisor or highest common factor, is the largest whole number that divides every number in a set without a remainder.

The Euclidean algorithm finds it quickly. Divide the larger number by the smaller, then replace the larger with the smaller and the smaller with the remainder. Repeat until the remainder is zero. The last non-zero remainder is the answer.

Worked example

For 48 and 180: 180 = 3 × 48 + 36, then 48 = 1 × 36 + 12, then 36 = 3 × 12 + 0. The GCF is 12. By primes, 48 = 2⁴ × 3 and 180 = 2² × 3² × 5, which share 2² × 3 = 12.

Frequently asked questions

Is GCF the same as GCD?

Yes. Greatest common factor, greatest common divisor and highest common factor are three names for the same number.

What is the GCF used for?

Mainly for simplifying fractions and ratios. Dividing the numerator and denominator by their GCF gives the fraction in lowest terms.

Related calculators

All math and statistics calculators · All calculators

Related unit converters

Calculations run in your browser and nothing you enter is sent to a server. Results are provided for general information. Check critical figures independently before relying on them.

☕ Like this tool?

Buy me a coffee to support development

☕ Support UnitGenie

If this tool has been helpful, consider buying me a coffee to support development and keep it free for everyone!