Skip to content

GCF and LCM Calculator

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

Reviewed by James Whitfield · How we check our maths

Your values

ⓘ Live results

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.

The formula

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

Worked example

Worked example

Using the values the calculator loads with.

Inputs

  • Numbers (comma separated)24, 36, 60

Result

  • Greatest common factor12
  • Least common multiple360
  • Product of all numbers51,840

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.

About this calculator