Find the greatest common factor and least common multiple of two or more integers, with prime factorizations and the product of all values. Free and instant.

Enter two or more positive whole numbers, separated by commas or spaces.
GCF (HCF)
LCM
Count
Product of all
Prime factorization
The GCF is found with the Euclidean algorithm; the LCM is computed pairwise as product ÷ GCF. Only positive whole numbers are used.

About GCF & LCM Calculator

The GCF & LCM Calculator finds the greatest common factor (also called HCF) and the least common multiple of two or more positive integers at once. It also shows each number’s prime factorization and the product of all the values you entered.

The GCF is computed with the Euclidean algorithm — repeatedly replacing the larger number with the remainder of dividing it by the smaller until nothing remains. The LCM is then derived pairwise using the identity LCM(a, b) = a × b ÷ GCF(a, b), extended across your whole list.

You need the GCF to simplify fractions and split things into equal groups, and the LCM to find common denominators or when repeating cycles align. Enter as many integers as you like; results are free and instant in your browser.

How to use GCF & LCM Calculator

  1. Type two or more positive whole numbers, separated by commas or spaces — e.g. 12, 18, 24.
  2. Read the GCF (HCF) and the LCM, computed live.
  3. Check the prime factorization of each number to see why.
  4. Note the count and the product of all values for reference.

Frequently asked questions

The largest integer that divides all your numbers exactly. For 12, 18 and 24 it is 6. It is also called the greatest common divisor (GCD) or highest common factor (HCF) — identical concepts.

The LCM is the smallest number that all your values divide into evenly — for 4 and 6 it is 12. It is what you need for common denominators and for finding when repeating events coincide.

Divide the larger number by the smaller and keep the remainder; repeat with the smaller number and that remainder until the remainder is zero. The last non-zero remainder is the GCF — fast even for huge numbers.

For two numbers, GCF × LCM = a × b. The calculator exploits this: once the GCF is known, LCM = a × b ÷ GCF, applied pairwise across all the integers in your list.

No — GCF and LCM are defined for positive whole numbers, so the tool uses only the positive integers in your input. Convert measurements to whole units (e.g. millimeters) first if needed.

Need help?
Found an issue with this tool? Let our team know.
Report an issue

Add this free tool to your own website — copy and paste the code below.