Skip to content

Greatest common divisor (GCD) calculator

Calculate the greatest common divisor (GCD) of two or more integers, the largest number that divides all of them with no remainder.

Processed on your device. Nothing is sent to any server.

GCD

6

Uses the Euclidean algorithm, which computes the remainder of successive divisions until it reaches zero.

Use cases

  • Simplifying a fraction to its irreducible form.
  • Splitting items into equal groups of the largest possible size.
  • Solving school arithmetic problems.

How it works

  1. 1

    Type the numbers

    Enter two or more integers separated by commas or spaces.

  2. 2

    Read the result

    The GCD is calculated automatically.

Technical details

  • Example: GCD(12, 18, 24) = 6, the largest number that divides all three with no remainder.
  • Positive integers only, separated by commas or spaces. Decimals are truncated (2.9 counts as 2), and zero and negatives are ignored.
  • If the result is 1, the numbers are coprime: they share no divisor other than 1.

Frequently asked questions

Does it work with more than two numbers?

Yes, it calculates the GCD of the whole list by applying the Euclidean algorithm pairwise cumulatively.

What is it useful for in practice?

Simplifying fractions (24/36 divided by GCD 12 becomes 2/3) or splitting things into the largest possible equal groups, such as cutting 120 cm and 180 cm boards into equal 60 cm pieces with no waste.

← Calculators