Math Tools
GCD Calculator
Find the greatest common divisor of a list of integers using the Euclidean algorithm.
Enter integers separated by commas. Zero values are ignored.
GCD
6
Math Tools
Find the greatest common divisor of a list of integers using the Euclidean algorithm.
Enter integers separated by commas. Zero values are ignored.
GCD
6
The Greatest Common Divisor (GCD), also called the Highest Common Factor (HCF), is the largest positive integer that divides evenly into two or more numbers without a remainder. For example, the GCD of 48 and 18 is 6, because 6 is the largest number that goes into both 48 and 18 with no remainder left over.
The calculator uses the Euclidean algorithm, a fast and reliable method that repeatedly divides the larger number by the smaller number and replaces the larger number with the remainder, continuing until the remainder is zero. At that point, the last non-zero remainder is your GCD. For multiple numbers, the algorithm finds the GCD of the first two, then uses that result with the third number, and so on.
GCD(a, b) = GCD(b, a mod b), repeated until remainder = 0The formula says: to find the GCD of two numbers a and b, divide a by b and take the remainder. Then repeat with b and the remainder. Continue until the remainder is zero; the last non-zero value is the GCD.
| Input | Result | Notes |
|---|---|---|
| 48 and 18 | GCD = 6 | 6 is the largest number dividing both evenly (48 ÷ 6 = 8, 18 ÷ 6 = 3) |
| 100 and 75 | GCD = 25 | Simplify the ratio 100:75 to 4:3 by dividing both by 25 |
| 56, 84, and 140 | GCD = 28 | 28 divides all three numbers; use for splitting items equally across groups |
GCD (Greatest Common Divisor) is the largest number that divides evenly into both inputs. LCM (Least Common Multiple) is the smallest number that both inputs divide into evenly. For example, GCD(12, 18) = 6, but LCM(12, 18) = 36.
Yes. Find the GCD of the first two numbers, then find the GCD of that result with the third number, and repeat. Most online calculators handle this in one step.
The Euclidean algorithm still works efficiently. For example, GCD(1000000, 7) = 1 (they share no common factors). Size doesn't slow it down.
Common uses include simplifying recipes, dividing groups fairly, tiling a floor with equal-sized pieces, and reducing fractions in school math.
No. The GCD can never exceed the smallest of the numbers you're dividing. It always divides evenly into both, so it must fit inside both.
If both numbers are identical, the GCD is that number itself. For example, GCD(25, 25) = 25.