GCD / HCF Calculator
Find the greatest common divisor (highest common factor) of any numbers instantly. Enter your values to get the GCD, LCM, and the Euclidean steps shown.
Updated 2026-06-14 · Free · No sign-up · Runs privately in your browser
Show the Euclidean steps
How the GCD / HCF Calculator Works
The greatest common divisor (GCD) — also known as the highest common factor (HCF) — is the largest whole number that divides every one of your numbers exactly. This calculator accepts two or more positive whole numbers and returns the GCD plus the LCM for reference.
The Method
The tool uses the Euclidean algorithm, the classic and efficient way to find a GCD:
GCD(a, b) = GCD(b, a mod b), repeated until the remainder is 0.
You divide the larger number by the smaller, keep the remainder, then repeat with the smaller number and that remainder. When the remainder reaches 0, the last divisor is the GCD. For more than two numbers, the algorithm is applied pairwise across the list.
Worked Example
Find the GCD of 48 and 36:
| Step | a | b | a mod b |
|---|---|---|---|
| 1 | 48 | 36 | 12 |
| 2 | 36 | 12 | 0 |
When the remainder hits 0, the last divisor (12) is the answer. So the GCD of 48 and 36 is 12. Extending to a third number such as 60: GCD(12, 60) is still 12.
Why the GCD Matters
The GCD is one of the most useful tools in arithmetic:
- Simplifying fractions — divide the numerator and denominator by their GCD to reach lowest terms.
- Equal grouping — split items into the largest possible equal-sized groups.
- Ratios — reduce a ratio to its simplest form using the GCD.
Because the GCD and LCM are linked, this tool shows both so you can move between them easily.
Frequently asked questions
What is the greatest common divisor?+
The GCD, also called the highest common factor (HCF), is the largest whole number that divides two or more numbers evenly. For 48 and 36 it is 12.
Is GCD the same as HCF?+
Yes. Greatest common divisor (GCD) and highest common factor (HCF) are two names for exactly the same thing: the biggest number that divides all the inputs.
How do you find the GCD of two numbers?+
Use the Euclidean algorithm: divide the larger by the smaller, replace the larger with the remainder, and repeat until the remainder is 0. The last non-zero divisor is the GCD.
What is the GCD of 48 and 36?+
The GCD of 48 and 36 is 12, since 12 is the largest number that divides both 48 and 36 without a remainder.
What is the GCD used for?+
The GCD is used to simplify fractions to lowest terms, split quantities into equal groups, and solve number-theory and cryptography problems.