Euclidean algorithm steps
Watch gcd(a,b) reduce to gcd(b, a mod b) line by line until the remainder hits zero.
Find the Greatest Common Divisor (GCD) — also known as the GCF or HCF — of two or more whole numbers. See the full Euclidean-algorithm working, a prime-factor Venn diagram, and an AI explanation of the logic.
The Greatest Common Divisor (GCD) of two or more integers is the largest whole number that divides all of them exactly. For example, the GCD of 48 and 36 is 12. It is identical to the Greatest Common Factor (GCF) and Highest Common Factor (HCF) — if you prefer a tool built around that name, the dedicated GCF calculator shows the same answer with factor-pair working. The fastest method is the Euclidean algorithm: gcd(a, b) = gcd(b, a mod b).
Built for homework, fraction simplification and engineering — with transparent working you can learn from.
Watch gcd(a,b) reduce to gcd(b, a mod b) line by line until the remainder hits zero.
Cross-checks the answer by multiplying the shared prime powers — perfect for exams.
One tool covers every name your textbook uses, plus the related LCM for context.
Type two or more whole numbers, e.g. 48, 36.
The Euclidean algorithm and prime factors compute the answer instantly.
Get the GCD, the related LCM, a Venn diagram and a plain-English AI explanation.
Tap any row to load it into the calculator.
There are three reliable ways to find the GCD, and this calculator uses all of them so you can pick the method your class prefers.
Replace the larger number with the remainder of dividing it by the smaller, and repeat until the remainder is 0. The last non-zero value is the GCD. For example: gcd(48, 36) → gcd(36, 12) → gcd(12, 0) = 12.
Break each number into primes and multiply the lowest power of every shared prime. For 48 = 2⁴×3 and 36 = 2²×3², the shared primes give 2²×3 = 12.
Write out every factor of each number and pick the largest common one. This is intuitive for small numbers but slow for large ones.
GCD and LCM are linked by the identity GCD(a, b) × LCM(a, b) = a × b, so once you know one, the other is easy.
Yes. The Greatest Common Divisor (GCD), Greatest Common Factor (GCF) and Highest Common Factor (HCF) are three names for exactly the same thing — the largest whole number that divides all the inputs.
The fastest way is the Euclidean algorithm: replace the larger number with the remainder when it is divided by the smaller, and repeat until the remainder is 0. The last non-zero number is the GCD.
If two numbers share no common factors (they are coprime), their GCD is 1. For example, gcd(17, 19) = 1.
Yes. Enter any list such as 24, 60, 36 — the calculator folds the GCD across the whole set, because gcd(a, b, c) = gcd(gcd(a, b), c).
They satisfy GCD(a, b) × LCM(a, b) = a × b. The calculator shows both so you can see the relationship.
Least common multiple with 4 methods.
Open toolBreak a number into prime factors.
Open toolList every divisor & factor pair.
Open toolIs a number prime or composite?.
Open toolReduce fractions to lowest terms.
Open tool