Greatest Common Divisor Calculator

How to use the tool

To calculate the greatest common divisor enter the numbers in the fields below and press calculate:

Number 1: Number 2: Number 3: Number 4: Number 5:
Result:
GCD(8, 12, 18) = 2
LCM(8, 12, 18) = 23. 3 2= (2.2.2).(3.3) = 8 . 9 = 72

What is Greatest Common Divisor?

GCD or Greatest Common Divisor is a mathematical concept used to find the largest number that divides two or more numbers. It is an important calculus for many aspects of mathematics, including number theory and algebra.

MDC can be used to simplify fractions, determine common factors in mathematical expressions, and be applied to data encryption and encoding to ensure information security. To calculate the MDC, numbers are compared and successive divisions are performed until the remainder is zero. There are many calculation methods for GCD, including Euclid's algorithm, Stein's algorithm and Newton's algorithm.

How to calculate GCD of 2 or more numbers

The method of calculating the Greatest Common Divisor (GCD) of prime numbers is to decompose the number into prime numbers and find the common factors of all numbers. Here is an example of how to calculate the GCD of two numbers by their prime factors:

  1. Choose two numbers, say A and B.
  2. Factor A and B into prime factors. For example, if A = 15 and B = 20, then:

  3. A = 3 * 5
    B = 2 * 2 * 5

  4. Find the common prime factors of A and B. In this example, it's a factor of 5.
  5. Solve for the product of common prime factors. In this case it is 5.
  6. The GCD result of A and B.

If you want to calculate the GCD of three or more numbers, just repeat the process for the remaining numbers. Also, it is important to note that the prime factor method is more efficient than successive division because it avoids double counting of common prime factors.