How to use GCD function in Excel?

The GCD (Greatest Common Divisor) function in Excel is used to find the largest integer that can exactly divide two or more numbers without leaving a remainder. Here’s how you can use it:

Basic Syntax:

=GCD(number1, [number2], ...)
  • number1: The first number for which you want to find the GCD. This is a required argument.
  • number2, …: Additional numbers for which you want to find the GCD. These are optional arguments, and you can include up to 255 numbers.

Steps to Use the GCD Function:

  • Open Excel: Launch Excel and open a workbook where you want to use the GCD function.
  • Select a Cell: Click on an empty cell where you want the result of the GCD function to appear.
  • Enter the Formula: Type `=GCD(` into the cell followed by the numbers or the cell references containing the numbers. For example:
    • To find the GCD of numbers 8 and 12, you would enter: `=GCD(8, 12)`.
    • If the numbers are in cells A1 and B1, enter: `=GCD(A1, B1)`.
  • Press Enter: After typing the formula, press Enter. The cell will now display the GCD of the numbers you specified.

Example:

Suppose you want to find the GCD of 36 and 60:

  • In a cell, you would write: `=GCD(36, 60)`
  • After pressing Enter, the result will be `12` because 12 is the largest number that divides both 36 and 60 without leaving a remainder.

Tips:

  • Ensure that you are providing non-zero, positive integers because the GCD function will return an error with negative numbers or if all numbers are zero.
  • You can also apply the GCD function to an array of numbers or a range in a formula, like `=GCD(A1:A5)`.

By using this function, you can perform mathematical computations effectively and find the greatest common divisor for different numbers in your Excel sheets.

Unlock Your Potential

Excel

Basic - Advanced

Access

Access Basic - Advanced

Power BI

Power BI Basic - Advanced

Help us grow the project