GCD()

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

Definition. This function returns the greatest common divisor of two or more integers.

Arguments

  • number1 (required) and number2 (optional) The minimum number of values is 1, and the maximum is 255 (29 in Excel 2003 and earlier versions). At least one value is required, but a second value makes sense so that a common divisor can be found.

Background. The greatest common divisor is the largest integer that divides both number1 and number2 without a remainder.

Excel calculates the greatest common divisor based on integers. Decimal places are truncated. If one of the arguments isn’t a numeric expression, the GCD() function returns the #VALUE! error. If one of the arguments is smaller than zero, the function returns ...

Get Microsoft® Excel® 2010 Formulas & Functions Inside Out now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.