Math Tools

GCD Calculator

Find the greatest common divisor of a list of integers using the Euclidean algorithm.

Enter integers separated by commas. Zero values are ignored.

GCD

6

LCM72
Count3

What is the GCD Calculator?

The Greatest Common Divisor (GCD), also called the Highest Common Factor (HCF), is the largest positive integer that divides evenly into two or more numbers without a remainder. For example, the GCD of 48 and 18 is 6, because 6 is the largest number that goes into both 48 and 18 with no remainder left over.

How it works

The calculator uses the Euclidean algorithm, a fast and reliable method that repeatedly divides the larger number by the smaller number and replaces the larger number with the remainder, continuing until the remainder is zero. At that point, the last non-zero remainder is your GCD. For multiple numbers, the algorithm finds the GCD of the first two, then uses that result with the third number, and so on.

GCD(a, b) = GCD(b, a mod b), repeated until remainder = 0

The formula says: to find the GCD of two numbers a and b, divide a by b and take the remainder. Then repeat with b and the remainder. Continue until the remainder is zero; the last non-zero value is the GCD.

Examples

InputResultNotes
48 and 18GCD = 66 is the largest number dividing both evenly (48 ÷ 6 = 8, 18 ÷ 6 = 3)
100 and 75GCD = 25Simplify the ratio 100:75 to 4:3 by dividing both by 25
56, 84, and 140GCD = 2828 divides all three numbers; use for splitting items equally across groups

How to use the GCD Calculator

  1. Enter your first number in the input field
  2. Enter your second number (and any additional numbers, if the tool allows)
  3. Click 'Calculate' or press Enter
  4. The tool displays the GCD instantly
  5. Use the GCD to simplify fractions or reduce ratios by dividing both numbers by the result

Benefits

  • Simplify fractions instantly (e.g., 18/24 becomes 3/4 using GCD = 6)
  • Reduce ratios to their simplest form for clearer comparisons
  • Solve word problems about dividing items equally without leftovers
  • Save time on homework or test problems without manual factoring
  • Find the largest tile size that fits exactly into a rectangular space

Tips & common mistakes

Common mistakes

  • Confusing GCD with LCM (Least Common Multiple)—GCD divides into numbers, LCM is divided by them
  • Assuming GCD must be one of the input numbers—it doesn't have to be, but it always divides both evenly
  • Forgetting that the GCD of any number and 0 is the number itself
  • Trying to find the GCD of negative numbers without taking absolute values first

Tips

  • To simplify a fraction, divide both numerator and denominator by their GCD
  • The GCD of two prime numbers (like 13 and 17) is always 1
  • GCD works with any size numbers—the Euclidean algorithm is efficient even for very large integers
  • If you need the smallest common multiple instead, that's LCM; use GCD × LCM = a × b

Frequently asked questions

What's the difference between GCD and LCM?

GCD (Greatest Common Divisor) is the largest number that divides evenly into both inputs. LCM (Least Common Multiple) is the smallest number that both inputs divide into evenly. For example, GCD(12, 18) = 6, but LCM(12, 18) = 36.

Can I find the GCD of more than two numbers?

Yes. Find the GCD of the first two numbers, then find the GCD of that result with the third number, and repeat. Most online calculators handle this in one step.

What if one number is much larger than the other?

The Euclidean algorithm still works efficiently. For example, GCD(1000000, 7) = 1 (they share no common factors). Size doesn't slow it down.

Why would I need GCD in real life?

Common uses include simplifying recipes, dividing groups fairly, tiling a floor with equal-sized pieces, and reducing fractions in school math.

Can the GCD be larger than the smallest input number?

No. The GCD can never exceed the smallest of the numbers you're dividing. It always divides evenly into both, so it must fit inside both.

What's the GCD if both numbers are the same?

If both numbers are identical, the GCD is that number itself. For example, GCD(25, 25) = 25.

Related tools

FreeTooz Editorial Team · Last reviewed July 2026

Reviewed for accuracy. Results are estimates for general information and are not professional (medical, financial or legal) advice.