ToolHome

Home / Tools / GCD & LCM Calculator

Free browser utility

GCD & LCM Calculator

Find the greatest common divisor and least common multiple of a list of integers, with exact results even beyond ordinary number precision.

How to calculate GCD and LCM

  1. Enter at least two whole numbers separated by spaces, commas, or newlines.
  2. Read the greatest common divisor and least common multiple.
  3. Copy the exact results.

Example: 12, 18, and 30

The GCD is 6, the largest positive integer that divides every input. The LCM is 180, the smallest positive integer divisible by every input. These calculations help simplify ratios or compare repeating cycles.

Negative integers and zero

Negative inputs are treated by their absolute values. If any input is zero, the LCM is zero. The GCD of zero and a nonzero integer is that integer; this tool uses GCD(0, 0) = 0 by convention.

Exact arithmetic and limits

The Euclidean algorithm and JavaScript BigInt keep integer results exact. Enter 2 to 100 integers with no more than 100 digits each. Decimals and scientific notation are rejected. Commas are separators, not thousands separators: enter 1000 instead of 1,000.

Does this send numbers to a server?

No. All arithmetic runs locally in your browser.

Related tools