# Greatest Common Factor Calculator

> Find the greatest common factor (GCD, HCF) of two or more whole numbers, with every step of Euclid’s algorithm written out.

Category: Mathematics · Applies to: Worldwide · Last updated: 2026-10-29
Interactive calculator: https://calculators.geekmidst.com/calculators/greatest-common-factor-calculator

The greatest common factor is the largest whole number that divides every number in the list. Euclid’s algorithm finds it by repeated division with remainder.

Also called: GCD calculator, HCF calculator, Greatest common divisor calculator, Highest common factor calculator.

## Inputs
- Whole numbers (default 48, 180)

## Results
- Greatest common factor
- GCF as prime factors
- Coprime?

## Formula

```
gcd(a, b) = gcd(b, a mod b), repeated until the remainder is 0;  gcd(a, b, c) = gcd(gcd(a, b), c)
```

Where:
- a mod b: the remainder when a is divided by b

## Worked example
1. 180 = 3 × 48 + 36.
2. 48 = 1 × 36 + 12.
3. 36 = 3 × 12 + 0, so the last non-zero remainder, 12, is the GCF.

**Result:** 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|.

## Related calculators
- [Least Common Multiple Calculator](https://calculators.geekmidst.com/calculators/least-common-multiple-calculator)
- [Common Factor Calculator](https://calculators.geekmidst.com/calculators/common-factor-calculator)
- [Fraction Calculator](https://calculators.geekmidst.com/calculators/fraction-calculator)
- [Ratio Calculator](https://calculators.geekmidst.com/calculators/ratio-calculator)

Source: GM¹X CalcVerse — https://calculators.geekmidst.com/calculators/greatest-common-factor-calculator
