# GCD Function in Excel

In this post you will learn about the simple Excel function – GCD function, how to use it in your excel spreadsheets.

The GCD function finds the greatest common divisor of two or more numbers. The greatest divisor is the number which when divided by any integer is divisible and does not leave a reminder.

## How to use GCD Function in Excel?

Syntax

`=GCD(number 1, number 2,...)`

The syntax initially has two argument

• number 1 – Holds the first number
• number 2 – Holds the second number (optional)

The function also works with a single argument as the greater divisor of a number is the number itself, which is taken as the answer.

• The GCD Function also works with a single argument and it also has the option of multiple arguments.

The following are a few examples of the GCD function in Excel.

• And the syntax does not accept negative numbers and returns the #NUM!.
• The function returns the value #VALUE! if the data entered is a non – numeric value.
• The limit for the number of parameters is 255.
• When decimal numbers are used, the function rounds off/shortens the number into an integer. The example below shows similar answers with both the decimal and shortened decimal values.