CalcGallery

Greatest Common Factor Calculator

Find the largest whole number that divides two integers exactly.

Built by AbhiLast reviewed September 19, 2026

Shared factorGCF(84, 126)= 42

Your numbers

Result

Greatest common factor: 42 factor

Both inputs divide evenly by the reported factor.

First number divided by GCF
2
Second number divided by GCF
3
Coprime
No
Report a problem with this calculator
Your entries are kept on this device only.

Results follow the mathematical operation and values shown. Check that you selected the intended operation, convention and dataset type before relying on the result. Read the full disclaimer

How to use the Greatest Common Factor Calculator

  1. Enter two positive whole numbers.
  2. Read the largest factor shared by both numbers.
  3. Use the quotients to confirm that both divisions are exact.

The largest shared exact divisor

The Euclidean algorithm avoids listing every factor. Repeated division with remainders ends at the greatest common factor:

while b is not zero: (a, b) = (b, a mod b)gcf = a

The displayed quotients show how many GCF-sized units fit in each input. A GCF of one means the numbers share no larger positive factor.

See OpenStax greatest common factor.

With your numbers

  1. Apply the Euclidean remainder steps to 84 and 126.
  2. The last non-zero divisor is 42.

Quick reference

Both inputs divide evenly by the reported factor.

Common math examples, worked out with this calculator's starting values.
ExampleGreatest common factor
84 and 12642
24 and 3612
17 and 291
48 and 18012
100 and 2525
7 and 77

Common questions about the Greatest Common Factor Calculator

What is a greatest common factor?
It is the largest positive whole number that divides every entered number without a remainder.
Is GCF the same as GCD?
Yes. Greatest common factor and greatest common divisor name the same quantity.
What does coprime mean?
Two numbers are coprime when their greatest common factor is 1.
How is the GCF calculated?
The Euclidean algorithm repeatedly replaces a pair by the smaller number and the remainder until the remainder is zero.

Report a problem with this calculator