Greatest Common Divisor

Greatest Common Divisor

The Greatest Common Divisor (GCD), also known as the greatest common factor (GCF) or highest common factor (HCF), of two or more integers, is the largest positive integer that divides each of the integers without leaving a remainder. In simpler terms, it is the largest number that evenly divides two or more numbers.

GCD Calculator

Number 1:
Number 2:

Result:

GCD:

Calculator

  • enter the first number
  • the second number

Result

  • the greatest common divisor of the two numbers

Whether you're a student, teacher, or professional, this calculator is ideal for mathematical computations, problem-solving, and learning purposes. It works efficiently on all devices, ensuring accessibility wherever you are. Enhance your math skills and streamline your calculations with our reliable GCD Calculator.

Example Calculation

Find the GCD of 48 and 18:
Start with the two numbers: 48 and 18.
Apply the Euclidean algorithm: The algorithm states that GCD(a, b) is the same as GCD(b, a % b) until b equals 0.
First iteration:
a = 48
b = 18
Calculate a % b: 48 % 18 = 12
Now, set a to 18 and b to 12.
Second iteration:
a = 18
b = 12
Calculate a % b: 18 % 12 = 6
Now, set a to 12 and b to 6.
Third iteration:
a = 12
b = 6
Calculate a % b: 12 % 6 = 0
Now, set a to 6 and b to 0.
Termination:
When b becomes 0, the value of a (which is 6) is the GCD.
The GCD of 48 and 18 is 6.

Note: The % symbol in the above explanation represents the modulo operator. It is used in mathematics and programming to find the remainder of dividing one number by another. In the context of the Euclidean algorithm for finding the GCD, the modulo operation helps reduce the numbers' size iteratively.

The expression a % b computes the remainder when a is divided by b.
Decimal (Base-10) Binary (Base-2) Octal (Base-8) Hexadecimal (Base-16)
If you have any questions or comments please Contact Us
Privacy Policy
© 1998, VmNet.