esc
Calculators

GCF calculator:
greatest common factor (GCD, HCF)

Type the numbers and get their greatest common factor, worked out with the Euclidean algorithm row by row, plus each number’s prime factors and the least common multiple.

Two or more whole numbers, separated by commas or spaces.
GCF of 84, 12642also called GCD or HCF
84
2² × 3 × 7
126
2 × 3² × 7
Shared primes (lowest powers)
2 × 3 × 7
Least common multiple (LCM)
252
Euclidean algorithm: divide, keep the remainder, repeat until it is 0
StepDivisorRemainder
126 = 1 × 84 + 428442
84 = 2 × 42 + 0420

How to use GCF calculator

  1. 01Type the numbersTwo or more.
  2. 02Read the GCFAlso called GCD or HCF.
  3. 03Follow the stepsEuclidean algorithm table.
File character arranging marked pages

Divide, keep the remainder, repeat.

The Euclidean algorithm finds the GCF without listing factors: divide the larger number by the smaller, replace the larger with the remainder, and repeat until the remainder is 0. The last divisor is the GCF. For 126 and 84: 126 = 1 × 84 + 42, then 84 = 2 × 42 + 0, so the GCF is 42. With three or more numbers it is applied to each in turn.

At a glance

Price
Free. No sign-up, no watermark.
Privacy
Your text stays in your browser. Nothing is uploaded.
Works in
Chrome, Edge, Firefox and Safari, on phones and computers

Questions

What is the GCF of 84 and 126?

42. In primes, 84 = 2² × 3 × 7 and 126 = 2 × 3² × 7; the shared part is 2 × 3 × 7 = 42.

Are GCF, GCD and HCF the same?

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

What does it mean when the GCF is 1?

The numbers are coprime: they share no factor except 1, like 8 and 15. A fraction made from them, 8/15, is already in lowest terms.

Is what I type sent anywhere?

No. The calculation runs in your browser and nothing you type leaves your device.