Skip to content
UniKit

Greatest common divisor

Calculate the greatest common divisor of two or more integers, including string inputs and negatives.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Integers

Result

Greatest common divisor

Enter integers to calculate

GCD: 0 · Count: 0

What this tool does

  • Find factors for reduction
  • Use in integer algorithms

Example

Input

84, 30

Output

gcd(84, 30) = 6

Separate the integers with commas, spaces or newlines; the example uses 84 and 30.

Frequently asked questions

How many values are supported?

Two or more.

How are negatives handled?

Absolute values are used.

Can I enter zero?

This tool requires non-zero integers.

Keywords:GCDinteger

Related tools