GCD and LCM Calculator

Enter two whole numbers to find their GCD and LCM.

🔒 Your numbers stay in your browser.

How to use the gcd and lcm calculator

  1. Enter two whole numbers.
  2. Read the GCD and LCM.

GCD

The largest number that divides both. The Euclidean algorithm finds it by repeated division.

LCM

The smallest number both divide into. LCM = a x b / GCD.

Frequently asked questions

What is the GCD of 12 and 18?

Six.

Where is LCM used?

Adding fractions with different denominators.

Guides

Related free tools

See all 225 free tools →