GCD Calculator

Calculate the greatest common divisor of numbers. Free online GCD/GCF calculator using Euclidean algorithm.

The GCD Calculator finds the Greatest Common Divisor (also called Greatest Common Factor or Highest Common Factor) of two or more numbers. The GCD is the largest positive integer that divides each number without a remainder. This fundamental tool is essential for simplifying fractions, solving equations, and countless mathematical operations. Uses the efficient Euclidean algorithm.

GCD Calculator

Two or more whole numbers.

Formula: Euclid: GCD(a, b) = GCD(b, a mod b), until the remainder is 0

Worked example

Numbers
48, 180
GCD (greatest common divisor)
12
LCM of the same numbers720
Coprime?No
Step by step
  1. 180 = 3 × 48 + 36
  2. 48 = 1 × 36 + 12
  3. 36 = 3 × 12 + 0
  4. The last non-zero remainder is 12.

Replace these values in the calculator above to compute your own numbers.

Common use cases

  • Simplifying fractions to lowest terms
  • Solving modular arithmetic problems
  • Cryptographic calculations
  • Tile and grid calculations
  • Ratio simplification

How to use

  1. Enter two or more numbers
  2. Click calculate to find the GCD
  3. View the step-by-step Euclidean algorithm
  4. See all common factors
  5. Use for fraction simplification

FAQ

What is GCD?

The Greatest Common Divisor is the largest number that divides all given numbers evenly. GCD(12,18) = 6.

What's the Euclidean algorithm?

An efficient method: GCD(a,b) = GCD(b, a mod b), repeated until remainder is 0. The last non-zero remainder is the GCD.

Is GCD the same as GCF and HCF?

Yes, GCD (Greatest Common Divisor), GCF (Greatest Common Factor), and HCF (Highest Common Factor) are the same.

What if the GCD is 1?

Numbers with GCD of 1 are called coprime or relatively prime—they share no common factors other than 1.