Number Theory

LCM & GCF Calculator — Least Common Multiple & Greatest Common Factor

Enter two or more positive whole numbers to instantly find both their Least Common Multiple (LCM) and Greatest Common Factor (GCF).

Advertisement

🔢 Enter Whole Numbers

fa-chart-simple Result

Enter at least 2 whole numbers to find LCM and GCF
⚠️

Disclaimer: This tool performs standard mathematical calculations for educational and reference purposes. Always double-check results independently for graded coursework, exams, or safety-critical applications.

LCM and GCF Explained

The Greatest Common Factor (GCF) — also called the Greatest Common Divisor (GCD) — is the largest number that divides evenly into all of your input numbers. The Least Common Multiple (LCM) is the smallest number that all your input numbers divide into evenly. They're two sides of the same coin and both come up constantly when simplifying fractions, finding common denominators, and scheduling repeating events.

How This Calculator Solves It

GCF is computed using the Euclidean algorithm (repeated division with remainder), which is far faster than listing every factor for large numbers. LCM is then derived from GCF using the identity LCM(a,b) = |a × b| / GCF(a,b), extended across all your numbers pairwise.

Worked Example

Find the LCM and GCF of 12, 18, and 24.

  1. Step 1 — GCF: GCF(12,18) = 6, then GCF(6,24) = 6, so the overall GCF = 6
  2. Step 2 — LCM: LCM(12,18) = 36, then LCM(36,24) = 72, so the overall LCM = 72

Frequently Asked Questions

None — they're the same concept with two different names. "Greatest Common Factor" and "Greatest Common Divisor" both refer to the largest number that divides evenly into every number in your list.
LCM and GCF are defined for integers — the concept of "divides evenly" only makes sense for whole numbers. Decimals or fractions don't have a meaningful GCF/LCM in the traditional sense.
Then their GCF is 1, and they're called "coprime" or "relatively prime." In that case, their LCM is simply the product of the two numbers, since nothing smaller can be evenly divided by both.
Advertisement