ExcelFunctions.net Logo

The Excel GCD Function

Home » Excel-Built-In-Functions » Excel-Math-Functions » Excel-Gcd-Function

Search this site:
Custom Search
Related Function: 

Basic Description

The Excel GCD function returns the greatest common divisor of two or more supplied integers.

The format of the function is :

GCD( Number1, Number2, ...)

Where the Number arguments are up to 255 numerical values for which you want to calculate the greatest common divisor.

If any of the supplied numbers are not integers, these values are truncated to integers.


Example

Column A of the spreadsheet below, shows examples of the Excel Gcd Function.

The formulas are shown in the spreadsheet on the left and the results are shown in the spreadsheet on the right.

 Formulas
  A
1 =GCD( 1, 5 )
2 =GCD( 15, 10, 25 )
3 =GCD( 0, 8, 12 )
4 =GCD( 7, 2 )
 Results
  A
1 1
2 5
3 4
4 1


Further information and examples of the Excel Gcd function can be found on the Microsoft Office website.


Common Errors

If you get an error from your Excel Gcd function this is likely to be one of the following :

#VALUE! - Produced if one of the supplied Number arguments is non-numeric
#NUM! - Produced if any of the supplied Number arguments is less than zero.






Valid XHTML 1.0 Transitional

Disclaimer Privacy Policy

Copyright © 2008-2011 ExcelFunctions.net