Enter two positive integers and watch the algorithm run. You get the division steps and a rectangle view that shows why the GCD is the final square size.
Enter two positive integers and click Calculate or press Enter.
Enter two numbers and click Calculate GCD to see the steps.
Largest square sides fill the rectangle until the remainder is zero. The final square side is the GCD.
The geometric view above is not just decoration. For any two integers a and b, imagine an axb rectangle. Repeatedly cut off the largest square (bxb) you can. The leftover rectangle gets smaller each time. When you are left with a square, its side length is the GCD. Euclid used this idea around 300 BCE, and computers still use it today.