How to use this calculator
- Enter or choose whole numbers.
- The greatest common factor updates as you type. Use Copy result or Share to keep it.
Method
gcd(a, b) = gcd(b, a mod b), repeated until the remainder is 0; gcd(a, b, c) = gcd(gcd(a, b), c)
- a mod b
- the remainder when a is divided by b
Worked example
- 180 = 3 × 48 + 36.
- 48 = 1 × 36 + 12.
- 36 = 3 × 12 + 0, so the last non-zero remainder, 12, is the GCF.
The greatest common factor of 48 and 180 is 12.
What the result means
Divide the numerator and denominator of a fraction by their GCF to reduce it in one step: 48/180 = 4/15. A GCF of 1 means the numbers are coprime.
Assumptions and limits
- Whole numbers between −10¹⁵ and 10¹⁵; signs are ignored.
Questions
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 is the GCF of 0 and a number?
Every number divides 0, so gcd(0, n) = |n|.