The idea
Key formulas
Euclidean reduction
Division step
Loading lessons…
Just a moment, getting everything ready. The first load can take up to a minute.
Discrete maths
Euclid’s algorithm finds the greatest common divisor by replacing a pair with the smaller number and their remainder.
The greatest common divisor is the largest positive integer dividing both inputs; by convention, . Euclid’s algorithm uses until the remainder is zero. The extended algorithm also finds with .