GCD: 3
Add an extra integerAdd Remove the last integerRemove
A-CALCULATOR.COM

FAQs & How-to's

About This Calculator

  1. What is this calculator for?
  2. Can I embed this on my website?
  3. How do I find the greatest common divisor manually?

What is this calculator for?

This calculator finds the greatest common divisor (GCD) of a set of integers. It can be used to calculate it for two or more numbers.

Can I embed this on my website?

Sure. Embedding is allowed as long as you promise to follow our conditions. Here's the embed code:

<iframe width="415" height="220" src="http://www.a-calculator.com/gcd/embed.html" frameborder="0" allowtransparency="true"></iframe>

How do I find the greatest common divisor manually?

To get an idea about what the GCD really is, let's go through the steps of finding it for 3 and 6. One way to do so would be to list the divisors of each number like this:

Now we can see that 3 and 6 are both evenly divided by 1 and 3 but 3 is the highest. Therefore 3 is the GCD 3 and 6.

Another common technique is the Euclidean algorithm, which can be stated recursively as \( \def\myfunc{\gcd} \) \begin{equation} \myfunc(a, b) = \begin{cases} a & \text{if } b = 0, \\ \myfunc(b, a \text{ modulo } b) & \text{otherwise}. \end{cases} \end{equation} To use it for three numbers \(a, b\) and \(c\) you can simply write \(\myfunc(a, \myfunc(b, c))\).