MathPath
Grades 1–13 Math Hub
Interactive Math Tool & Complete Study Guide

GCF & LCM Calculator

Find Greatest Common Factor (GCF/GCD), Least Common Multiple (LCM/LCD), and prime factorizations with steps. Complete with step-by-step calculation breakdown, plain-English how-to guides, worked examples, common mistakes to avoid, practice questions, and printable worksheets.

Quick Try:
Jump to Guide: How to Find the GCF (Greatest Common Factor)How to Find the LCM (and Fraction LCD)Worked ExamplesCommon MistakesRelated Worksheets

Key Formulas & Rules

GCF × LCM Identity (2 Numbers)

$$\text{GCF}(a, b) \times \text{LCM}(a, b) = a \times b$$

Euclidean Algorithm

$$\gcd(a, b) = \gcd(b,\; a \bmod b)$$

Coprime Numbers Rule

$$\gcd(a, b) = 1 \implies \text{LCM}(a, b) = a \times b$$

GCF vs. LCM: When to Use Each in Math

ConceptAlso Known AsSize Compared to InputsPrimary Use Case
GCFGCD / HCFAlways $\le$ smallest inputSimplifying fractions & factoring out common terms
LCMLCD (for denominators)Always $\ge$ largest inputAdding/subtracting unlike fractions & repeating cycle problems

How to Find the GCF (Greatest Common Factor)

The GCF is the largest positive integer that divides every number in your set with zero remainder.

  1. Step 1 — Prime-factorize each number: Break $12 = 2^2 \times 3$ and $18 = 2 \times 3^2$.
  2. Step 2 — Pick ONLY shared primes with the LOWEST exponent: Both share $2^1$ and $3^1$.
  3. Step 3 — Multiply them together: $\text{GCF}(12, 18) = 2 \times 3 = 6$.

How to Find the LCM (and Fraction LCD)

The LCM is the smallest positive multiple shared by all numbers—when the inputs are fraction denominators, the LCM is called the Least Common Denominator (LCD).

  1. Step 1 — Prime-factorize each number: $12 = 2^2 \times 3$ and $18 = 2 \times 3^2$.
  2. Step 2 — Pick EVERY prime present with its HIGHEST exponent: $2^2$ and $3^2$.
  3. Step 3 — Multiply: $\text{LCM}(12, 18) = 4 \times 9 = 36$.

Step-by-Step Worked Examples

Worked Example 1

Find GCF and LCM of 12 and 18

$12 = 2^2 \cdot 3$, $18 = 2 \cdot 3^2$. $\text{GCF} = 2 \cdot 3 = 6$; $\text{LCM} = 2^2 \cdot 3^2 = 36$.

Worked Example 2

Find the LCD of $\frac{5}{8}$ and $\frac{7}{12}$

$8 = 2^3$ and $12 = 2^2 \cdot 3$, so $\text{LCD} = \text{LCM}(8, 12) = 2^3 \cdot 3 = 24$.

Worked Example 3

Find GCF and LCM of 24, 36, and 60

$24 = 2^3\cdot 3$, $36 = 2^2\cdot 3^2$, $60 = 2^2\cdot 3\cdot 5$. $\text{GCF} = 2^2\cdot 3 = 12$; $\text{LCM} = 2^3\cdot 3^2\cdot 5 = 360$.

Worked Example 4

Simplify $\frac{42}{56}$ using GCF

$\text{GCF}(42, 56) = 14$. Divide top and bottom by $14$ to get $\frac{3}{4}$.

Common Mistakes & How to Avoid Them

Common Mistake #1

Confusing GCF and LCM

Remember: Factors are Few and smaller ($\le$ inputs), while Multiples are Many and larger ($\ge$ inputs).

Common Mistake #2

Taking the highest power for GCF instead of the lowest

For GCF, a factor must divide ALL numbers, so you can only take the smallest power present in every factorization.

Common Mistake #3

Assuming LCM is always the product $a \times b$

$\text{LCM}(6, 8) = 24$, not $48$. Multiplying gives a common multiple, not necessarily the LEAST common multiple.

Quick Practice Questions (Check Your Understanding)

Try solving these on scratch paper first, then expand each card to verify your steps.

Practice #1: Practice Problem 1: Find GCF and LCM of 12 and 18

Solution: $12 = 2^2 \cdot 3$, $18 = 2 \cdot 3^2$. $\text{GCF} = 2 \cdot 3 = 6$; $\text{LCM} = 2^2 \cdot 3^2 = 36$.

Practice #2: Practice Problem 2: Find the LCD of $\frac{5}{8}$ and $\frac{7}{12}$

Solution: $8 = 2^3$ and $12 = 2^2 \cdot 3$, so $\text{LCD} = \text{LCM}(8, 12) = 2^3 \cdot 3 = 24$.

Practice #3: Practice Problem 3: Find GCF and LCM of 24, 36, and 60

Solution: $24 = 2^3\cdot 3$, $36 = 2^2\cdot 3^2$, $60 = 2^2\cdot 3\cdot 5$. $\text{GCF} = 2^2\cdot 3 = 12$; $\text{LCM} = 2^3\cdot 3^2\cdot 5 = 360$.

Frequently Asked Questions

What is the difference between GCF and GCD?
They are the exact same concept: Greatest Common Factor (GCF) and Greatest Common Divisor (GCD) both mean the largest whole number that divides all given integers evenly.
How is LCM related to LCD in fractions?
The Least Common Denominator (LCD) of two fractions is simply the Least Common Multiple (LCM) of their denominators.