GCF calculator
Greatest common factor
How to find the GCF
When to use this calculator
How it was tested: the Euclid's algorithm implementation was verified against 25+ cases — GCF(12, 18, 24) = 6, GCF(100, 75) = 25, coprime pairs, and three-number chains.
Worked example: GCF of 48 and 180
Step 1 — Prime factorisations: 48 = 2 × 2 × 2 × 2 × 3, and 180 = 2 × 2 × 3 × 3 × 5.
Step 2 — Take the shared primes, at the lower power where they overlap: 2 × 2 × 3.
Answer: GCF(48, 180) = 2² × 3 = 12. Check: 48 ÷ 12 = 4 and 180 ÷ 12 = 15, and 4 and 15 share no further factor.
For three numbers, work in pairs: GCF(24, 36) = 12, then GCF(12, 60) = 12, so GCF(24, 36, 60) = 12. The calculator above chains this automatically for up to twelve numbers.
The Euclidean algorithm, step by step
For large numbers, listing factors is slow. The Euclidean algorithm instead divides and keeps the remainder:
- Divide the larger number by the smaller: 180 ÷ 48 = 3 remainder 36.
- Now divide the old divisor by that remainder: 48 ÷ 36 = 1 remainder 12.
- Repeat: 36 ÷ 12 = 3 remainder 0.
- The last non-zero remainder is the GCF: 12.
It works because any factor common to both numbers must also divide their remainder, so the problem shrinks at every step without losing the answer.
GCF vs LCM, and where the GCF earns its keep
The GCF and the LCM are mirror images. The GCF is the largest number that divides into both numbers — for 12 and 18 it is 6. The LCM is the smallest number that both numbers divide into — for 12 and 18 it is 36. A GCF can never be bigger than the smaller number; an LCM can never be smaller than the larger one.
Simplifying fractions is the everyday use: 48/180 divides top and bottom by the GCF of 12 to give 4/15, fully reduced in one step instead of several. Tiling works the same way in reverse: the largest square tile that fits a 180 cm × 48 cm strip with no cutting has sides of 12 cm — you would need 15 × 4 = 60 of them.