Skip to content
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.

  1. The largest tile that fits both wall dimensions exactly:

    =GCD(B2, C2)

    Result30

  2. Reduce 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…