DIY Cost Tools
GCF Calculator
MATH CALCULATOR
Find the greatest common factor (GCF), also called the greatest common divisor, for two or more positive integers.
How it works
The Euclidean algorithm repeatedly replaces a pair of numbers with the smaller number and the remainder until the remainder is zero. The last nonzero divisor is the GCF.
Formula
GCF(a, b) = GCF(b, a mod b), repeated until the remainder is 0.
Example
The GCF of 84, 126, and 210 is 42. Dividing each number by 42 reduces their ratio to 2:3:5.
Common uses
- Simplifying fractions and ratios
- Dividing materials into equal-size groups
- Factoring algebraic expressions
Frequently asked questions
Are GCF and GCD the same?
Yes. Greatest common factor and greatest common divisor refer to the same value.
Is 1 a valid GCF?
Yes. Numbers whose only shared positive factor is 1 are relatively prime.
Using the greatest common factor
The greatest common factor is the largest positive integer that divides every selected integer without a remainder. It is useful for reducing fractions, simplifying ratios, and grouping items into equal-size sets. Negative signs do not change the positive GCF, although the sign still matters in the original expression.
For two large numbers, the Euclidean algorithm offers a quick check: repeatedly divide and replace the pair with the divisor and remainder until the remainder is zero. The last nonzero divisor is the GCF. If one input is zero, the result depends on the absolute value of the other input; the GCF of all-zero inputs is generally left undefined. Enter whole numbers and confirm whether your class or application uses a different convention for zero.
Review notes
The result uses the Euclidean algorithm, a standard exact method for integer GCF calculations. Last reviewed September 30, 2026.