Excel
GCD function in Excel
Returns the greatest common divisor
=GCD(number1, [number2], ...)GCD syntax and parameters
Two arguments, one required.
- number1numberRequired
- number2numberRepeating
GCD examples
Formulas you'll actually reuse.
The largest tile that fits both wall dimensions exactly:
=GCD(B2, C2)Result
30Reduce a ratio — 1920:1080 becomes 16:9:
=B2 / GCD(B2, C2) & ":" & C2 / GCD(B2, C2)Result
"16:9"
GCD in Google Sheets
Same name — your formula ports as-is.
Try GCD in the playground
Edit the example — nothing to install.
Preloaded with the GCD formula from Example 1 — change anything and watch it respond.
Loading the editor…
Related functions
More ways Excel gets this done.
- ABSReturns the absolute value of a numberMathGoogle Sheets
- ACOSReturns the arccosine of a numberMathGoogle Sheets
- ACOSHReturns the inverse hyperbolic cosine of a numberMathGoogle Sheets
- ACOTReturns the arccotangent of a numberMathGoogle Sheets
- ACOTHReturns the hyperbolic arccotangent of a numberMathGoogle Sheets
- AGGREGATEReturns an aggregate in a list or databaseMathNo Google Sheets equivalent