Wauvel

Excel like a finance pro.

← The library

Math function

GCD

Returns the greatest common divisor of integers.

Rarely usedDifficulty 1150 · ProficientUsage rank #253 of 520
Practice · 2 questions →

When to use it

Greatest common divisor of two or more integers. Reduce fractions, find a common pack size, or align schedules.

The shape of it

Syntax
=GCD(number1, [number2], ...)

Worked examples

  • Two numbers

    =GCD(24,36) 12

    The largest number that divides both.

  • Coprime

    =GCD(7,13) 1

    Coprime numbers share only 1.

  • With zero

    =GCD(0,5) 5

    Zero is divisible by everything.

Worth knowing

  • Reduce a ratio: =A1/GCD(A1,B1) & ":" & B1/GCD(A1,B1) turns 24:36 into 2:3.
  • Up to 255 arguments.
  • Non-integers are truncated first.

Where it goes wrong

  • #NUM! for negative arguments.
  • Values above 2^53 return #NUM!.

Related

Learn the moves here — or let Wauvel run them on your numbers.

Meet your AI CFO →

One CFO-grade Excel tip a week

A short, practical email for finance operators — functions, shortcuts, and the moves that save an afternoon. Free, unsubscribe anytime.