# Documentation/Calc Functions/GCD EXCEL2003

From The Document Foundation Wiki

TDF LibreOffice Document Liberation Project Community Blogs Weblate Nextcloud Redmine Ask LibreOffice Donate

## Function name:

GCD_EXCEL2003

## Category:

Mathematical

## Summary:

The result is the greatest common divisor of a list of numbers.

## Syntax:

GCD_EXCEL2003(**Number 1** [; **Number 2** [; … [; **Number 255**]]])

## Returns:

Returns an integer which is the greatest common divisor of two or more integers passed as input. In case one of the arguments are non-integers then, the function returns non-integer positive real values.

## Arguments:

**Number 1**, **Number 2**, … , **Number 255** are numbers, references to cells or to cell ranges of numbers.

- If any argument is negative, the function returns an error value.
- If any argument is non-integer, the function returns non-integer values. For e.g. GCD_EXCEL2003(8;2.2) is 8.88178419700125E-16 while GCD_EXCEL2003(2.5;5) is 2.5.

## Additional details:

If given two numbers, a*b=LCM(a;b)*GCD(a;b)

## Examples:

Formula | Description | Returns |
---|---|---|

=GCD_EXCEL2003(16;32;24) | the largest number that can divide 16, 24 and 32 without a remainder | 8 |

=GCD_EXCEL2003(B1:B3) ,where cells B1, B2, B3 contain 9, 12, 9 | the largest number that can divide 9, 12 and 9 without a remainder | 3 |

=GCD_EXCEL2003(-16;32;24) | function returns an error value since one of the arguments is negative | Err:502 |

## Related LibreOffice functions:

## ODF standard:

None

## Equivalent Excel functions:

GCD