Find your calculator

Use arrow keys, Enter to open, Escape to close.

Browse the full directory
Math & Numbers / Free online tool

GCF & LCM Calculator

Find the greatest common factor and least common multiple of integers.

Your inputs

Try a worked example

12,18,24 have GCF 6 and LCM 72.

Calculated in your browser. Your inputs stay on this device.

Starting values are examples. First click or keyboard focus clears an example so you can enter yours. Reset restores the examples.

Your result

Enter your values to calculate.

Compare scenarios

Keep up to three results and their inputs during this visit. Reset clears the comparison.

Behind the answer

LCM(a,b) = |(a ÷ GCF(a,b)) × b|

How to use this calculator

GCF is the largest integer that divides every input. LCM is the smallest nonnegative common multiple. Results list prime factorizations for up to 50 inputs whose magnitude is at most one billion; larger values still use the safe-integer Euclidean calculation.

  1. Enter main result, whole numbers and review the remaining options.
  2. Select Calculate or change a value to update the result. Read the result label and units before copying.
  3. Use Reset to restore the worked starting values.

Formula and method

LCM(a,b) = |(a ÷ GCF(a,b)) × b|

Safe integers only. The LCM of a list containing zero is zero.

Worked example

12, 18, 24 have GCF 6 and LCM 72.

Questions about gcf & lcm calculator

How are GCF and LCM different?

GCF divides every input; LCM is a common multiple of the inputs. For 12 and 18, GCF is 6 and LCM is 36. The tool uses integer division methods, and a list containing zero has LCM zero.

What assumptions should I check?

Safe integers only. The LCM of a list containing zero is zero.

Are my inputs saved?

Calculations run in your browser. We store only tool IDs for favorites and recent tools. A calculation link contains your inputs only when you explicitly choose to copy one.