CalcArcade.

GCF and LCM Calculator

Enter two or three positive whole numbers to find their greatest common factor and least common multiple.

Your numbers

Result

How we calculate it

The GCF is found with the Euclidean algorithm: repeatedly replace the larger number with the remainder when divided by the smaller until the remainder is zero. The last non-zero value is the GCF.

The LCM of two numbers is a × b ÷ GCF(a, b). For three numbers, the LCM of the first two is combined with the third.

Assumptions and limits

  • Only positive integers are accepted.
  • Use the GCF to simplify fractions and the LCM to find a common denominator.

Frequently asked questions

What is the GCF of 48 and 180?

It is 12, the largest number that divides both exactly.

What is the difference between GCF and LCM?

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

How do I use the LCM to add fractions?

The LCM of the denominators is the least common denominator. Convert each fraction to that denominator, then add the numerators.

Related calculators

Worked example (a fixed example using the starting numbers, it does not change as you type)

Inputs: Number 1 = 48; Number 2 = 180.

  • Greatest common factor (GCF) 12
  • Least common multiple (LCM) 720

Embed this calculator

Add this calculator to your own page. Paste the code where you want it. The small link keeps credit to the source.

More math calculators

Last reviewed: . Formulas and assumptions are described on our methodology page. For information only; not professional advice.