🔢 GCF & LCM Calculator

Find the greatest common factor and least common multiple of two or more numbers, with prime factorizations.

How the GCF & LCM Calculator Works

Enter two or more positive whole numbers. The calculator finds:

It also shows the prime factorization of each number. The GCF takes each shared prime at its lowest power; the LCM takes every prime at its highest power.

Formula

GCF(a, b): Euclid's algorithm — replace (a, b) with (b, a mod b) until b = 0; the GCF is a
LCM(a, b) = a × b / GCF(a, b)
For more numbers: GCF(a, b, c) = GCF(GCF(a, b), c)   and   LCM(a, b, c) = LCM(LCM(a, b), c)

How to Use It

  1. Enter two or more positive whole numbers separated by commas or spaces.
  2. Read the GCF and LCM.
  3. Check the prime factorization of each number to see how the results are built.

Frequently Asked Questions

What is the difference between GCF and LCM?

The GCF is the largest number that divides all the given numbers; the LCM is the smallest number that all the given numbers divide into. For 12 and 18: GCF = 6 and LCM = 36.

Are GCF, GCD, and HCF the same thing?

Yes. Greatest common factor (GCF), greatest common divisor (GCD), and highest common factor (HCF) are three names for the same value; the name used depends on the country and textbook.

What is the LCM used for?

It gives the lowest common denominator when adding fractions, and it answers repetition problems — for example, two buses leaving every 12 and 18 minutes leave together again every 36 minutes.

Related Calculators

Formula and content last reviewed: September 2026. All calculations run in your browser — nothing you enter is sent to or stored on our servers.

⚠️ This calculator is for general informational and educational purposes only. It does not constitute financial, tax, legal, or other professional advice, and results are estimates that may not reflect your exact situation. GelirLab.com and its owners accept no liability or responsibility for any decision made or action taken based on this tool. Always consult a qualified professional (CPA, financial advisor, or attorney) before making financial decisions.
Spotted a wrong result or outdated figure? Let us know — it helps keep every calculator accurate. 🚩 Report a problem

More Education calculators

See all →

✔ Reviewed by GelirLab Editöryal Ekibi · Last reviewed: September 2026 · How we check our calculators

🔗 Embed this calculator on your website

Free for blogs, news sites and schools. Paste this code into your page; the calculator stays up to date automatically.