Calculate GCF (30; 12), the Greatest (Highest) Common Factor (Divisor), (HCF, GCD), of the Numbers. Online Calculator
Calculate the greatest common factor, GCF (30; 12), using their prime factorizations, numbers' divisibility or the Euclidean algorithm
Method 1. The prime factorization:
The prime factorization of a number: finding the prime numbers that multiply together to make that number.
30 = 2 × 3 × 5
30 is not a prime number but a composite one.
12 = 22 × 3
12 is not a prime number but a composite one.
* Prime number: a natural number that is only divisible by 1 and itself. A prime number has exactly two factors: 1 and itself.
* Composite number: a natural number that has at least one other factor than 1 and itself.
Calculate the greatest (highest) common factor (divisor):
Multiply all the common prime factors, taken by their smallest exponents (the smallest powers).
The greatest (highest) common factor (divisor),
gcf, hcf, gcd (30; 12) = 2 × 3 = 6
The two numbers have common prime factors.
Scroll down for the 2nd method...
Method 2. The Euclidean Algorithm:
This algorithm involves the process of dividing numbers and calculating the remainders.
'a' and 'b' are the two natural numbers, 'a' >= 'b'.
Divide 'a' by 'b' and get the remainder of the operation, 'r'.
If 'r' = 0, STOP. 'b' = the gcf (hcf, gcd) of 'a' and 'b'.
Else: Replace ('a' by 'b') and ('b' by 'r'). Return to the step above.
Step 1. Divide the larger number by the smaller one:
30 ÷ 12 = 2 + 6
Step 2. Divide the smaller number by the above operation's remainder:
12 ÷ 6 = 2 + 0
At this step, the remainder is zero, so we stop:
6 is the number we were looking for - the last non-zero remainder.
This is the greatest (highest) common factor (divisor).
The greatest (highest) common factor (divisor):
gcf, hcf, gcd (30; 12) = 6 = 2 × 3
The two numbers have common prime factors
Why do we need to calculate the greatest common factor?
Once you've calculated the greatest common factor of the numerator and the denominator of a fraction, it becomes much easier to fully reduce (simplify) the fraction to the lowest terms (the smallest possible numerator and denominator).
Other similar operations with the greatest (highest) common factor (divisor):