Greatest Common Factor Calculator
Find the greatest common factor of two or more numbers using prime factorization. Shows all factors and step-by-step working. Essential for simplifying fractions.
Enter your values above to see the results.
Tips & Notes
- ✓GCF(a, a) = a and GCF(a, 1) = 1 always. If numbers share no prime factors, GCF = 1 (coprime).
- ✓For three numbers: GCF(a,b,c) = GCF(GCF(a,b), c). Apply pairwise then combine.
- ✓If the smaller number divides the larger evenly, GCF = smaller. GCF(6,18) = 6 since 18÷6=3.
- ✓Use GCF to simplify fractions in one step: 72/96 → GCF=24 → 3/4 directly.
- ✓Find LCM quickly from GCF: LCM(a,b) = (a×b)/GCF(a,b). LCM(12,18) = 216/6 = 36.
Common Mistakes
- ✗Confusing GCF with LCM. GCF(4,6)=2 (largest common divisor). LCM(4,6)=12 (smallest common multiple).
- ✗Taking minimum exponents of non-shared primes. GCF uses minimum exponents of SHARED primes only.
- ✗Stopping Euclidean algorithm too early. GCF(48,18): first step gives 12, but GCF is not 12 yet — continue.
- ✗Using subtraction instead of mod in Euclidean algorithm — use remainder after division, not subtraction.
- ✗For three numbers, applying GCF to only two then stopping — must include all numbers.
Greatest Common Factor Calculator Overview
The Greatest Common Factor (GCF) — also called the Greatest Common Divisor (GCD) — is the largest positive integer that divides evenly into two or more numbers with no remainder. The GCF reveals the deepest common divisibility shared by numbers, serving as the foundation for simplifying fractions, reducing ratios, solving tiling and packing problems, and generating the LCM. Every common factor of two numbers divides their GCF, making GCF the master key to the entire set of common divisors.
Euclidean Algorithm — the fastest method for any size numbers:
GCF(a, b) = GCF(b, a mod b) — repeat until remainder = 0, final nonzero remainder is the GCF
EX: GCF(48, 18) → 48 mod 18=12 → GCF(18,12) → 18 mod 12=6 → GCF(12,6) → 12 mod 6=0 → GCF = 6
EX: GCF(252, 105) → 252 mod 105=42 → GCF(105,42) → 105 mod 42=21 → GCF(42,21) → 42 mod 21=0 → GCF=21Prime Factorization method — take minimum power of each shared prime:
EX: GCF(48,36) → 48=2⁴×3, 36=2²×3² → shared primes: 2 (min power 2), 3 (min power 1) → GCF=2²×3=12Fraction simplification using GCF:
EX: 84/126 → GCF(84,126)=42 → 84÷42=2, 126÷42=3 → simplified: 2/3 in one stepGCF and LCM relationship: GCF(a,b) × LCM(a,b) = a × b always. Use this to find LCM in one step once GCF is known:
EX: GCF(12,18)=6, so LCM=12×18/6=36 | verify: GCF(12,18)×LCM(12,18) = 6×36 = 216 = 12×18 ✓The GCF satisfies two useful identities: GCF(a, 1) = 1 for any a, and GCF(a, a) = a. If GCF(a, b) = 1, the numbers are coprime — they share no common factor, which means their LCM equals their product. Coprime pairs appear frequently in fraction arithmetic: when a numerator and denominator are coprime, the fraction is already in its simplest form without any reduction needed. The Euclidean algorithm, developed around 300 BCE, remains one of the most efficient algorithms ever devised — its worst-case performance grows only logarithmically with input size. The GCF has a geometric interpretation that makes tiling problems immediate: the largest square tile that fits exactly into a p × q rectangle without any cuts is a square with side length GCF(p, q).