GCF & LCM Calculator

Greatest common factor and least common multiple of two numbers.

Greatest common factor (GCF)
6
  1. Greatest common factor (GCF)6
  2. Least common multiple (LCM)36
Inputs used
  • First number12
  • Second number18

About this calculator

The greatest common factor (GCF, also called GCD or HCF) is the largest number that divides both values exactly: for 12 and 18 it's 6. The least common multiple (LCM) is the smallest number both divide into: for 12 and 18 it's 36.

The two are linked: GCF × LCM = the product of the two numbers, which is how this calculator's results always multiply back to your inputs. GCF is what you use to simplify fractions; LCM is what you need to add them — the least common denominator is exactly the LCM of the denominators.

Numbers whose GCF is 1 (like 8 and 15) are called coprime — they share no factors, and their LCM is simply their product.

Frequently asked questions

What is the difference between GCF and LCM?

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

How are the GCF and LCM related?

Their product equals the product of the two original numbers: GCF × LCM = a × b. For 12 and 18, 6 × 36 = 216, which is exactly 12 × 18.

What does it mean for two numbers to be coprime?

Coprime numbers share no common factor other than 1, so their GCF is 1. 8 and 15 are coprime, which makes their LCM simply their product, 120.

How do GCF and LCM help with fractions?

The GCF simplifies a fraction — divide the numerator and denominator by it. The LCM of the denominators gives the least common denominator needed to add or subtract fractions.

Embed this calculator on your site

Paste this HTML where you want the calculator to appear. It stays free, works on any site, and updates automatically. Adjust the height to taste.

Results are informational only — not financial, medical or legal advice.