Greatest Common Factor Calculator

Find the GCF (GCD/HCF) of two numbers via the Euclidean algorithm.

The formula behind it

GCF(a, b) via Euclid: (a, b) → (b, a mod b) → … → 0
mod
the remainder after division

The Euclidean algorithm exploits the fact that any common divisor of a and b also divides a mod b. Each step shrinks the numbers; the last non-zero value is the answer — usually in a handful of steps.

How to use this calculator

  1. 1

    Enter two whole numbers.

  2. 2

    Press Calculate.

  3. 3

    The result doubles as the fraction reducer: divide numerator and denominator by it.

Worked examples

Simplify a fraction

GCF(36, 48) = 12, so 36/48 = 3/4.

Tile sizing

A 27 × 36 m floor needs the largest square tile 27×27 — GCF = 9 m.

Frequently asked questions

Explore more categories

Command Palette

Search for a command to run...