Math

GCF and LCM Calculator

Greatest common factor and least common multiple, with prime factors.

Enter your values

Results update instantly as you type — no submit needed.

Results
Greatest common factor
12
Least common multiple
360
Product of all numbers
51,840
NumberPrime factorisation
242 × 2 × 2 × 3
362 × 2 × 3 × 3
602 × 2 × 3 × 5

Quick answer

The GCF is the largest number dividing all inputs; the LCM is the smallest number all inputs divide into.

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

How to use the GCF and LCM Calculator

  1. 1Type your numbers separated by commas.
  2. 2Read the GCF and LCM.
  3. 3Check the prime factorisation table for the working.

Frequently asked questions

When do I need the LCM?

Adding fractions with different denominators, and scheduling problems where two cycles must line up.

What if the GCF is 1?

The numbers are coprime — they share no common factor, and their LCM is simply their product.