GCD Function in Excel: Greatest Common Divisor

GCD Function in Excel: Greatest Common Divisor featured illustration

πŸ“Ž This article includes 1 downloadable practice file ↓

⏱ 2 min readUpdated 5 October 2026

MathLevel: IntermediateAvailable in: Excel 2007+

In this article
  1. Syntax
  2. Examples
  3. Example 1
  4. GCD in practice
  5. Where you will use it
  6. Worked example
  7. Mistakes people make
  8. Related functions
  9. Continue learning

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

Advertisement

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.

GCD in practice

Where you will use it

  • Simplify ratios like 1920:1080
  • Biggest equal pack size for two quantities
  • Teaching fractions

Worked example

ABFormulaResult
19201080=GCD(A2,B2)120
4836=GCD(A3,B3)12
175=GCD(A4,B4)1

Results calculated in Excel.

Mistakes people make

MistakeWhat to do instead
DecimalsInputs are truncated to integers
RatiosDivide both by GCD: A/GCD & ":" & B/GCD

LCM Β· MOD

πŸ“š Part of the free Excel course: Beginner β†’ Expert Β· Try it in the Formula Lab or ask the AI Helper.

⚑ Interactive Practice Lab & Formula Tester:

Test formulas dynamically in our web formula laboratory or download the companion Excel workbook.

πŸ“Ž Practice files for this article

  • πŸ“—
    Practice workbook: Math & rounding24 tasks on realistic sales data β€” type your formula, the Check column turns green when it is right. Answers sheet included.
    ⬇ XLSX Β· 35 KB

Free to use for learning. Files with macros (.bas) are plain text β€” import them with Alt+F11 β†’ File β†’ Import File, and always test on a copy.

✨ Ask AI about this article

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

Free Β· AI can be wrong