GCF Calculator

Find the greatest common factor — the largest whole number that divides every number you enter — for two or more integers.

StepsExact resultVerifiedLocal only

Calculator

  • Two or more numbers
  • Euclidean algorithm
  • Pairwise reduction
  • Division proof

Result & calculation receipt

Result12
Calculation receipt
Method
Euclidean algorithm applied pairwise across the set
Formula
gcd(a, b) = gcd(b, a mod b), extended to all numbers
Substitution
gcf(48, 36, 60) = 12
Steps
  1. Start with |48| = 48
  2. gcd(48, 36) = 12 (Euclidean algorithm)
  3. gcd(12, 60) = 12 (Euclidean algorithm)
Verification
48 ÷ 12 = 4; 36 ÷ 12 = 3; 60 ÷ 12 = 5 — every quotient is a whole number, so 12 divides them all.
Exact result
12
Decimal result
12
Engine
math-solvers v1.4.0

How this calculator works

The calculator applies the Euclidean algorithm pairwise: gcd(a, b) equals gcd(b, a mod b), repeated until the remainder is zero. It carries the running result across the whole list, so gcf(a, b, c) is gcd(gcd(a, b), c). Each reduction is shown, and the answer is proved by dividing every input by it to confirm each quotient is a whole number.

Worked example

For 48 and 36 the algorithm computes gcd(48, 36) = gcd(36, 12) = gcd(12, 0) = 12. Adding 60 gives gcd(12, 60) = 12, so the greatest common factor of 48, 36 and 60 is 12. The check divides each: 48 ÷ 12 = 4, 36 ÷ 12 = 3, 60 ÷ 12 = 5 — all whole, confirming the result.

Key insight

The greatest common factor is the key to reducing fractions and to simplifying ratios: dividing a numerator and denominator by their GCF puts a fraction in lowest terms in one step. The Euclidean algorithm is thousands of years old and still the fastest way to compute it.

Frequently asked questions

What is the greatest common factor?

It is the largest positive integer that divides every number in your set without a remainder. It is also called the greatest common divisor (GCD) or highest common factor (HCF).

How does the Euclidean algorithm find it?

It repeatedly replaces the larger number with the remainder of dividing it by the smaller, using gcd(a, b) = gcd(b, a mod b), until the remainder is zero. The last non-zero value is the GCF. It is far faster than listing all factors.

Can I find the GCF of more than two numbers?

Yes. The GCF of a list is found by taking the GCF of the running result with each next number, so gcf(a, b, c) = gcf(gcf(a, b), c). Enter as many comma-separated integers as you like.

What if two numbers share no common factor?

Then their greatest common factor is 1 and they are called coprime (or relatively prime). For example gcf(17, 5) = 1.

Why does the calculator reject zero?

The GCF of a set containing 0 is technically the other number, but it is rarely what people intend, so the calculator asks for non-zero integers to avoid ambiguity.

Methodology & verification

The greatest common factor is computed with the Euclidean algorithm applied pairwise and left-folded across all inputs: gcd(a, b) = gcd(b, a mod b), and gcf(a, b, c, …) = gcf(gcf(a, b), c, …). Inputs are validated as non-zero integers; non-numeric or non-integer values return structured errors. The result is verified by dividing every original input by the GCF and confirming each quotient is a whole number, which is included in the receipt.

Engine: math-solvers v1.4.0 · Last reviewed: · Every result is computed client-side and never sent to a server. See the verification methodology and the scientific calculator validation.