FormulaCraft

GCD

GCD finds the largest positive integer that evenly divides all supplied numbers. It accepts up to 255 arguments and ignores signs. Use it to simplify fractions, find common scheduling intervals, or solve combinatorial problems.

Excel
=GCD(A2,B2)
Google Sheets
=GCD(A2,B2)

Verified example

Computed by a real spreadsheet engine on the sample data below.

NumeratorDenominatorGCD
128
3624
10075
186

=GCD(A2,B2)4

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

How it works

  1. 1A2 and B2 are the two integers whose greatest common divisor you want.
  2. 2GCD(12,8) returns 4 because 4 is the largest number that divides both 12 and 8 evenly.
  3. 3You can supply more than two arguments: GCD(A2,B2,C2) works across a range.

Need a version for your data?

Try: “Find the greatest common divisor of two numbers to simplify a fraction

Related

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: