Category: Calculators

GCD and LCM Calculator

System ideaMissing a tool?

Greatest common divisor and least common multiple

Enter two whole numbers to find their greatest common divisor (GCD) and least common multiple (LCM).

Greatest common divisor (GCD)6Least common multiple (LCM)36

The GCD is the largest number that divides both inputs evenly; the LCM is the smallest number that both inputs divide evenly.

Everything on this page is processed in your browser. Nothing is uploaded.

What this tool does

The greatest common divisor is the largest whole number that divides both inputs with no remainder; the least common multiple is the smallest whole number that both inputs divide into evenly. Both are computed exactly with the Euclidean algorithm, useful for simplifying fractions, scheduling repeating events, and ratio problems.

How to use it

  1. Enter the first whole number.
  2. Enter the second whole number.
  3. Read the GCD and LCM underneath.

Privacy

This tool runs entirely in your browser. Your input is never uploaded, stored or shared — closing the tab removes it.

Frequently asked questions

How is the GCD calculated?
With the Euclidean algorithm: repeatedly replace the larger number with the remainder of dividing it by the smaller number, until the remainder is zero. The last non-zero remainder is the GCD.
How is the LCM related to the GCD?
The LCM equals the product of the two numbers divided by their GCD, computed here with exact big-integer arithmetic so large inputs never lose precision.
What if I enter a negative number?
Magnitudes are used for the calculation, since GCD and LCM are conventionally defined for positive integers; zero is not accepted because every number divides it, so no greatest common divisor exists.