GCF & LCM Calculator

Find the greatest common factor and least common multiple of two numbers.

GCF (HCF)
LCM

How to find the GCF and LCM

The greatest common factor (GCF) is the largest number that divides evenly into two numbers. The least common multiple (LCM) is the smallest number both divide into. This calculator finds both at once, which is handy for simplifying fractions (GCF) and finding common denominators (LCM).

Worked example

For 12 and 18: the GCF is 6, the biggest number that divides both, and the LCM is 36, the smallest number both go into.

The difference

GCF is about what divides into the numbers, so it is never larger than the smaller number. LCM is about what the numbers divide into, so it is never smaller than the larger number. GCF simplifies; LCM combines.

Frequently asked questions

What is the difference between GCF and LCM?

GCF is the largest number that divides into both numbers; LCM is the smallest number both divide into. GCF simplifies fractions; LCM finds common denominators.

What is the GCF of 12 and 18?

6, because 6 is the largest number that divides evenly into both 12 and 18. Their LCM is 36.

What is the difference between GCF and HCF?

They are the same thing. GCF (greatest common factor) and HCF (highest common factor) are two names for it.

How are GCF and LCM related?

For any two numbers, GCF times LCM equals the product of the numbers.

Does it work for more than two numbers?

This version takes two. For more, find the GCF or LCM of the first two, then combine with the next.

Was this calculator helpful?

Related calculators

More Math calculators

Embed this calculator on your website (free)

Paste this into your page. It stays up to date and links back to us.

<iframe src="https://calculatorden.com/embed/gcf-lcm-calculator/" width="100%" height="540" loading="lazy" style="border:1px solid #e5e7eb;border-radius:12px;max-width:480px" title="GCF & LCM Calculator - Calculator Den"></iframe>

More tools to embed on our embed a calculator page.