GCD Calculator

Enter two or more positive integers to get their greatest common divisor. Results use the Euclidean algorithm and show each step so you see how the answer is found.

At least two positive integers.
Try:
Your result will appear here

Enter two or more numbers and click Find GCD.

Why the Euclidean algorithm

GCD(a, b) is the largest positive integer that divides both a and b. The algorithm repeatedly replaces (a, b) with (b, a mod b) until b is 0; then a is the GCD. No prime factorization needed, so it stays fast for large numbers.

Where you will use GCD