Enter two integers into the calculator below to determine the greatest common divisor between the two numbers.
What is a greatest common divisor?
The greatest common divisor, also known as GCD for short, is a term used in mathematics to describe the greatest positive integer that can divide two numbers and result in two more integers. In other words, the greatest integer that results in a non-partial number when dividing two numbers by that integer.
The GCD is also known as the greatest common factor, or GCF for short.
The greatest common divisor formula is an interesting one to look at. In short, there is no quick mathematical formula that you can plug numbers into. Instead, an iterative process must be done to calculate the GCD.
This iterative process involves starting at the lowest of the two numbers and working down towards 1 to find the greatest number that each integer can be divided by.
How to calculate the GCD of two integers?
The following is a step by step guide on how to calculate the GCD between two integers.
- Let’s take two integers 9 and 6. We will determine the GCD between these numbers.
- As stated above, we must implement an iterative process in order to calculated the GDC.
- The first step, is to start at the lower of the two numbers and try to divide each integer by that number. So, 9/6=1.333 and 6/6= 1. In this case 9/6 is not a positive integer so we must move down towards 1.
- Next, this would have us trying the same process for the integers 5 and 4. We find that neither of these numbers result in a positive integer either.