greatest common denominator calculator

Greatest Common Denominator (GCD) Calculator

Enter two or more integers to find their greatest common denominator (also called greatest common divisor or greatest common factor).

What is a greatest common denominator?

The greatest common denominator is the largest positive integer that divides each number in a set without leaving a remainder. In math classes, you may also see it called the greatest common divisor (GCD) or greatest common factor (GCF). These terms are commonly used interchangeably.

For example, the GCD of 48 and 180 is 12 because 12 divides both numbers exactly, and no larger number does that for both.

How this calculator works

This calculator uses the Euclidean algorithm, one of the fastest ways to compute the greatest common denominator.

Euclidean algorithm in plain English

  • Take two numbers, a and b (with a >= b).
  • Replace a with b, and b with a mod b (the remainder).
  • Repeat until the remainder becomes 0.
  • The last non-zero value is the GCD.

For more than two numbers, we compute the GCD progressively: first two numbers, then use that result with the next number, and so on.

Why finding the GCD is useful

  • Simplifying fractions: Reduce fractions to lowest terms quickly.
  • Ratios and scaling: Convert values into simpler proportional forms.
  • Grouping and packaging: Determine largest equal group size with no leftovers.
  • Number theory and cryptography: GCD is foundational in modular arithmetic and RSA concepts.
  • Classroom math checks: Verify if two numbers are coprime (GCD = 1).

Worked examples

Example 1: GCD of 54 and 24

54 ÷ 24 leaves remainder 6. Then 24 ÷ 6 leaves remainder 0, so the greatest common denominator is 6.

Example 2: GCD of 72, 120, and 168

First compute GCD(72, 120) = 24. Then compute GCD(24, 168) = 24. Final answer: 24.

Tips for accurate input

  • Use integers only (whole numbers, including negatives and zero).
  • You can separate numbers with commas, spaces, or line breaks.
  • At least two numbers are recommended for comparison.
  • If all values are 0, the GCD is undefined.

Frequently asked questions

Is “denominator” the same as “divisor” here?

In this context, yes. People often say “greatest common denominator” when they mean greatest common divisor/factor.

Can the GCD be negative?

By convention, GCD is reported as a non-negative number. This tool returns a positive result unless the computation is undefined.

What if one number is zero?

The GCD of 0 and a non-zero number is the absolute value of the non-zero number. But GCD(0, 0) is undefined.

Bottom line

If you need to simplify fractions, compare divisibility, or check whether numbers share a common factor, this greatest common denominator calculator gives a fast and reliable answer. Enter your values above and get the result instantly, along with clear step-by-step Euclidean method output.

🔗 Related Calculators