GCF Calculator - Greatest Common Factor of Two or More Numbers

The greatest common factor (GCF) of 24 and 36 is 12 - the largest integer that divides both numbers evenly. Enter two or more whole numbers separated by commas or spaces to get the GCF instantly, plus step-by-step work using listing factors, prime factorization, or the Euclidean algorithm.

Enter whole numbers

Type two or more integers separated by commas or spaces.

Result

Greatest common factor (GCF), also called HCF or GCD.

GCF of 24, 36

12

Simplified: 24/36 → 2/3

Show work

Step 1: Factors of 24

[1], [2], [3], [4], [6], 8, [12], 24

Step 2: Factors of 36

[1], [2], [3], [4], [6], 9, [12], 18, 36

Common factors (in every list)

1, 2, 3, 4, 6, 12

Greatest common factor = 12

Popular GCF lookups

Tap a pair to calculate instantly, or open its full step-by-step page.

  • Steps
  • Steps
  • Steps
  • Steps
  • Steps
  • Steps
  • Steps
  • Steps
  • Steps
  • Steps
  • Steps
  • Steps

Methodology and limitations

Last reviewed:

Methodology

Computes the greatest common factor using the Euclidean algorithm for the final answer, with optional step-by-step work via listing factors, prime factorization, or repeated division with remainders.

Limitations

Inputs must be whole numbers within JavaScript safe-integer range. GCF(0, 0) is undefined. Step-by-step listing and prime factorization are hidden for very large values to keep the page responsive.

What Is the Greatest Common Factor (GCF)?

The greatest common factor (GCF) - also called the highest common factor (HCF) or greatest common divisor (GCD) - is the largest positive integer that divides evenly into every number in a set with zero remainder. For example, the GCF of 24 and 36 is 12 because 12 is the biggest number that divides both 24 and 36 without leaving a remainder.

GCF is used throughout arithmetic to simplify fractions, reduce ratios, factor polynomials, and solve word problems where you need the largest shared divisor. Enter two or more whole numbers above and the calculator returns the GCF instantly, then shows step-by-step work using listing factors, prime factorization, or the Euclidean algorithm.

How GCF Helps Simplify Fractions

To reduce a fraction to lowest terms, divide the numerator and denominator by their GCF. For 24/36, the GCF of 24 and 36 is 12, so 24 ÷ 12 = 2 and 36 ÷ 12 = 3, giving the simplified fraction 2/3. Without finding the GCF first, you might only partially simplify the fraction and miss the simplest form.

The same idea applies to ratios and algebraic expressions: when two terms share a common factor, factoring out the GCF makes the expression easier to read and manipulate. That is why GCF appears in grade-school math, pre-algebra, and later in factoring quadratics and rational expressions.

Method 1: Listing Factors

List every whole-number factor of each value, then find the largest number that appears in every list. For 24 and 36, the factors of 24 are 1, 2, 3, 4, 6, 8, 12, and 24. The factors of 36 are 1, 2, 3, 4, 6, 9, 12, 18, and 36. The common factors are 1, 2, 3, 4, 6, and 12 - so the GCF is 12. Listing factors is intuitive for homework and small numbers, which is why the calculator defaults to this method when the inputs stay small enough to display every factor clearly.

Method 2: Prime Factorization

Break each number into prime factors, then multiply the shared prime powers that appear in every factorization. For 24 = 2³ × 3 and 36 = 2² × 3², the primes common to both are 2 and 3. Take the lowest power of each: 2² and 3¹. Multiply to get 4 × 3 = 12. Prime factorization scales better than listing every factor once numbers grow beyond simple classroom examples, and it connects directly to how you simplify fractions by canceling shared prime factors in the numerator and denominator.

Method 3: Euclidean Algorithm

For larger numbers, the Euclidean algorithm is the most efficient approach. Repeatedly divide the larger number by the smaller and replace the pair with the smaller number and the remainder until the remainder is zero. The last non-zero remainder is the GCF. For three or more numbers, compute GCF(a, b) first, then find GCF of that result with the next number: GCF(a, b, c) = GCF(GCF(a, b), c). This method works at any scale and is the standard approach used in computer algebra systems and competitive programming.

Common GCF Values (Quick Reference)

These frequently searched pairs help you verify results or estimate simplified fractions without recalculating from scratch. Pairs with dedicated pages link to full step-by-step answers.

First number Second number GCF
8 12 4
16 28 4
81 72 9
24 36 12
18 24 6
36 48 12
36 60 12
12 18 6
45 90 45
63 21 21
30 54 6
12 20 4
16 24 8
15 20 5
9 12 3
20 50 10
45 60 15
100 80 20
48 18 6
30 45 15

GCF vs LCM vs HCF vs GCD

GCF, HCF (highest common factor), and GCD (greatest common divisor) all name the same value: the largest integer that divides every input evenly. LCM (least common multiple) is the opposite idea - the smallest number that is a multiple of every input. GCF and LCM are linked by the formula GCF(a, b) × LCM(a, b) = a × b for two positive integers. Use GCF when simplifying or dividing evenly; use LCM when finding a common denominator or synchronizing repeating events.

Frequently Asked Questions

What is the greatest common factor (GCF)?

The GCF - also called HCF (highest common factor) or GCD (greatest common divisor) - is the largest positive integer that divides every number in your set with zero remainder. For 18 and 24, the common factors are 1, 2, 3, and 6, so the GCF is 6.

How do you calculate GCF?

Three common methods work: list all factors of each number and pick the largest shared factor; break each number into prime factors and multiply the lowest shared prime powers; or use the Euclidean algorithm - divide and take remainders until you reach zero. This calculator shows all three methods step by step.

What is the GCF of 24 and 36?

The GCF of 24 and 36 is 12. The factors of 24 are 1, 2, 3, 4, 6, 8, 12, and 24. The factors of 36 are 1, 2, 3, 4, 6, 9, 12, 18, and 36. Twelve is the largest number in both lists, and 24/12 = 2 and 36/12 = 3.

What is the difference between GCF and LCM?

GCF is the largest number that divides all inputs evenly; LCM is the smallest number that all inputs divide into. They are linked by GCF(a, b) × LCM(a, b) = a × b for two positive integers. Use GCF to simplify fractions; use LCM to find common denominators.

What is GCF used for?

GCF simplifies fractions to lowest terms, reduces ratios, factors expressions in algebra, and solves division problems where you need the largest equal-sized groups. For example, simplifying 24/36 requires dividing both by their GCF of 12 to get 2/3.

What is GCF when one number is zero?

For any non-zero whole number k, GCF(k, 0) = k because every integer divides zero. However, GCF(0, 0) is undefined because any integer divides zero, so there is no single largest common divisor. Enter at least one non-zero value for a defined result.