GCD Function in Excel: Greatest Common Divisor

⏱ 1 min readUpdated 28 September 2026

MathLevel: IntermediateAvailable in: Excel 2007+

In this article
  1. Syntax
  2. Examples
  3. Example 1
  4. Related functions

GCD returns the largest number that divides all inputs — for simplifying ratios and finding pack sizes.

Syntax

=GCD(number1, [number2], ...)
Argument What it means
number1… Whole numbers.

Examples

Example 1

=A2/GCD(A2,B2)&":"&B2/GCD(A2,B2)

Turns 1920 and 1080 into the ratio 16:9.

LCM · MOD

📚 Part of the free Excel course: Beginner → Expert · Try it in the Formula Lab or ask the AI Helper.

✨ Ask AI about this article

Stuck on a step? Ask a question and the AI answers using this article.

Free · AI can be wrong