Skip to content
ENExplore Calculators

Greatest Common Factor Calculator

Find the GCF of several numbers using the Euclidean algorithm.

About Greatest Common Factor Calculator

The Greatest Common Factor (GCF), also called Greatest Common Divisor (GCD) or Highest Common Factor (HCF), is the largest positive integer that divides all of the given numbers without a remainder. The Euclidean algorithm finds it efficiently: repeatedly replace the larger number with the remainder when divided by the smaller, until the remainder is zero. The last non-zero remainder is the GCF.

Formulas

Euclidean algorithm

gcd(a, b) = gcd(b, a mod b); gcd(a, 0) = a

GCF of a list

gcd(a, b, c) = gcd(gcd(a, b), c) — fold pairwise

Worked example

With the default values below, Greatest Common Factor Calculator returns Greatest Common Factor (GCF) of 6. Change any input above and every figure here is recalculated in your browser.

Inputs used

Numbers (comma or space separated)
48, 18

Results

Greatest Common Factor (GCF)
6
Input Numbers
48, 18

Step by step

  1. 1Inputs= 48, 18
  2. 2Euclidean step
  3. 3Euclidean step
  4. 4Euclidean step
  5. 5GCF= 6

Assumptions and limits

  • The result is derived only from the single input listed above. Anything not among them is not part of the calculation.
  • In particular, this calculator does not take inflation, tax, fees or charges or compounding frequency into account.
  • Figures are rounded for display to whole numbers, so totals built from several rounded parts can differ slightly from the unrounded arithmetic.

How these calculators are built and tested is described on the Methodology page. If a figure looks wrong, please report it.

Frequently Asked Questions

What is gcd(48, 18)?

48 = 2 × 18 + 12; 18 = 1 × 12 + 6; 12 = 2 × 6 + 0. The GCF is 6. You can verify: 48/6 = 8 and 18/6 = 3, both integers.

What is the GCF used for?

Simplifying fractions: 18/48 = 3/8 (divide both by GCF 6). Finding the LCD (LCM = a × b / GCF). Tiling problems: the largest square tile that fits a 48 × 18 room is 6 × 6.

Can I find the GCF of more than two numbers?

Yes. GCF of a list is found by folding pairwise: gcd(48, 18, 30) = gcd(gcd(48, 18), 30) = gcd(6, 30) = 6.

Greatest Common Factor Calculator | Calcrivo