Enter a set of numbers and calculate their greatest common divisor.
Greatest Common Divisor Calculator
Result
What is the Greatest Common Divisor (GCD)?
The Greatest Common Divisor (GCD) is the largest positive integer that divides all the numbers in a given set without leaving a remainder. The GCD is commonly used in mathematics for simplifying fractions and solving distribution problems.
How to Calculate the Greatest Common Divisor?
There are two main methods for calculating the GCD of a set of numbers:
Divide the larger number by the smaller number and note the remainder.
Divide the smaller number by the remainder.
Repeat the process until the remainder is 0, and the last non-zero remainder is the GCD.
Example: Find the GCD of 84 and 30.
Solution:
84 ÷ 30 = 2 remainder 24
30 ÷ 24 = 1 remainder 6
24 ÷ 6 = 4 remainder 0
GCD: 6
Complex Example: Find the GCD of 48, 180, and 240.
Solution:
1. First, find the GCD of 48 and 180:
180 ÷ 48 = 3 remainder 36
48 ÷ 36 = 1 remainder 12
36 ÷ 12 = 3 remainder 0
So, GCD(48, 180) = 12.
2. Now, find the GCD of 12 and 240:
240 ÷ 12 = 20 remainder 0
So, GCD(12, 240) = 12.
Thus, the GCD of 48, 180, and 240 is 12.
Differences in Calculating GCD for Two Numbers vs. Multiple Numbers
For Two Numbers: Calculating the GCD of two numbers is straightforward. You can use either of the two methods mentioned above to quickly get the result.
For Multiple Numbers: When calculating the GCD for multiple numbers, you can apply the Euclidean algorithm or listing method step by step. Typically, you start by calculating the GCD of the first two numbers, then use the result to find the GCD with the next number, and so on until all numbers are processed. This works because the GCD is transitive:
GCD(a, b, c) = GCD(GCD(a, b), c)
Input Format
You can input a set of numbers, and the calculator will automatically handle the following common delimiters (or combinations of them):