Calculate GCF (3,091; 9,834), the Greatest (Highest) Common Factor (Divisor), (HCF, GCD), of the Numbers. Online Calculator

Calculate the greatest common factor, GCF (3,091; 9,834), using their prime factorizations, numbers' divisibility or the Euclidean algorithm

The greatest common factor and how to calculate it

Getting started and examples

  • 1. Factors of a number:
    • Factors of a number are the numbers that are multiplied together to get that number.
    • Examples: 2 × 3 × 4 = 24; 4 × 9 = 36.
    • In these cases we say that 2, 3 and 4 are factors of 24. And 4 and 9 are factors of 36.
  • 2. Divisibility:
    • A number can be divided by any of its factors without a remainder.
    • In this case we say that the number is divisible by its factors.
    • The numbers in the above examples are divisible by their factors:
    • 24 is divisible by 2, 3 and 4. And 36 is divisible by 4 and 9.
  • 3. Common factors of multiple numbers:
    • Factors that are common to multiple numbers are called common factors.
    • In our examples 4 is both a factor of 24 and 36.
  • 4. The Greatest Common Factor, GCF, of several numbers
    • The Greatest Common Factor, GCF, is the largest of all the common factors of several numbers.
    • The Greatest Common Factor, GCF, is also called the Highest Common Factor, HCF, or the Greatest Common Factor, GCD.
  • 5. How is the Greatest Common Factor calculated? Step 1.
    • In our examples we might be tempted to say that 4 is the Greatest Common Factor of 24 and 36. But, let's try instead to break those factors into other ones that are as small as possible.
    • 24 could be written as: 24 = 2 × 2 × 2 × 3.
    • 36 could also be written as: 36 = 2 × 2 × 3 × 3.
    • In our example, 2 and 3 cannot be further broken down into any other smaller numbers.
  • 6. The mighty prime numbers:
    • 2 and 3 cannot be broken down into any other smaller numbers because they are prime numbers. This is the very definition of the prime numbers:
    • A prime number has no factors other than 1 and itself since it cannot be further broken down into any other smaller numbers.
    • Examples of prime numbers: 2, 3, 5, 7, 11, 13, 17, 19, 23, 29, and so on, there is an infinite number of prime numbers.
  • 7. How is the Greatest Common Factor calculated? Step 2.
    • We have seen that it is a good idea to decompose numbers into factors that are as small as possible, writing them as a product of prime factors. This is the very definition of the prime factorization of a number.
    • The prime factorization of 24 = 2 × 2 × 2 × 3 = 23 × 3.
    • The prime factorization of 36 = 2 × 2 × 3 × 3 = 22 × 32.
    • To calculate the GCF just take all the common prime factors of both numbers and multiply them together:
    • GCF (24 and 36) = 2 × 2 × 3 = 22 × 3 = 12.

Calculate the greatest (highest) common factor (divisor)
gcf, hcf, gcd (3,091; 9,834) = ?

Method 1. The prime factorization:

The prime factorization of a number: finding the prime numbers that multiply together to make that number.


3,091 = 11 × 281
3,091 is not a prime number but a composite one.


9,834 = 2 × 3 × 11 × 149
9,834 is not a prime number but a composite one.


» Online calculator. Check whether a number is prime or not. The prime factorization of composite numbers

* 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 (3,091; 9,834) = 11
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:
9,834 ÷ 3,091 = 3 + 561
Step 2. Divide the smaller number by the above operation's remainder:
3,091 ÷ 561 = 5 + 286
Step 3. Divide the remainder of the step 1 by the remainder of the step 2:
561 ÷ 286 = 1 + 275
Step 4. Divide the remainder of the step 2 by the remainder of the step 3:
286 ÷ 275 = 1 + 11
Step 5. Divide the remainder of the step 3 by the remainder of the step 4:
275 ÷ 11 = 25 + 0
At this step, the remainder is zero, so we stop:
11 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 (3,091; 9,834) = 11
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).


The greatest (highest) common factor (divisor), gcf, hcf, gcd. What it is and how to calculate it.

  • Note 1: The greatest common factor (gcf) is also called the highest common factor (hcf), or the greatest common divisor (gcd).
  • Note 2: The Prime Factorization of a number: finding the prime numbers that multiply together to make that number.
  • Suppose the number "t" evenly divides the number "a" ( = when evenly dividing the number "a" by "t", the remainder is zero).
  • When we look at the prime factorization of "a" and "t", we find that:
  • 1) all the prime factors of "t" are also prime factors of "a"
  • and
  • 2) the exponents of the prime factors of "t" are equal to or smaller than the exponents of the prime factors of "a" (see the * Note below)
  • For example, the number 12 is a divisor (a factor) of the number 60:
  • 12 = 2 × 2 × 3 = 22 × 3
  • 60 = 2 × 2 × 3 × 5 = 22 × 3 × 5
  • * Note: 23 = 2 × 2 × 2 = 8. We say that 2 was raised to the power of 3. In this example, 3 is the exponent and 2 is the base. The exponent indicates how many times the base is multiplied by itself. 23 is the power and 8 is the value of the power.
  • If the number "t" is a common divisor of the numbers "a" and "b", then:
  • 1) "t" only has the prime factors that also intervene in the prime factorization of "a" and "b".
  • and
  • 2) each prime factor of "t" has the smallest exponents with respect to the prime factors of the numbers "a" and "b".
  • For example, the number 12 is the common divisor of the numbers 48 and 360. Below is their prime factorization:
  • 12 = 22 × 3
  • 48 = 24 × 3
  • 360 = 23 × 32 × 5
  • You can see that the number 12 has only the prime factors that also occur in the prime factorization of the numbers 48 and 360.
  • You can see above that the numbers 48 and 360 have several common factors: 2, 3, 4, 6, 8, 12, 24. Out of these, 24 is the greatest common factor (GCF) of 48 and 360.
  • 24 = 2 × 2 × 2 × 3 = 23 × 3
  • 48 = 24 × 3
  • 360 = 23 × 32 × 5
  • 24, the greatest common factor of the numbers 48 and 360, is calculated as the product of all the common prime factors of the two numbers, taken by the smallest exponents (powers).
  • If two numbers "a" and "b" have no other common factor than 1, gcf (a, b) = 1, then the numbers "a" and "b" are called coprime numbers (relatively prime, prime to each other).
  • If "a" and "b" are not relatively prime numbers, then every common divisor of "a" and "b" is a divisor of the greatest common divisor of "a" and "b".
  • Let's have an example on how to calculate the greatest common factor, gcf, of the following numbers:
  • 1,260 = 22 × 32
  • 3,024 = 24 × 32 × 7
  • 5,544 = 23 × 32 × 7 × 11
  • gcf (1,260, 3,024, 5,544) = 22 × 32 = 252
  • And another example:
  • 900 = 22 × 32 × 52
  • 270 = 2 × 33 × 5
  • 210 = 2 × 3 × 5 × 7
  • gcf (900, 270, 210) = 2 × 3 × 5 = 30
  • And one more example:
  • 90 = 2 × 32 × 5
  • 27 = 33
  • 22 = 2 × 11
  • gcf (90, 27, 22) = 1 - The three numbers have no prime factors in common, they are relatively prime.