Math CalculatorsClient-Side Calculation Engine

Greatest Common Factor (GCF) Calculator

Find the GCF / HCF of two or more numbers.

Math Calculators

Greatest Common Factor (GCF) Calculator

Find the greatest common factor (GCF / HCF) of two or more numbers using prime factorization or Euclidean algorithm.

Greatest Common Factor (GCF)
12
Least Common Multiple (LCM)
144

What is the Greatest Common Factor (GCF) Calculator and How Does It Work?

The GCF Calculator (also called HCF, Highest Common Factor) finds the largest number that divides two or more numbers evenly with no remainder, using the efficient Euclidean algorithm.

Calculation Formula
GCF(a, b) = GCF(b, a mod b), repeated until the remainder is 0

The Euclidean algorithm repeatedly replaces the larger number with the remainder of dividing it by the smaller number, until the remainder reaches zero - the last non-zero remainder is the GCF.

Where:
a, b= The numbers being compared
a mod b= The remainder when a is divided by b
Worked Calculation Examples
GCF of Two Numbers
Input:24, 36
Output:12

24 = 2³×3, 36 = 2²×3²; the shared factors give GCF = 2²×3 = 12.

GCF of Three Numbers
Input:12, 18, 30
Output:6

The GCF is found pairwise: GCF(12,18)=6, then GCF(6,30)=6.

Common Real-World Use Cases

Simplifying Fractions

Divide a numerator and denominator by their GCF to reduce a fraction to its simplest form.

Dividing Items into Equal Groups

Find the largest group size that divides several different item counts evenly.

Algebra & Factoring

Factor out the greatest common factor from algebraic expressions before further simplification.

How to Use the Greatest Common Factor (GCF) Calculator
  1. 1Enter two or more numbers separated by commas or spaces.
  2. 2The calculator applies the Euclidean algorithm pairwise across all numbers.
  3. 3View the greatest common factor along with the calculation steps.
Pro Tips & Suggestions
  • •The GCF of any number and 0 is the number itself.
  • •If two numbers share no common factor besides 1, they are called "coprime" and their GCF is 1.

Frequently Asked Questions

Explore Category

Math Calculators

Essential mathematical calculators for fractions, algebra, formulas, and general math.

View All Category Tools

Related Calculators & Tools