The GCD function calculates the largest positive integer that divides each of the provided numbers without a remainder. If any argument is non-numeric, the function returns the #VALUE! error value.
=GCD(12, 18)→6The largest number that divides both 12 and 18 is 6.
=GCD(24, 36, 48)→12The greatest common divisor for 24, 36, and 48 is 12.
Select a cell
Click on the cell where you want to display the result.
Enter the formula
Type =GCD(number1, number2) replacing the arguments with your specific values or cell references.
The GCD function uses the absolute value of any negative number provided.