GCF calculator

Find the greatest common factor or divisor of two or more non-negative integers. Enter your number list and calculate an exact result, without an account.

Your inputs stay herePUFFINMINT

Set your data

Set your data

Enter 2–100 non-negative integers separated by spaces or semicolons, up to 30 digits each. Exact large-integer arithmetic. GCD(0,0)=0 by convention; LCM with zero is zero.

Result

Enter your data and run the tool. Your result will appear here.

The values you enter stay on this page. Reloading or closing it clears them.

We count which tools are used most, without including entered values or file contents in the statistics. Privacy

How to use the tool

  1. Fill in these fields: Non-negative integers separated by spaces.
  2. Select “Calculate” to obtain the result.
  3. Enter 2–100 non-negative integers separated by spaces or semicolons, up to 30 digits each.
  4. Exact large-integer arithmetic.
  5. GCD(0,0)=0 by convention; LCM with zero is zero.
  6. Follow Euclid’s remainders for each pair.
  7. Show all steps · Copy steps

Method and principles

Formula

GCD(a,b)= GCD ( b , a mod b )

Practical example

With 12, 18 and 30 items of three types, a GCD of 6 means you can make at most six identical groups without leftovers, with 2, 3 and 5 items of the respective types in each group.

Input
  • Non-negative integers separated by spaces: 12 18 30
Result
18 = 12 + 6 , 12 = 2 × 6 , 30 = 5 × 6

Favorites