Kharabeesh
On-device ع

GCD & LCM Calculator

Find the greatest common divisor (GCD) and least common multiple (LCM) of two or more numbers, with Euclid’s algorithm steps and the prime factorization method for study.

Free, no sign-up Your data stays on your device Works offline after first open

The tool

Loading the tool…

How to use

  1. Type the numbers separated by commas or spaces (2 to 20 numbers).
  2. The GCD and LCM appear right away.
  3. Below you see Euclid’s steps and the factorization table, and for two numbers the Bézout coefficients.

Privacy & how it works

Processes your data in the browser and stores nothing.

  • Engine: lightweight in-page code, no external libraries.
  • Works offline after you open it once.

Frequently asked questions

How does Euclid’s algorithm work?

Divide the larger number by the smaller and keep the remainder, then repeat with the smaller number and the remainder until the remainder is zero. The last non-zero divisor is the GCD. For more numbers repeat it: gcd(a, b, c) = gcd(gcd(a, b), c).

How are GCD and LCM related?

For two numbers, GCD × LCM = the product of the numbers, so knowing one gives the other.

What does “coprime” mean?

Their GCD is 1: they share no factor other than 1, like 8 and 15.

Related tools