# How to use the GCD function

**What is the GCD function?**

The GCD calculates the greatest common divisor that divides all given arguments without a remainder.

**What is the greatest common divisor?**

The greatest common divisor of two or more integers is the largest integer that divides them all. For two numbers *number1* and *number2*, it is the largest integer that divides both *number1* and *number2* without remainder.

For example:

greatest common divisor(8,12) = 4

This is because 4 is the largest number that divides both 8 and 12.

greatest common divisor(18,24) = 6

6 is the greatest common factor of 18 and 24.

greatest common divisor(10,15,25) = 5

5 is the largest number that divides 10, 15 and 25.

**What is a remainder?**

A remainder is the amount left over after dividing two integers.

The remainder is what is left after dividing two integers. If you divide 15 with 2 you get 7 and 1 is left over. 2*7 equals 14. 15 - 14 equals 1. The remainder is 1.

**What is a divisor?**

A divisor is a number that divides into another number either cleanly or leaving a remainder.

dividend / divisor = quotient( + remainder)

**What is a dividend?**

In division, the dividend is the number being divided.

For example, in the division:

15 / 5 = 3

15 is the dividend 5 is the divisor and 3 is the quotient

**What is a quotient?**

The quotient is the result when two numbers are divided.

**What is a factor?**

A factor is a number that divides evenly into another number, in other words, without leaving a remainder.

**When is the greatest common divisor useful?**

The GCD can be used to reduce fractions to their simplest form. For example, greatest common divisor(36,68) = 4 can simplify 36/68 to 9/17.

Finding least common multiples is the product of two numbers divided by their greatest common divisor. Excel has the LCM function that you can use instead of calculating the least common multiple.

**What other Excel functions are about division, dividend, divisor, and quotient?**

Excel Function |
Description |

GCD | Returns the greatest common divisor of two numbers |

LCM | Returns the least common multiple of two numbers |

QUOTIENT | Returns the integer portion of a division between two numbers |

MOD | Returns the remainder after dividing num1 by num2 |

Formula in cell D3:

### Excel Function Syntax

GCD(*number1*, [*number2*], ...)

### Arguments

number1 |
Required. A single numerical value or a cell reference to multiple numerical values. |

[number2] |
Optional. Upp to 254 additional arguments. |

### Comments

The GCD function returns

- #NUM! error value if any number is less than 0 (zero).
- #VALUE! error value if any argument is not a numerical number.

### Functions in 'Math and trigonometry' category

The GCD function function is one of 73 functions in the 'Math and trigonometry' category.

## How to comment

How to add a formula to your comment<code>Insert your formula here.</code>

Convert less than and larger than signsUse html character entities instead of less than and larger than signs.

< becomes < and > becomes >

How to add VBA code to your comment[vb 1="vbnet" language=","]

Put your VBA code here.

[/vb]

How to add a picture to your comment:Upload picture to postimage.org or imgur

Paste image link to your comment.

Contact OscarYou can contact me through this contact form