LCM and GCD Calculator

Find the least common multiple and greatest common divisor of numbers.

Related Tools

0 comments

How it works

Enter two or more whole numbers and the tool finds their greatest common divisor (the largest number that divides them all) using the Euclidean algorithm, and their least common multiple (the smallest number they all divide into) via the relationship LCM(a,b) = a × b / GCD(a,b). For more than two numbers it applies these pairwise. GCD is also called HCF or GCF. All math runs locally with exact integer arithmetic.


              LCM(a,b) = a × b / GCD(a,b)
            

Common use cases

  • Finding a common denominator to add fractions.
  • Reducing a fraction by its greatest common divisor.
  • Scheduling events that repeat on different cycles.

Frequently asked questions

Is GCD the same as HCF or GCF?

Yes. Greatest common divisor (GCD), highest common factor (HCF), and greatest common factor (GCF) are three names for the same thing — the largest number that divides all the inputs.

Can it handle more than two numbers?

Yes. It computes the GCD and LCM across the whole list by applying the two-number rules pairwise.

How is the LCM found?

From the GCD: the LCM of two numbers equals their product divided by their GCD, which avoids listing multiples.