GCD: 3

## FAQs & How-to's

#### 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:

• For 3 they are 1 and 3
• And for 6 they are 1, 3 and 6
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}$$ $$\myfunc(a, b) = \begin{cases} a & \text{if } b = 0, \\ \myfunc(b, a \text{ modulo } b) & \text{otherwise}. \end{cases}$$ To use it for three numbers $$a, b$$ and $$c$$ you can simply write $$\myfunc(a, \myfunc(b, c))$$.