GCD / HCF Calculator
Greatest Common Divisor ⚡
Find the Greatest Common Divisor (GCD) — also called the Highest Common Factor (HCF) — of two or more numbers instantly, with full Euclidean algorithm working shown.
Find the Greatest Common Divisor (GCD) — also called the Highest Common Factor (HCF) — of two or more numbers instantly, with full Euclidean algorithm working shown.
The Greatest Common Divisor (GCD) — called the Highest Common Factor (HCF) in the UK — is the largest positive integer that divides two or more numbers without leaving a remainder.
For example, the GCD of 48 and 36 is 12, because 12 is the largest number that divides both evenly. The factors of 48 are 1, 2, 3, 4, 6, 8, 12, 16, 24, 48 and the factors of 36 are 1, 2, 3, 4, 6, 9, 12, 18, 36. The largest number in both lists is 12.
The most efficient method for finding GCD is the Euclidean algorithm, which works by repeatedly replacing the larger number with the remainder when the larger is divided by the smaller, until the remainder is zero. The last non-zero remainder is the GCD.
Example: GCD(48, 36)
48 = 36 × 1 + 12
36 = 12 × 3 + 0
GCD = 12
What is the difference between GCD and HCF?
They are the same thing. GCD (Greatest Common Divisor) is the term most commonly used in mathematics and computing. HCF (Highest Common Factor) is the equivalent term used in UK school mathematics (GCSE and A-level).
What is the GCD of any number and 1?
Always 1, since 1 divides every integer. Two numbers whose GCD is 1 are called coprime or relatively prime — they share no common factors other than 1.
How do I simplify a fraction using GCD?
Divide both the numerator and denominator by their GCD. For example, 48/36 — GCD is 12, so 48÷12 = 4 and 36÷12 = 3, giving 4/3 in its simplest form.
What is the GCD of a number and itself?
The number itself. GCD(n, n) = n for any positive integer n.
Can I find the GCD of more than two numbers?
Yes. This calculator supports up to three numbers. For more, apply GCD repeatedly: GCD(a, b, c) = GCD(GCD(a, b), c). The order does not matter.