math calculator

Greatest Common Factor (GCF) Calculator

Find the largest number that divides both inputs evenly.

Important Use Notice

Informational calculator only. Verify important outputs independently before legal, tax, medical, engineering, safety-critical, contractual, employment, or compliance use.

Estimate

Enter job values, review the estimate, then use the decision hints before ordering or quoting.

First integer

Second integer

Estimate Results

Enter values to see the result.

Example

GCF(48, 18) = 6

Formula

GCF(a, b) = GCF(b, a mod b) until b = 0, then GCF = a

Repeatedly replace a with b and b with remainder until remainder is 0 — last non-zero remainder is GCF.

Efficient even for large numbers

Check

Using subtraction instead of modulo (slow)
Confirm that all inputs use the same unit system expected by the formula.

Next Step

FAQ

What's the difference between GCF and LCM?

GCF is largest common divisor; LCM is smallest common multiple. Relationship: GCF(a,b) × LCM(a,b) = a × b.

Can GCF be larger than the smaller number?

No — GCF is always ≤ the smaller of the two numbers.