🔍

GCF Calculator

Find the Greatest Common Factor (GCF) and Least Common Multiple (LCM) of up to 10 numbers with step-by-step Euclidean algorithm.

GCF & LCM Results

Numbers -
GCF (Greatest Common Factor) 0
LCM (Least Common Multiple) 0

Step-by-Step Euclidean Algorithm

How to Use the GCF Calculator

  1. Enter up to 10 numbers separated by commas or spaces.
  2. Click "Calculate GCF & LCM" to find the results.
  3. Review the GCF (largest number that divides all inputs evenly).
  4. Review the LCM (smallest number that is a multiple of all inputs).
  5. See the step-by-step Euclidean algorithm for the calculation.

Formulas Used

Euclidean Algorithm for GCF:

For two numbers a and b (a > b):

GCF(a, b) = GCF(b, a mod b)

Repeat until b = 0, then GCF = a

For multiple numbers:

GCF(a, b, c) = GCF(GCF(a, b), c)

LCM using GCF:

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

LCM(a, b, c) = LCM(LCM(a, b), c)

Frequently Asked Questions

What is GCF?

GCF (Greatest Common Factor), also called GCD (Greatest Common Divisor), is the largest positive integer that divides all given numbers without a remainder. It's useful for simplifying fractions and solving problems involving divisibility.

What is LCM?

LCM (Least Common Multiple) is the smallest positive integer that is a multiple of all given numbers. It's used when finding common denominators for fractions, scheduling recurring events, or solving problems involving periodic phenomena.

How does the Euclidean algorithm work?

The Euclidean algorithm repeatedly replaces the larger number with the remainder of dividing it by the smaller number. This process continues until the remainder is zero. The last non-zero remainder is the GCF. It's one of the oldest known algorithms.

What if one of the numbers is zero?

The GCF of zero and any number n is n (the non-zero number). The LCM of zero and any number is undefined (or zero, depending on definition). Our calculator handles zero appropriately in GCF calculations.

Can I use negative numbers?

Yes, the calculator works with negative numbers. The GCF is always positive (by convention). The LCM is also positive. The algorithm uses absolute values for calculations, so -12 and 18 have the same GCF as 12 and 18.