account_tree

Euclid's Algorithm Calculator

Use Euclid's algorithm to find the GCD of two numbers. Step-by-step Euclidean algorithm.

and
Try:
help_outline

How to Use

expand_more
  1. Enter two positive integers
  2. Click "Run Euclid's Algorithm"
  3. View the step-by-step solution
  4. See the GCD and LCM results
info

What is Euclid's Algorithm Calculator?

expand_more

Euclid's algorithm is an efficient method for finding the Greatest Common Divisor (GCD) of two numbers. Dating back to ancient Greece, it works by repeatedly dividing and taking remainders until the remainder is zero.

functions

Formula

expand_more

Euclid's Algorithm:

GCD(a, b) = GCD(b, a mod b)

Continue until remainder = 0

The last non-zero remainder is the GCD

lightbulb

Examples

expand_more
  • GCD(48, 18): 48 = 2×18 + 12, 18 = 1×12 + 6, 12 = 2×6 + 0 → GCD = 6
  • GCD(252, 105): 252 = 2×105 + 42, 105 = 2×42 + 21, 42 = 2×21 + 0 → GCD = 21
quiz

FAQ

expand_more
Why is Euclid's algorithm efficient?expand_more
The algorithm is very efficient because each step reduces the numbers significantly. It can find the GCD of large numbers in relatively few steps, making it much faster than listing all factors.
What's the relationship between GCD and LCM?expand_more
For any two numbers a and b: GCD(a,b) × LCM(a,b) = a × b. This means once you know the GCD, you can easily calculate the LCM.
Can Euclid's algorithm work with more than two numbers?expand_more
Yes! Find the GCD of the first two numbers, then find the GCD of that result with the third number, and so on. GCD(a,b,c) = GCD(GCD(a,b), c).