Popular: 1/2 + 3/4 20% of 150 GCF(12, 18) 100 ÷ 7 √144 Circle r=7 sin(30°) 255 in Binary
First Number: Second Number:

About the GCF and LCM Calculator

The Greatest Common Factor (GCF)β€”also called the Greatest Common Divisor (GCD) or Highest Common Factor (HCF)β€”is the largest positive integer that divides two numbers without a remainder. The Least Common Multiple (LCM) is the smallest positive integer that is divisible by both numbers.

Our GCF & LCM Calculator computes both values simultaneously, lists all factors of each input, and demonstrates the fundamental product relationship between GCF and LCM.

GCF and LCM Mathematical Formulas

For any two positive integers a and b:

Euclidean Algorithm for GCF: GCF(a, b) = GCF(b, a mod b)
LCM via GCF Formula: LCM(a, b) = (a Γ— b) Γ· GCF(a, b)
Product Identity: GCF(a, b) Γ— LCM(a, b) = a Γ— b

How to Find the GCF and LCM of Two Numbers

  1. List the Factors to Find the GCF: Write down all divisors of a and all divisors of b. The largest number appearing in both lists is the GCF.
  2. Multiply the Two Numbers Together: Calculate the product a Γ— b.
  3. Divide by the GCF to Find the LCM: Divide (a Γ— b) by GCF(a, b) to get the exact Least Common Multiple.

Worked Example: For 12 and 18, the common factors are 1, 2, 3, and 6, so GCF = 6. Then LCM = (12 Γ— 18) Γ· 6 = 216 Γ· 6 = 36.

Frequently Asked Questions (FAQ)

When should I use GCF vs. LCM in fraction problems?

Use the GCF when simplifying (reducing) a fraction to lowest terms. Use the LCM (also called the Least Common Denominator, LCD) when adding or subtracting fractions with different denominators.

What is the GCF and LCM of two prime numbers?

For any two distinct prime numbers p and q, their GCF is always 1, and their LCM is always their product (p Γ— q).

All-in-One Math Calculators by Category All Solved Math Problems →

Popular Step-by-Step Solved Problems Full Directory →