Calculatorism

Greatest Common Factor Calculator

Find the GCD of two or three integers.

Input Data

整數。
整數。
設為 0 表示只算 A、B。

Results

6
GCD of [12, 18] = 6

At a glance:The GCD is the largest positive integer dividing all given integers, found by Euclid's algorithm: GCD(a,b)=GCD(b, a mod b).

Formula

GCD(a,b) = GCD(b, a mod b).

Multiple numbers: merge pairwise.

How to Use

  1. Enter A, B (and optional C).
  2. Read the GCD.

FAQ

GCD = 1 means?

The numbers are coprime (no common factor greater than 1).

With 0?

GCD(a,0)=|a|; just skip 0 when multiple.

Related Tools

References

Content review: Calculatorism Science Team. Results are for reference only.

Found a problem with the results?

If this calculator's result is wrong, or you have any question about the calculation logic, please let us know. You are viewing:Greatest Common Factor Calculator/math/greatest-common-factor)。