Courses
Courses for Kids
Free study material
Offline Centres
More
Store Icon
Store

Greatest Common Factor Calculator with Step by Step Solutions

ffImage
hightlight icon
highlight icon
highlight icon
share icon
copy icon

How to Find the Greatest Common Factor Using Prime Factorization and Division Method

The Greatest Common Factor Calculator is a vital math tool that helps students quickly find the greatest number dividing two or more numbers without leaving a remainder. Understanding GCF plays an important role in topics like fractions, factoring, LCM, and algebra, making it crucial for school tests, competitive exams like JEE, and daily problem-solving.


Understanding the Greatest Common Factor (GCF)

The greatest common factor (GCF)—also called highest common factor (HCF) or greatest common divisor (GCD)—is the largest number that can divide two or more numbers wholly. For example, the GCF of 12 and 18 is 6 because 6 is the largest number that divides both.


GCF is used when simplifying fractions, solving algebraic expressions, or reducing ratios. Students often use GCF to make calculations quicker and simplify problems in all branches of arithmetic and number theory.


What is a Common Factor?

  • A factor of a number divides it completely with no remainder.
  • Common factors are numbers that are factors of two or more numbers.
  • The greatest common factor (GCF) is the largest of all common factors.

For example, for 16 and 24:

  • Factors of 16: 1, 2, 4, 8, 16
  • Factors of 24: 1, 2, 3, 4, 6, 8, 12, 24
  • Common factors: 1, 2, 4, 8
  • GCF: 8

Methods to Find the Greatest Common Factor (GCF)

Method How it Works Example
Prime Factorization Write each number as a product of its prime factors. The GCF is the product of all common prime factors. 18 = 2 × 3 × 3
24 = 2 × 2 × 2 × 3
GCF = 2 × 3 = 6
Division (Euclidean Algorithm) Repeatedly subtract (or use modulus) the smaller number from the larger until reaching 0. The last non-zero remainder is the GCF. GCF(24, 18):
24 ÷ 18 = 6 (remainder)
18 ÷ 6 = 0 ⇒ GCF is 6
Factor Listing List out all factors of each number and find the largest one they have in common. Factors of 18: 1,2,3,6,9,18
Factors of 24: 1,2,3,4,6,8,12,24
GCF: 6
GCF with Variables Select the lowest exponent for each common variable. GCF of 12x²y and 18xy³ is 6xy
GCF of Decimals Convert decimals to whole numbers by multiplying by 10/100, then find GCF as usual. GCF of 0.24 and 0.18:
Convert: 24 and 18
GCF is 6,
Answer as 0.06

Formulas and Expressions for GCF

Use these formulas depending on the scenario:

  • Prime Factorization: Write each number as the product of primes, GCF is the product of shared primes.
  • Euclidean Algorithm:
    If a and b are two numbers:
    GCF(a,b) = GCF(b, a mod b) until b=0.
  • Variables: For terms like \( 8x^2y^3 \) and \( 6xy^2 \), GCF is determined by the lowest exponent: \( 2xy^2 \).

How to Use the Greatest Common Factor Calculator

  1. Enter two or more numbers (separated by commas) into the calculator field. You can also enter expressions with variables or decimals.
  2. Click "Calculate" to get instant results.
  3. The calculator will display:
    • The GCF (or HCF/GCD) of the numbers.
    • Step-by-step solution showing prime factorization or division steps.
    • If variables/exponents or decimals are included, the tool will convert and calculate correctly.

At Vedantu, we ensure our GCF calculator is user-friendly and accurate to help you focus on solving maths quickly and confidently. You can try it now on the Greatest Common Factor Calculator page.


Worked Examples

Example 1: GCF of Two Whole Numbers

Find the GCF of 32 and 48.

  1. Factors of 32: 1, 2, 4, 8, 16, 32
    Factors of 48: 1, 2, 3, 4, 6, 8, 12, 16, 24, 48
  2. Common factors: 1, 2, 4, 8, 16
  3. GCF = 16

Example 2: Using Prime Factorization

Find GCF of 27 and 45.

  1. 27 = 3 × 3 × 3
  2. 45 = 3 × 3 × 5
  3. Common primes: 3 × 3 = 9
  4. GCF = 9

Example 3: GCF with Variables

Find GCF of 3x2y and 15xy2:

  1. Numbers: 3 and 15, GCF = 3
  2. Variables: lowest power for each
    x2 and x ⇒ x1
    y and y2 ⇒ y1
  3. GCF = 3xy

Example 4: GCF of Decimals

Find GCF of 0.12 and 0.18.

  1. Convert to whole numbers: 12 and 18
  2. GCF of 12 and 18 = 6
  3. Since we multiplied by 100, divide back:
    6 ÷ 100 = 0.06

Example 5: GCF of Three Numbers

GCF of 20, 50, and 120

  1. Prime factors:
    20 = 2 × 2 × 5
    50 = 2 × 5 × 5
    120 = 2 × 2 × 2 × 3 × 5
  2. Common prime factors: 2 and 5
  3. GCF = 2 × 5 = 10

Practice Problems

  • Find the GCF of 36 and 60.
  • Find the GCF of 45, 75, and 120.
  • What is the GCF of 30x2y and 18xy2?
  • Find the GCF of 0.125 and 0.2.
  • Find the GCF of 14a3b2 and 21a2b4.
  • GCF of 64, 96, and 128.

Try using the Vedantu GCF calculator for instant answers and see detailed working steps.


