cv.cm
All lessons

Math and school

How to find the LCM and GCF

You are adding fractions, simplifying one, or working out when two schedules line up. You will learn which of the two you need, find it by hand with prime factors, and check it with exact maths in your browser.

6-minute read

Today's result The GCF and LCM of 2 to 20 whole numbers, with the prime factors and, for two numbers, Euclid's steps.

GCF is also called GCD or HCF, and they all mean the same thing. The LCM of two fractions' denominators is their lowest common denominator.

Open LCM and GCF calculator
Contents
  1. Choose the one you need

    Use the GCF to split into equal groups or simplify a fraction: 12/18 divided by 6 is 2/3. Use the LCM to find when things line up or to add fractions: buses every 12 and 18 minutes meet every 36 minutes.

  2. Open the LCM and GCF calculator on cv.cm

    Type 2 to 20 whole numbers separated by commas or spaces, or tap an example such as 8, 12. Do not use thousands separators, as a comma always starts a new number.

    Open LCM and GCF calculator
  3. Compare the prime factors

    Write each as primes: 12 = 2² × 3 and 18 = 2 × 3². GCF takes each shared prime at its lowest power, 2 × 3 = 6. LCM takes every prime at its highest power, 2² × 3² = 36.

    Shared primes make the GCF; all the primes together make the LCM.
    Shared primes make the GCF; all the primes together make the LCM.
  4. Use Euclid's algorithm for big numbers

    Divide the larger by the smaller and keep the remainder, then repeat with the divisor and the remainder. 18 = 1 × 12 + 6, and 12 = 2 × 6 + 0. The last divisor, 6, is the GCF. The page shows these steps for two numbers.

    Each line divides by the last remainder until nothing is left.
    Each line divides by the last remainder until nothing is left.
  5. Check with LCM × GCF

    For two numbers, LCM × GCF equals the two numbers multiplied: 36 × 6 = 12 × 18 = 216. That lets you get the LCM straight from the GCF. This shortcut does not work for three or more numbers.

  6. Read the result and copy it

    The page lists both results and the prime factors of each number. Coprime: Yes means the GCF is 1, so no prime divides all of them. For two numbers, the LCM is then their product; with three or more it can be smaller (6, 10, 15 has an LCM of 30). Copy result sends the answer to your clipboard.

FAQ

What is the difference between GCF, GCD and HCF?

None. Greatest common factor, greatest common divisor and highest common factor are three names for the same number.

What are the LCM and GCF of 12 and 18?

The GCF is 6 and the LCM is 36. Check: 6 × 36 = 216, which is 12 × 18.

How does the LCM help me add fractions?

It gives the smallest shared denominator. For 1/12 + 1/18, use 36: 3/36 + 2/36 = 5/36.

What does coprime mean?

Two numbers are coprime when their GCF is 1, such as 8 and 15. Neither has to be prime; they just share no prime factor.

Why did 1,500 turn into two numbers?

A comma separates numbers here, so 1,500 reads as 1 and 500. Type 1500 without the separator.