LCM and GCF Calculator

The LCM and the GCF (HCF) of two or more numbers, with their prime factors.

Runs in your browser. Your files never leave your device. See how to check

…

How to do it

  1. 1
    Step 1: Open LCM and GCF Calculator and add your input

    Type your numbers or text, add your file, or pick the options you need. Nothing is uploaded: everything stays in your browser.

  2. 2
    Step 2: What LCM and GCF Calculator does

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

  3. 3
    Step 3: Read the result and compare

    The result appears at once. Change one value to see how the answer moves, then keep the figure that fits your case.

  4. 4
    Step 4: Copy or save it

    Copy the result or download it. For an important decision, confirm it with the official source or an adviser.

About this tool

Enter two or more whole numbers separated by commas or spaces. You get the greatest common factor (also called HCF or GCD), the least common multiple and the prime factorisation of each number.

When to use it

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

Tips

Use the LCM to add fractions and the GCF to simplify them.

Privacy

Everything runs in your browser, so your data is not uploaded or stored.

Methods

Find the GCF by listing common factors or dividing by common primes, and the LCM by taking each prime to its highest power. The product of two numbers equals their GCF times their LCM.

Worked example

With the boxes at their starting values (Numbers (separated by commas): 12, 18, 30), the tool shows: LCM (least common multiple): 180; 12: 2^2 × 3; 18: 2 × 3^2; 30: 2 × 3 × 5; GCF (greatest common factor): 6. Change any box to see your own numbers. The result updates as you type, and nothing leaves your browser.

Tips for best results

Check every box before you rely on a result, because one wrong digit changes the whole answer. Use the exact figures from your payslip, bill, certificate or contract, and keep a note of the date you calculated. Rates, thresholds and rules change from time to time, so for tax, fees and legal matters treat the output as an estimate and confirm with the official source named on this page. You can run as many scenarios as you like; nothing is saved or sent, and refreshing the page clears the boxes.

Quick facts

Embed this calculator on your site

Copy this code to show the calculator on your own page. A link back to shobfree.com is included.

Frequently asked questions

What is the difference between LCM and GCF?

The GCF is the largest number that divides all of them. The LCM is the smallest number that all of them divide into.

Is GCF the same as HCF?

Yes. GCF, HCF and GCD are different names for the same thing.

What is GCF?

The largest number that divides all of them.

What is LCM?

The smallest number that all of them divide.

What is the LCM of 4 and 6?

12, and their GCF is 2.

Guides for this tool

Completely freeNo cost, no sign-up
Files stay privateEverything runs in your browser
Easy in your languageAvailable in many languages