Math & Statistics

GCF/GCD Calculator

Find the greatest common factor or divisor shared by signed whole numbers, preserving exact digits.

Private, in-browser calculationUpdated

Let’s work it out

Enter your numbers. We’ll show the working.

Up to 100 signed integers, each at most 30 digits. Commas or spaces separate entries.

How to use this calculator

  1. Enter whole numbers and the remaining values.
  2. Check the selected units and the counting or calculation convention described below.
  3. Select Calculate to review the result and breakdown. Reset restores the example.

The formula

gcd(a,b) = gcd(b, a mod b), repeated until b = 0

The Euclidean algorithm repeatedly replaces the pair with the divisor and remainder. Negative signs are removed before processing. The operation is applied across the list; a zero paired with a nonzero value leaves that nonzero absolute value.

PUTTING IT INTO PRACTICE

A worked example

The GCD of 12, 18, and 24 is 6. Dividing all three by 6 leaves 2, 3, and 4, which share no larger common factor.

How to interpret your result

GCF and GCD name the same operation here. The all-zero result is reported as zero by computational convention rather than a greatest positive factor.

Assumptions and limitations

Up to 100 signed whole numbers, each no more than 30 digits.

Does not factor each number into primes or accept decimals. Scale rational quantities deliberately before using integer factors.