LCM/GCF Calculator

Find the least common multiple (LCM) and greatest common factor (GCF) of two numbers, plus the ratio between them simplified to its lowest terms.

Least common multiple (LCM)
36
LCM of 12 and 18
Greatest common factor (GCF)
6
Simplified ratio A:B
2 : 3
Embed on your website →

How to use the LCM/GCF calculator

  1. Enter two whole numbers, Number A and Number B.
  2. The calculator automatically works out the least common multiple and greatest common factor as you type.
  3. Below that, it also shows the ratio between the two numbers, simplified to its lowest terms.

What are LCM and GCF?

The greatest common factor (GCF) is the largest number that divides both numbers evenly. For 12 and 18, the GCF is 6, since 6 is the highest number that divides both 12 and 18 evenly. The least common multiple (LCM) is the smallest number that both numbers divide into. For 12 and 18, the LCM is 36.

LCM(a, b) = (a × b) ÷ GCF(a, b)

A concrete example: if you're adding the fractions 1/12 and 1/18, you need a common denominator — and the smallest possible common denominator is exactly the LCM of 12 and 18, i.e. 36. If instead you want to simplify a fraction like 12/18, you divide the numerator and denominator by the GCF (6), giving 2/3.

Note: LCM and GCF are undefined if one of the numbers is 0 — the calculator then shows "Undefined".
Ad space — reserved for future partners

Frequently asked questions

What is the least common multiple used for?

LCM is used, among other things, to find a common denominator when adding or subtracting fractions with different denominators. It's also used to figure out when two events that happen at regular intervals will coincide.

What's the difference between GCF and LCM?

GCF (greatest common factor) is the largest number that divides both numbers evenly, and is used to simplify fractions. LCM (least common multiple) is the smallest number that both numbers divide into, and is used to find common denominators.

How does this connect to fraction math?

GCF is used to simplify a fraction to its lowest terms, by dividing the numerator and denominator by the GCF. LCM is used to find the least common denominator when adding or subtracting fractions with different denominators.

Embed this calculator on your website

Copy the code below to show this calculator directly on your blog or website — completely free.