Math · FREE ONLINE TOOL

Greatest Common Factor Calculator

Find the greatest common factor (GCF or GCD) of your integers. Use the division table to reduce a fraction or split quantities into equal groups.

Your inputs

Formula and input guidance

Whole numbers

gcd(a,b) = gcd(b, a mod b); lcm(a,b) = |a × b| / gcd(a,b).

The Euclidean algorithm finds the greatest common divisor. Factor lists contain positive factors.

Separate integers with commas, spaces or new lines.

Calculations run in your browser. No account needed.

EXAMPLE RESULTCalculated locally
Greatest common factor
6
Jump to the full table
My workspace

Calculate with your inputs to save a result or compare scenarios.

Detailed breakdown

All 3 rows

The complete calculation, row by row.

Swipe or scroll horizontally for more columns.
Detailed breakdown · All 3 rows
DividendDivisorQuotient
1262
1863
2464

How it works

Illustration for Greatest Common Factor Calculator: arrows; plus and division symbols.
Whole numbersgcd(a,b) = gcd(b, a mod b); lcm(a,b) = |a × b| / gcd(a,b).
A useful distinction

One common factor must fit every input

The GCF of 18 and 24 is 6, but adding 35 makes the three-number GCF equal 1. A large factor shared by one pair need not divide every value in a longer list.

Make identical kits without leftovers

Order quantities
24, 36
Number of kits
12
Items per kit. A (24) → 2. B (36) → 3.
Make identical kits without leftovers
QuantityCalculationItems per kit
A 2424 ÷ 122
B 3636 ÷ 123

Using a greatest common factor

The greatest common factor identifies the largest shared positive divisor of the entered whole numbers. It is useful for simplifying ratios and fractions or finding the largest equal grouping size. A common multiple answers a different question and can be much larger than the inputs. Review how the tool handles zeros and signs before interpreting an edge case.

Use GCF, GCD and HCF as names for the same operation

The greatest common factor, greatest common divisor and highest common factor are the largest positive integer dividing every input without a remainder. Enter a list of whole numbers, keeping each number separate.

GCF is useful when reducing fractions or splitting integer quantities into the largest shared grouping. It differs from LCM, which finds a common multiple rather than a divisor.

Reduce a fraction by its greatest common factor

For 84 and 126, the GCF is 42. Dividing numerator and denominator of 84/126 by 42 gives 2/3. The value of the fraction stays the same because both parts are divided by the same nonzero quantity.

Using GCF 42 to simplify 84/126
StepNumeratorDenominator
Original fraction84126
Divide by the GCF84 ÷ 42126 ÷ 42
Simplest form23

Verify the result with Euclid’s remainder method

Divide 126 by 84 to obtain remainder 42. Then divide 84 by 42 to obtain remainder 0. The last nonzero remainder, 42, is the greatest common factor. This avoids listing every factor of large inputs.

For more than two numbers, combine the operation sequentially: GCF(84,126,210) = GCF(42,210) = 42. The final answer must divide every input, not merely the first two.

Handle coprime inputs, signs and zeros consistently

Numbers with GCF 1 are coprime; they need not both be prime. For example, 8 and 15 share no factor above 1. Changing an input’s sign does not change the nonnegative GCF returned here.

GCF(a,0)=|a| for nonzero a. This tool uses 0 for an all-zero GCF input as a computational convention; it should not be interpreted as the greatest positive divisor of zero.

Whole numbers: formula and assumptions

gcd(a,b) = gcd(b, a mod b); lcm(a,b) = |a × b| / gcd(a,b).

The Euclidean algorithm finds the greatest common divisor. Factor lists contain positive factors.

Use Whole numbers

Worked example

Using the Whole numbers example:

Inputs
Whole numbers
12, 18, 24
Method

gcd(a,b) = gcd(b, a mod b); lcm(a,b) = |a × b| / gcd(a,b).

Result

Example result

Greatest common factor: 6

These are illustrative inputs. Change the values to explore a different scenario.

Formula references

References explain the underlying methods; they do not imply endorsement or individual professional review of Finflo.

Common questions

How can GCF help simplify a fraction?

Divide the numerator and denominator by their greatest common factor. For 18/24, dividing both by 6 gives 3/4.

Is greatest common divisor different from greatest common factor?

No. GCD and GCF are two names for the same whole-number relationship.

Must coprime numbers both be prime?

No. They only need to share no positive factor above 1. For example, 8 and 15 are composite but coprime.

What does a zero input do?

For a nonzero a, GCF(a,0)=|a|. An all-zero input returns 0 by this tool’s convention.

Must the GCF be one of the input numbers?

No. The GCF of 18 and 30 is 6, even though 6 is not an input. It must divide every input, not equal one of them.

See our methodology and editorial policy.