ToolPony.comDocumentation

Common factor calculator

List all positive common factors and calculate the greatest common factor of multiple integers.

Get started

  1. Use the example values or enter your own measurements.
  2. Calculate, then copy the result or download the available details.

Example

Input

12, 18, 30

Expected result

1, 2, 3, 6

Try it

Good to know

The calculation runs in your browser. Use consistent units in fields with no explicit unit.

Calculation method

The common factors of a list are exactly the divisors of its greatest common divisor. The Euclidean algorithm finds that divisor without enumerating every input’s factors.

d∣a1,…,an  ⟺  d∣gcd⁡(a1,…,an)d\mid a_1,\ldots,a_n\iff d\mid\gcd(a_1,\ldots,a_n)