Calculators

Find shared factors and multiples

GCF and LCM calculator

Find the biggest factor the numbers share and the smallest multiple they share.

Calculated in your browser

Formula and steps included

No account. No signup.

Optional learning Learn how this math works See the formula, definitions, and step-by-step method.

Formula

GCF and LCM definitions and formula

GCF = biggest positive whole number that divides every value; for two nonzero values, LCM = their positive product / GCF

The greatest common factor (GCF) is the biggest positive whole number that divides every value evenly. It helps reduce fractions and make equal groups.

The least common multiple (LCM) is the smallest positive number found in every value's times table. With more than two numbers, combine them one pair at a time.

How to use the formula

  1. Enter whole numbers

    A negative sign does not change the positive GCF or LCM.

  2. Find the GCF

    Find the biggest positive whole number that divides every value evenly.

  3. Find the LCM

    Find the smallest positive number in every value's times table. With a longer list, combine one pair at a time.

Worked examples

GCF and LCM calculator examples

Two whole numbers

For 18 and 24, the GCF is 6. Multiply 18 × 24 to get 432, then divide 432 by 6 to get an LCM of 72.

Three whole numbers

For 8, 12, and 20, the GCF is 4 and the LCM is 120.

Common questions

GCF and LCM calculator FAQ

When should I use GCF instead of LCM?

Use GCF to split quantities into the largest equal groups or simplify a fraction. Use LCM to find the first shared cycle, common denominator, or matching interval.

What happens when one of the numbers is zero?

The GCF of zero and a nonzero whole number is that whole number without its sign. An LCM that includes zero is zero because zero appears in every whole number's times table.

Do negative integers change the GCF or LCM?

No. GCF and LCM are reported as nonnegative values, so calculations use the integers' absolute values.

Does the tool save my list of integers?

Your number list stays in your browser and is not saved by default or uploaded. Use Save on this device to keep it here, or download a backup file.