Common Mistakes to Avoid

  • Confusing GCF with LCM (lowest common multiple).
  • Forgetting to include all variables when finding GCF for expressions with variables.
  • Not converting decimals to whole numbers before calculating GCF.
  • Ignoring exponents: Always choose the lowest exponent among common variables/factors.
  • Missing a larger factor because all smaller ones were checked first—always list all factors or use prime factorization.

Real-World Applications

The concept of GCF helps in daily life—like splitting things equally, arranging items in groups, or reducing fractions to their simplest form. In algebra, GCF is used to factor polynomials. In business, it determines maximum bundle sizes, and in engineering, it helps with measurements and optimization.

For example, if you want to cut two ropes of 60 cm and 84 cm into equal-length pieces without leftovers, the longest possible piece will be the GCF (which is 12 cm long).

At Vedantu, we make sure you get practical problem-solving experience while preparing for school exams and olympiads.


In summary, the Greatest Common Factor Calculator enables you to solve problems efficiently, whether dealing with regular numbers, algebraic variables, or decimals. Mastering GCF improves your ability to simplify problems, tackle exams, and handle real-life scenarios involving division, grouping, or fraction reduction. For further learning, explore related resources like Common Factors, Prime Factorization, and HCF of Two Numbers at Vedantu.


FAQs on Greatest Common Factor Calculator with Step by Step Solutions

1. What is the greatest common factor (GCF)?

The greatest common factor (GCF) is the largest positive number that divides two or more numbers exactly without leaving a remainder. It is also called the greatest common divisor (GCD) or highest common factor (HCF).

  • It must be a factor of each given number.
  • It is the greatest among all common factors.
  • For example, factors of 12 are 1, 2, 3, 4, 6, 12 and factors of 18 are 1, 2, 3, 6, 9, 18.
  • The common factors are 1, 2, 3, 6, so the GCF of 12 and 18 is 6.

2. How do you find the greatest common factor?

You can find the greatest common factor using listing factors, prime factorization, or the division method. The most common steps using prime factorization are:

  1. Write each number as a product of prime factors.
  2. Identify the common prime factors.
  3. Multiply the lowest powers of the common primes.
Example: For 24 and 36:
  • 24 = 2 × 2 × 2 × 3
  • 36 = 2 × 2 × 3 × 3
  • Common primes: 2 × 2 × 3 = 12
So, the GCF is 12.

3. What is the formula for GCF using prime factorization?

The formula for the GCF using prime factorization is to multiply the lowest powers of all common prime factors. If a = p₁^x · p₂^y and b = p₁^m · p₂^n, then:

GCF(a, b) = p₁^min(x,m) · p₂^min(y,n)

This means:

  • Break each number into prime factors.
  • Select only common primes.
  • Use the smallest exponent of each.
This method is widely used in greatest common factor calculators.

4. What is the GCF of two numbers?

The GCF of two numbers is the largest integer that divides both numbers exactly. For example, to find the GCF of 20 and 30:

  • 20 = 2 × 2 × 5
  • 30 = 2 × 3 × 5
  • Common factors: 2 × 5 = 10
So, the GCF of 20 and 30 is 10. A GCF calculator automates this process instantly.

5. How do you find the GCF using the division method?

You find the GCF using the division method by repeatedly dividing the larger number by the smaller number until the remainder is zero. This method is also called the Euclidean algorithm.

  1. Divide the larger number by the smaller number.
  2. Replace the larger number with the smaller number and the smaller number with the remainder.
  3. Repeat until the remainder is 0.
Example for 48 and 18:
  • 48 ÷ 18 = remainder 12
  • 18 ÷ 12 = remainder 6
  • 12 ÷ 6 = remainder 0
The last non-zero remainder is 6, so the GCF is 6.

6. What is the difference between GCF and LCM?

The GCF is the largest common factor of two numbers, while the LCM (least common multiple) is the smallest common multiple. Key differences:

  • GCF focuses on factors (division).
  • LCM focuses on multiples (multiplication).
  • For 12 and 18: GCF = 6, LCM = 36.
They are related by the formula:

GCF × LCM = product of the two numbers.

7. Can you give an example of finding the GCF of three numbers?

Yes, to find the GCF of three numbers, use common prime factors shared by all numbers. Example: Find GCF of 18, 24, and 30.

  • 18 = 2 × 3 × 3
  • 24 = 2 × 2 × 2 × 3
  • 30 = 2 × 3 × 5
  • Common prime factors: 2 and 3
  • GCF = 2 × 3 = 6
So, the GCF of 18, 24, and 30 is 6.

8. How does a greatest common factor calculator work?

A greatest common factor calculator works by applying prime factorization or the Euclidean algorithm to compute the largest common divisor. Internally, it:

  • Takes the input numbers.
  • Uses an efficient algorithm (often the Euclidean method).
  • Returns the GCF result instantly.
This saves time and reduces calculation errors when working with large numbers.

9. What is the GCF of 0 and a number?

The GCF of 0 and a non-zero number is the absolute value of the non-zero number. This is because every number divides 0 exactly. For example:

  • GCF(0, 8) = 8
  • GCF(0, 15) = 15
However, GCF(0, 0) is undefined because every number divides 0, so there is no greatest one.

10. Why is finding the GCF important in math?

Finding the greatest common factor is important because it helps simplify fractions, factor algebraic expressions, and solve word problems. Common uses include:

  • Simplifying fractions (e.g., 12/18 simplifies using GCF 6).
  • Factoring polynomials in algebra.
  • Dividing quantities into equal groups.
Understanding the GCF builds a strong foundation for number theory and algebra.