GCF Calculator

Find the greatest common factor of two or more whole numbers. Enter numbers separated by commas, spaces, or new lines.

The GCF Calculator finds the largest positive integer that divides every entered integer without a remainder. The same value is also called the greatest common divisor, or GCD, and is central to reducing fractions and factoring expressions.

Euclid’s algorithm avoids long factor lists

Small numbers can be solved by listing factors. Prime factorization selects the shared primes with their lowest exponents. The Euclidean algorithm repeatedly replaces the larger number with the remainder until that remainder becomes zero.

The greatest common factor is the largest positive integer dividing every input without a remainder.

Enter the values in their mathematical roles

Enter two or more whole numbers, separating them as the tool requests. Signs do not change the positive GCF, so the absolute values are used. Include zero only with care: gcd(a,0)=|a|, while gcd(0,0) is not conventionally defined.

The governing relationship

The greatest common factor is the largest positive integer dividing every input without a remainder.

A compact example

The factors common to 18 and 24 include 1, 2, 3 and 6, so the GCF is 6.

Valid inputs and boundary cases

This calculator is intended for integers. Decimals should not be silently rounded into whole numbers. For several entries, find the GCF of the first pair and continue with each remaining value.

Read the answer in context

For nonzero integers the GCF is positive; conventions involving zero should be interpreted carefully.

An independent check

Divide every original integer by the proposed GCF and confirm each quotient is whole. Then check that no larger shared factor exists. Prime-factor overlap provides an independent verification for modest values.

Errors that change the answer

  • Confusing GCF with LCM
  • Selecting common primes with the highest exponents
  • Treating non-integers as exact whole values
  • Ignoring a remaining number in a multi-value list
  • Reporting a negative GCF

Continue with a related calculator

Continue with the Proportion Calculator or LCM Calculator. For everyday arithmetic and order-of-operations checks, use the Basic Calculator.

What this numerical result cannot decide

The GCF identifies divisibility, not the greatest factor of only one number. In algebra, coefficients and variable powers must be handled together; a numeric GCF alone does not fully factor a polynomial.

A second way to understand the method

For 252 and 105, divide 252 by 105 to get remainder 42. Then 105 divided by 42 leaves 21, and 42 divided by 21 leaves zero. The last nonzero remainder is 21, so GCF(252,105)=21.

Use the GCF to reduce fractions

For 84/126, the greatest common factor is 42. Dividing both numerator and denominator by 42 gives 2/3. Because every common factor was removed at once, the result is fully reduced. Repeated smaller cancellations are valid but take more steps and make it easier to stop too early.

Factoring a collection into equal groups

If 48 red tiles and 60 blue tiles must form the largest number of identical groups with none left over, the number of groups is GCF(48,60)=12. Each group contains four red and five blue tiles. Here the GCF answers a grouping question, while the quotients describe the contents of each group.

More than two integers

For 36, 60, and 84, first find GCF(36,60)=12, then GCF(12,84)=12. A factor must divide every entry to remain in the result. Pairwise checking only selected numbers can produce a value that fails the full list. This stepwise method works for any finite collection and avoids constructing very long factor tables.

GCF FAQ

What is the GCF of coprime numbers?

It is 1 because they share no prime factor.

Is GCF the same as GCD?

Yes. Greatest common factor and greatest common divisor name the same positive integer.

Can the GCF equal one input?

Yes, when that input divides all the others.

For additional worked mathematics, see the free OpenStax Prealgebra 2e reference.

Tested & Reviewed by:

Arefin Bappy

Owner, Admin & Developer of AjaxCalculators
Individually tested against the calculation method described on this page.
Last reviewed: September 8, 2026
About the Admin · Editorial Policy

Sponsored Offers

Explore more from

LCM Calculator

Find the least common multiple of integers using prime factors or the relationship between LCM and GCF.

Percentage of a Percentage Calculator

Percentage of a percentage calculator to find cumulative percentage and final value from two related percentage changes.

Decimal to Fraction Calculator

Convert terminating or repeating decimals to reduced fractions and mixed-number form.

Median Calculator

Use our Median Calculator to find the middle value of any data set. Supports raw numbers, value:count input, sorted preview, and instant live results.

Circumference Calculator

Use our Circumference Calculator to find circle radius, diameter, circumference, and area from any one known value with unit conversions.

Mean Median Mode Calculator

Use our Mean Median Mode Calculator to find the average, median, and mode from any data set. Supports raw numbers, value:count input, and sorted preview.

Slope Calculator

Use our Slope Calculator to find slope, angle, percent grade, line equation, y-intercept, rise/run, and distance using two points or other methods.

Exponent Calculator

Exponent Calculator helps you solve powers, positive and negative exponents, and exponential values quickly with clear, accurate results.

Pythagorean Theorem Calculator

Pythagorean Theorem Calculator solves missing sides of a right triangle fast. Use it to find the hypotenuse or any unknown side easily.