🌳 GCF & LCM Explorer

Find Greatest Common Factors & Least Common Multiples · Factor lists and prime factors · Grades 4–6

FIRST NUMBER
and
SECOND NUMBER

🟢🔵 Prime Factor Venn Diagram

Each number is broken into primes. Primes they share go in the middle. Multiply the middle for the GCF; multiply everything for the LCM.

GCF — Greatest Common Factor
The biggest number that divides evenly into both numbers. Used to simplify fractions!
Example: GCF(12, 18) = 6
LCM — Least Common Multiple
The smallest number that both numbers divide into evenly. Used to add fractions!
Example: LCM(12, 18) = 36
🎯 Quick Quiz!

What the Explorer Shows

Type two whole numbers. As you type, two result boxes update with the greatest common factor (GCF) and least common multiple (LCM). Underneath, the tool lists every factor of each number, highlights the factors they share, shows each number's prime factorization, and works out the LCM with the formula LCM = (a × b) ÷ GCF. A prime factor Venn diagram puts the primes the two numbers share in the middle: multiply the middle to get the GCF, and multiply everything in the diagram to get the LCM. A four-question quiz below loops with instant feedback.

Worked Example: 12 and 18

Story Problems That Use Each One

ProblemWhich?Answer
24 red and 36 blue marbles go into identical bags with none left over. What is the most bags you can make?GCFGCF(24, 36) = 12 bags, each with 2 red and 3 blue
Hot dogs come in packs of 10 and buns in packs of 8. What is the fewest of each you can buy to match exactly?LCMLCM(10, 8) = 40: 4 packs of hot dogs, 5 packs of buns
A 12 ft by 18 ft floor gets the largest square tiles that fit with no cutting. How long is each side?GCF6 ft tiles, 2 by 3 = 6 tiles
One light blinks every 4 seconds, another every 6. They blink together now. When is the next time?LCMLCM(4, 6) = 12 seconds

Where Students Get Mixed Up

Using GCF and LCM With Fractions

These two ideas are the engine behind fraction work. To simplify 18/24, divide both parts by GCF(18, 24) = 6 to get 3/4. To add 1/4 + 1/6, use the LCM of the denominators, 12, as the common denominator: 3/12 + 2/12 = 5/12. The Fraction Visualizer shows both on a bar.

Practice Ideas

Standards

GCF and LCM: FAQ

How do I know whether a problem needs the GCF or the LCM?

Ask whether you are splitting things into groups or waiting for things to line up. Splitting into the largest equal groups, or cutting the biggest equal pieces, uses the GCF. Finding when two repeating events happen together, or the smallest amount you can share both ways, uses the LCM.

Why does LCM = (a × b) ÷ GCF work?

Multiplying a × b counts the shared prime factors twice. Dividing by the GCF removes one copy. For 12 and 18: 12 × 18 = 216, the GCF is 6, and 216 ÷ 6 = 36.

What is the GCF of two prime numbers?

1, unless they are the same prime. Numbers whose GCF is 1, like 8 and 15, are called relatively prime, and their LCM is just their product (8 × 15 = 120).

How big can the numbers be?

Any whole number from 1 to 1,000,000,000,000 works. That covers every Common Core example (Grade 6 uses GCFs of numbers up to 100 and LCMs of numbers up to 12). For very big numbers with many factors, the factor lists are shortened, but the GCF, LCM and prime factors are always exact.

Sources

Last reviewed: November 2026 · CCSS 4.OA.B.4, 6.NS.B.4

🌟 Keep Exploring
🔢Prime Sieve 🥧Fraction Visualizer ⭕Venn Diagram 📈6th Grade Math