GCD

Calculates the largest positive integer that divides each of the given integers without a remainder.

Parameter List

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

The first integer. For example: 12, A1, or any numeric value.

[optional] number2, ...

Additional integers to find the GCD for. You can specify up to 255 numbers. For example: 18, 24, B1:B5.

More details

GCD accepts multiple integers and finds the largest number that divides all of them evenly. All arguments are converted to integers by removing decimal portions. Negative numbers are treated as their absolute values. If any argument is 0, GCD returns the absolute value of the largest non-zero argument. If all arguments are 0, GCD returns 0.

Examples

GCD() returns 1