Simplifying a fraction and finding a common denominator look like unrelated problems, right up until you notice they’re solved by the exact same idea, just pointed in opposite directions.

Free math tool

GCF & LCM Calculator

For two or more numbers at once, with the prime factorization behind both results.

GCF
LCM

Runs entirely in your browser. Nothing you enter is sent anywhere.

Reading the factorization comparison

Every whole number above 1 is built from prime factors in exactly one way, that's the fundamental theorem of arithmetic. Line up two numbers' prime factorizations and the GCF is whatever they genuinely share, the LCM is everything either one of them needs. It's the same underlying comparison whether you're working with 2 numbers or 8.

GCF & LCM calculator FAQ

What is the difference between GCF and LCM?

The greatest common factor (GCF) is the largest number that divides evenly into every number in your list, useful for simplifying fractions. The least common multiple (LCM) is the smallest number that every number in your list divides evenly into, useful for finding a common denominator. GCF(12, 18) is 6; LCM(12, 18) is 36.

How does prime factorization give you the GCF and LCM?

Break each number into its prime factors, then compare them. The GCF takes only the primes that appear in every number, each raised to the smallest power it appears with anywhere. The LCM takes every prime that appears in any number, each raised to the largest power it appears with anywhere. This tool shows that comparison directly rather than just stating the two results.

Does this work for more than two numbers?

Yes, add as many numbers as you need. GCF and LCM both generalize cleanly beyond two numbers: the GCF still needs a prime in every single number to count it, and the LCM still needs the highest power of each prime found anywhere in the list.

What happens if one of the numbers is 1?

The GCF of any list that includes 1 is always 1, since 1 has no prime factors to share with anything. The LCM is unaffected by including 1, since 1 contributes no additional primes, the LCM of {1, 12} is just 12.

Is my data private?

Yes. Every calculation runs in your browser. Nothing you enter is sent to a server.

Embed this free tool on your site

Paste this where you want the tool to appear. Please keep the credit link — it is how we keep these tools free.

Free GCF & LCM calculator by ANUPRESS

One comparison, two different answers

Break any two numbers into their prime factors and line them up, and both the GCF and the LCM fall out of the same comparison. Only share the factors that show up in every number, at the smallest power any of them uses, and you get the greatest common factor: the biggest number that divides evenly into all of them. Take every factor that shows up anywhere, at the largest power it’s used, and you get the least common multiple: the smallest number all of them divide evenly into.

Why fraction simplifying needs the GCF

Reducing 18/24 to lowest terms means dividing both numbers by their greatest common factor, 6, giving 3/4. Any smaller shared factor, like 2 or 3, would simplify the fraction partway but not all the way, and any larger number wouldn’t divide both evenly at all. That’s the entire reason “find the GCF” shows up as step one in every fraction-simplifying method.

Why adding fractions needs the LCM

Adding 1/6 and 1/8 requires rewriting both with the same denominator first, and the smallest number that works is their LCM, 24, not just any common multiple like 48. Using the least common multiple keeps the numbers as small as possible throughout the calculation, which matters more the further the arithmetic goes, larger denominators compound into larger numerators fast.