# GCD

Spread for WinForms provides advanced software components that support Excel import/export, full cell customization, an extensive calculation engine with over 450 functions and more, all with zero dependencies on Excel.

## Content



This function returns the greatest common divisor of two numbers.

## Syntax

GCD(*number1*,*number2*)

## Arguments

The arguments are two numeric values or arrays. If the arguments are not integers, they are truncated to integers. This function can have up to 255 arguments.

## Remarks

The greatest common divisor is the largest integer that divides both numbers without a remainder.

## Data Types

Accepts numeric data for all arguments. Returns numeric data.

## Examples

`GCD(B5,G7)`
`GCD(R5C2,R7C7)`
`GCD(3348,972) gives the result 108 GCD(12.8,16.3)` gives the result 4

## Version Available

This function is available in product version 1.0 or later.

## See Also

[LCM](/spreadnet/docs/latest/online-formula/formulas-functionsall/formulas-functsFtoK/FunctionLCM) \| [Math and Trigonometry Functions](/spreadnet/docs/latest/online-formula/formulas-overview/formulas-functs/formulas-functtypes/formulas-functsmathtrig)