GCD and LCM

Find common divisors and multiples of integers.

Processed only in this browser

Find the greatest common divisor and least common multiple of several integers.

Inputs and settings
Examples

Separate with commas, spaces or new lines. Up to 50 integers, 100 digits each.

Inputs and results are processed in this tab. Reloading or closing clears them; files you choose to save remain on your device.

How to use this tool

  1. Separate integers with commas, spaces or new lines.
  2. Read the GCD, LCM and the number of parsed integers.
  3. Copy the value needed for fraction reduction or repeating-interval calculations.

Compare repeating intervals

Input and settings
48, 180, 240
Result
GCD 12; LCM 720

Interpret the LCM as a common interval only when every input uses the same unit.

Two different common-value questions

The greatest common divisor is the largest positive integer that divides every input evenly. It can help reduce a ratio or identify a common piece size when several integer lengths need to be partitioned evenly.

The least common multiple is the smallest positive integer divisible by all nonzero inputs. It helps compare repeating periods, but periods alone cannot determine an actual meeting time when the starting offsets differ.

Zero, signs and large inputs

Signs are ignored for divisibility. This tool returns an LCM of zero when any input is zero, and a GCD of zero when every input is zero. Keep these explicit conventions separate from the usual positive-integer definitions.

Decimals and fractions are not accepted here. There are limits of 50 integers and 100 digits per integer, together with a bound on intermediate result size. Output integers are retained without rounding through floating-point numbers.

Common questions

Does input order change the result?

No. Reordering the same integer collection or repeating one of its values does not change its GCD or LCM.

Can I use commas inside a large number?

A comma separates integers, so 1,000 is read as two values. Enter 1000 without a thousands separator.

Standards and references