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.
How to use the LCM/GCF calculator
- Enter two whole numbers, Number A and Number B.
- The calculator automatically works out the least common multiple and greatest common factor as you type.
- 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.
Worked example: for 12 and 18 the greatest common factor is 6, so the least common multiple is (12 × 18) ÷ 6 = 36. The relationship always holds: the product of two numbers equals their LCM multiplied by their GCF.
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.
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.