GCF & LCM Calculator

Find the greatest common factor (GCF) and least common multiple (LCM) of two or more numbers.

Enter 2–10 numbers separated by commas: 12, 18, 24

Your result will appear here

Fill in the fields and press Calculate.

The GCF and LCM find the "common language" of numbers: the greatest common factor (GCF) is the largest number that divides them all, and the least common multiple (LCM) is the smallest number they all divide into. From simplifying fractions to solving problems, from gear ratios to repeating schedules, they come up everywhere — and they are two sides of one coin.

Enter 2 to 10 numbers separated by commas, and the GCF and LCM are calculated instantly, with their classic relationship as a check.

How is it calculated?

Definitions

  • GCF (greatest common factor): the largest number that divides all the given numbers with no remainder.
  • LCM (least common multiple): the smallest positive number that all the given numbers divide into evenly.

Finding them with prime factorization

Break each number into prime factors: - GCF = product of the common prime factors raised to their SMALLEST exponents - LCM = product of all prime factors raised to their LARGEST exponents

For 24 = 2³ × 3 and 36 = 2² × 3²: GCF = 2² × 3 = 12; LCM = 2³ × 3² = 72.

The golden identity (check)

For two numbers: GCF × LCM = the product of the numbers. For 24 and 36, 12 × 72 = 864 = 24 × 36. This holds only for two numbers; the tool shows it for two-number input. With more than two numbers, GCF and LCM are each found over all the numbers.

Where it is used

  • GCF: simplifying fractions, splitting a quantity into the largest equal parts, reducing a common denominator.
  • LCM: common denominators for fractions, when periodic events coincide (two buses leaving at the same time), gear and lap calculations.

Worked example

Take 24 and 36: 24 = 2³ × 3, 36 = 2² × 3². Using the smallest exponents of the common factors, GCF = 2² × 3 = 12; using the largest exponents of all factors, LCM = 2³ × 3² = 72. Check: 12 × 72 = 864 and 24 × 36 = 864 — an exact match. If you went to three numbers and entered 12, 18, 30, the GCF would be 6 (the largest number dividing all three); this time the product identity does not apply, because that rule is only for two numbers.

FAQ

How are the GCF and LCM calculated?+

By prime factorization. The GCF is the product of the common prime factors at their smallest exponents; the LCM is the product of all prime factors at their largest exponents. The tool does this for 2–10 numbers.

What is the difference between GCF and LCM?+

The GCF is the largest number that divides the given numbers (smaller than their product); the LCM is the smallest number they divide into (at least as large as the biggest number). GCF is a division problem, LCM a multiple problem.

Is GCF × LCM = the product of the numbers always true?+

Only for TWO numbers: GCF × LCM = a × b. With more than two numbers the identity generally fails; each is computed separately.

Can I find the GCF and LCM of more than two numbers?+

Yes — the tool accepts 2 to 10 comma-separated numbers. The GCF is the largest number dividing all of them; the LCM is the smallest number they all divide into.

How is the GCF used to simplify a fraction?+

Divide the numerator and denominator by their GCF: for 24/36 the GCF is 12, so 24÷12 / 36÷12 = 2/3 in lowest terms.

Why is "when do two buses leave together" an LCM problem?+

If one leaves every 24 minutes and the other every 36, the first time they coincide is the LCM of those intervals: minute 72. Coinciding periodic events are always found with the LCM.