# GCF Calculator (Greatest Common Factor)

URL: https://speedycalculator.com/calculators/math/gcf/
Last updated: 2026-10-25

> 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.

## Inputs

- First number
- Second number
- Third number (optional, 0 to skip)

## Results

- Greatest common factor
- LCM of first two

## Formula

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

## Explanation

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

- **First number**
- **Second number**
- **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

FieldWhat to enterFirst numberA numberSecond numberA numberThird number (optional, 0 to skip)A number

## 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.

## FAQ

**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.

