Calculator for calculating the greatest common divisor
The result of this function is the greatest common divisor (gcd) for the integers a and b.
To perform the calculation, enter the values for a and b, then click the 'Calculate' button.
|
This example shows how to calculate the greatest common divisor of the integers 328 and 256.
First, the larger number is divided by the smaller number.
328 ÷ 256 = 1 R 72
Then divide the divisor by the remainder.
Repeat this step until the calculation works out.
256 ÷ 72 = 3 R 40
72 ÷ 40 = 1 R 32
40 ÷ 32 = 1 R 8
32 ÷ 8 = 4
The last divisor is then the gcd of the two starting numbers.
gcd(328, 256) = 8
|