GCF Calculator (Greatest Common Factor)

Quick answer

The GCF calculator finds the greatest common factor, also called the greatest common divisor, of up to three whole numbers using Euclid’s algorithm. It also shows the least common multiple of the first two.

Greatest common factor
—
LCM of first two
—

The greatest common factor is the largest number that divides each input exactly. It is used to simplify fractions and split items into equal groups.

How to use the GCF Calculator

  1. First number
  2. Second number
  3. Third number (optional, 0 to skip)

Results update as you type, and every field accepts the units shown in its menu.

How it works

Euclid’s algorithm repeatedly replaces the larger number with the remainder of dividing it by the smaller one.

Inputs explained

Field What to enter
First number A number
Second number A number
Third number (optional, 0 to skip) A number

Formula

gcd(a, b) = gcd(b, a mod b), until the remainder is 0

Worked example

Inputs — First number: 84; Second number: 126; Third number (optional, 0 to skip): 210.
Results — Greatest common factor = 42; LCM of first two = 252.

Key terms

Divisor
A number that divides another exactly.

Frequently asked questions

What if the GCF is 1?

The numbers are relatively prime.

Does it work with decimals?

No, inputs are rounded to whole numbers.

What formula does the GCF Calculator use?

gcd(a, b) = gcd(b, a mod b), until the remainder is 0.

Cite this calculator

Speedy Calculator. (2026). GCF Calculator (Greatest Common Factor). Speedy Calculator. https://speedycalculator.com/calculators/math/gcf/