GCD

Using the Excel GCD Function

Summary

The GCD function returns the greatest common divisor of two or more integers. The greatest common divisor (GCD) is defined as the largest integer that will go into all of the provided numbers and not return a remainder. The GCD function will throw an error if any of the numbers provided are negative.

Syntax

=GCD (number1, [number2], ...)

Syntax Breakdown

number1
The number1 argument is required and is the number for which you want to find the GCD.

[number2]
The number2 and any subsequent arguments are optional. The GCD function can handle up to 255 values. Any non-integer numbers will be truncated.


Usage Notes

The GCD function returns the greatest common divisor, or the largest positive integer that divides the numbers without a remainder, of two or more integers. The function is able to accept up to 255 numbers as arguments.

GCD Errors
If any argument is non-numeric the function will return the #VALUE! error.

Excel GCD VALUE Error

If any argument is less than zero the function will return the #NUM! error.

Excel GCD NUM Error