Home / Calculators / Tool

GCF & LCM Calculator

Find factors and common multiples.

✦ Interactive calculatorFree · No sign-up

Enter two safe integers (positive, negative or zero). Decimals are not accepted; GCF(0,0) is undefined.

YOUR RESULT
Ready to calculate
Enter your values and choose Calculate.

Results are calculated locally in your browser. Verify critical calculations independently.

How to use this calculator

Enter two integers and select Calculate. This tool displays both their greatest common factor (GCF) and least common multiple (LCM) together; there is no mode selector.

  • Enter the first whole number in First integer and the second in Second integer.
  • Select Calculate; the result displays GCF and LCM at the same time.
  • Compare the two numbers and their common factors to check your answer.

Formula and worked example

For nonzero integers: LCM(a,b) = |a × b| ÷ GCF(a,b).

Example: GCF(8, 12) = 4; LCM(8, 12) = |8 × 12| ÷ 4 = 24.

Input requirements and limitations

Only safe whole numbers are accepted, not decimals. The GCF of 0 and 0 is undefined; an input of zero yields an LCM of zero by convention.

Related calculators