# GCD

**The function GCD returns the greatest common divisor of one or more Numbers.**

This function takes a [Number or Numbers](../../variable-data-types/the-number-variable-data-type) as input. It returns the greatest common divisor as a Number output.

#### Declaration

```javascript
GCD(first_number, second_number, nth_number, ...) -> greatest_common_divisor
```

#### Parameters

**first\_number, second\_number, nth\_number** (type: at least one number) The numbers to compute the greatest common divisor for.

#### Return Values

**greatest\_common\_divisor** (type: _number_) The greatest common divisor

#### Examples

The numbers six, nine, and 15 are all divisible by the number three.

```javascript
GCD(6, 9, 15) -> 3
```

The numbers five, ten, and 15 are all divisible by the number five.

```javascript
GCD(5, 10, 15) -> 5
```

While the numbers 15, 30, and 45 are all divisible by both three and five, the largest divisor is 15.

```javascript
GCD(15, 30, 45) -> 15
```

Between the numbers two, three, and four, the largest common divisor is one, as any number is divisible by one.

```javascript
GCD(2, 3, 4) -> 1
```

The greatest common divisor of the number 15 is 15, as any number is divisible by itself.

```javascript
GCD(15) -> 15
```
