Share
WhatsAppFacebookX (Twitter)TelegramLinkedInE-mail
EN
EnglishPortuguêsEspañolFrançais
← BackHome › Everyday › GCF and LCM Calculator

GCF and LCM Calculator

By the CalcMundi team · Updated October 22, 2026 · Formulas checked against standard financial math

Enter two to four whole numbers to get their GCF and LCM, with the prime factors of each number.

How it is calculated

The GCF (also called GCD) is the largest number that divides all of them; we use Euclid’s algorithm. The LCM is the smallest number that all of them divide; for two numbers, LCM = a × b ÷ GCF.

Example

12, 18 and 30: 12 = 2² × 3, 18 = 2 × 3², 30 = 2 × 3 × 5. The GCF is 6 and the LCM is 180.

Frequently asked questions

What is the LCM used for?

Adding fractions with different denominators, and finding when repeating events line up again.

See also

Add this calculator to your website

Free for blogs, real estate agents, brokers and any site. Paste this code where you want the calculator to appear. It adjusts its height on its own.

Results are estimates for information only and are not financial, legal or medical advice. Rates, taxes and fees vary — confirm with a professional or your lender.