Calculate greatest common divisor

Enter two or more numbers, separated by spaces, to compute the greatest common divisor.

The greatest common divisor (GCD) of a number of integers is the greatest number that all the integers can be divided by without getting a fractional part. For example, the greatest common divisor of 6 and 9 is 3 because 3 is the greatest number that divides both 6 and 9.

The greatest common divisor can be used to simplify fractions. To reduce a fraction as much as possible the numerator and denominator can be divided by the greatest common divisor for all terms in the numerator and denominator.

a
b
 = 
a / GCD(a, b)
b / GCD(a, b)

The fraction 6 ⁄ 9 can in this way be simplified by dividing the numerator and denominator by GCD(6, 9) = 3.

6
9
 = 
6 / 3
9 / 3
 = 
2
3

This works even for fractions that contain more complicated expressions. The fraction (2x + 8y) ⁄ 4 can be simplified by dividing by GCD(2, 8, 4) = 2.

2x + 8y
4
 = 
(2x + 8y) / 2
4 / 2
 = 
x + 4y
2

Another possible use case is when doing factorizations of polynomial expressions. The expression 8x2 + 12x can be factorized using the factor 4 because GCD(8, 12) = 4.

8x2 + 12x  =  4 × 
8x2 + 12x
4
 =  4 × (2x2 + 3x)

Similar tools

Calculate the lowest common denominator for two or more fractions.