GCF & LCM
Find the greatest common factor and least common multiple using prime factorization — with the reasoning shown.
- 1
Prime factorization of each number.
24 = 2³ × 3
36 = 2² × 3²
- 2
GCF: multiply the shared primes, using the smaller power of each.
GCF = 2² × 3 = 12
- 3
LCM: multiply every prime that appears, using the larger power of each.
LCM = 2³ × 3² = 72
12
72
About the GCF & LCM Solver
Greatest common factor and least common multiple get taught as two separate procedures, but they come from the exact same prime factorization, and most students never get shown that connection. This tool factors both numbers into primes once, then builds the GCF from the shared lowest powers and the LCM from the combined highest powers, so the relationship is visible instead of assumed.
I use this whenever a student asks why GCF and LCM seem related but they were taught with totally different steps. Watching both answers come out of the same factorization usually settles it faster than I can explain it verbally.
How to use it in your classroom
- Enter two whole numbers in the input fields.
- Read the prime factorization step, which breaks both numbers down into their prime factors with exponents.
- Review the GCF step, which multiplies the lowest shared power of each common prime factor.
- Review the LCM step, which multiplies the highest power of every prime factor that appears in either number.
- Check the GCF and LCM result panels for the final values.
Tips from the classroom
- Start with two numbers that share an obvious common factor, like 24 and 36, so students can sanity-check the factorization against multiplication facts they already know.
- Try two coprime numbers, like 8 and 9, and have students predict the GCF before checking — seeing GCF equal 1 with no shared prime factors makes the term "relatively prime" concrete.
- Use a prime number as one of the two inputs and let students notice that its factorization is just itself raised to the first power.
- Connect this tool to the fraction operations explorer: the LCM it computes here is exactly the common denominator that tool needs when adding fractions.
Frequently asked questions
What happens if I enter a prime number?
Its factorization shows as just that number with no exponent, since a prime number has only itself and 1 as factors, and the tool correctly handles it in the GCF and LCM calculations.
How does the tool compute the GCF from the factorizations?
For every prime factor the two numbers share, it takes the lower of the two exponents and multiplies those together — the same logic used for the LCM but with the higher exponent of every prime that appears in either number.
Does it work with larger numbers, like three- or four-digit values?
Yes, the factorization method checks divisibility up to the square root of each number, so it handles larger inputs without slowing down or losing accuracy.
