Advertisement

GCF / GCD Calculator

Find the Greatest Common Factor (GCF, also called GCD) of 2 to 5 numbers. See the complete Euclidean algorithm step by step and the LCM.

Enter 2 to 5 positive integers.

Euclidean Algorithm

The Euclidean algorithm finds GCF by repeatedly applying: GCF(a, b) = GCF(b, a mod b), until the remainder is 0.

GCF(48, 18):
48 = 18 × 2 + 12 → GCF(18, 12)
18 = 12 × 1 + 6 → GCF(12, 6)
12 = 6 × 2 + 0 → GCF = 6

Frequently Asked Questions

The Greatest Common Factor (GCF), also called Greatest Common Divisor (GCD), is the largest positive integer that divides all given numbers without a remainder.

An efficient algorithm to compute GCF: divide the larger number by the smaller and take the remainder. Repeat with the smaller number and the remainder until the remainder is zero. The last non-zero remainder is the GCF.

If GCF(a, b) = 1, the numbers are called coprime or relatively prime. They share no common prime factors. For example, GCF(8, 9) = 1.

To simplify a fraction a/b, divide both numerator and denominator by GCF(a, b). For example, 12/18 → GCF = 6 → 2/3.

No. The GCF is always less than or equal to the smallest of the given numbers, since a common factor must divide all numbers, and no number can have a divisor larger than itself (except in trivial cases).

Related Calculators