Skip to content
Free math tool

Greatest common divisor

Find the largest whole number that divides evenly into every number in your list. This is also called the greatest common factor (GCF) or highest common factor (HCF). It helps reduce fractions and split items into equal groups.

  • Runs in your browser
  • Free, no account needed
  • Copy or download the result

Your input

12 characters

Number separator
Choose Commas for a compact list such as 100,200,300. Write 1000 for one thousand.

Result

Greatest common divisor12
Numbers
48, 180, 240
Each divided by the GCD
4, 15, 20

The short answer

The greatest common divisor is the largest whole number that divides every number in the list with no remainder. You can find it from shared prime factors, or with the Euclidean algorithm, which keeps replacing the larger number with a remainder until the remainder is 0.

FormulaGCD(a, b) = GCD(b, a mod b), stopping when the remainder is 0

Worked exampleThe GCD of 48, 180 and 240 is 12, and dividing each number by 12 gives 4, 15 and 20.

Example

Input
48, 180, 240
Result
Greatest common divisor12
Numbers
48, 180, 240
Each divided by the GCD
4, 15, 20

How to use the greatest common divisor

  1. Type 2 to 100 whole numbers in the box, such as 48, 180, 240.
  2. Choose Commas for compact lists such as 100,200,300. Automatic also accepts spaces, semicolons, new lines and comma-space lists.
  3. Separate them with commas, spaces, semicolons or new lines.
  4. The result updates as you type, or press Run. Use Copy result or Download to keep it.

How it works

The tool uses the Euclidean algorithm. It keeps replacing the larger number with the remainder after dividing by the smaller one, until the remainder is 0.

Each number can have up to 100 digits, and the math uses exact big integers.

Negative numbers are allowed and treated by their size, so the GCD of -12 and 18 is 6.

Zeros are allowed. If every number is 0, the result is 0 with a note explaining that convention.

Decimals and fractions are rejected, because the GCD is defined for whole numbers.

Everything runs in your browser. Your input is not uploaded or stored. If you use Copy link, what you entered is placed in the link.

Questions and answers

How do you find the greatest common divisor?

One way is to list the prime factors of each number and multiply the ones they share. For 48 and 180, the shared factors are 2 × 2 × 3, so the GCD is 12.

Is GCD the same as GCF?

Yes. Greatest common divisor, greatest common factor and highest common factor all mean the same thing.

What is the GCD of 48, 180 and 240?

It is 12, the largest number that divides all three evenly.

How does the GCD simplify a fraction?

Divide the top and bottom by their GCD. For 48/180, dividing both by 12 gives 4/15.

Last updated November 1, 2026. Maintained by SnowRock. How our tools work

All 220 SnowRock tools