GCF Calculator

Find the greatest common factor (highest common factor) of two or more numbers, with Euclid's steps.

Separate with commas, spaces or new lines. Negative numbers are treated by their size.

Number entry: use a point for decimals (1.5). Commas grouped in threes are thousands separators (1,250), and a single comma such as 1,5 is read as a decimal comma. Nothing you enter leaves your device.

Showing the example values. Change the inputs and press Calculate for your own result.

Greatest common factor of 3 numbers

8

Least common multiple
2,288

Working

  1. Euclid (first two numbers): 88 = 16 × 5 + 8
  2. Euclid (first two numbers): 16 = 8 × 2 + 0
  3. Repeat with the result and each remaining number to reach 8.
  4. Prime factors: 16 = 2^4
  5. Prime factors: 88 = 2^3 × 11
  6. Prime factors: 104 = 2^3 × 13

About the GCF calculator

The greatest common factor (GCF), also called the greatest common divisor (GCD) or highest common factor (HCF), is the largest whole number that divides every number in your list without a remainder. This calculator finds it for two or more numbers and shows the steps of Euclid's algorithm.

It also reports the LCM and tells you when the numbers are relatively prime.

Who should use the GCF calculator

  • Students simplifying fractions.
  • Anyone splitting items into equal groups.
  • Teachers demonstrating Euclid's algorithm.

How to use the GCF calculator: what each input means

Numbers
Two or more whole numbers separated by commas, spaces or new lines.

How the GCF calculator works: method and formula

Euclid's algorithm repeatedly replaces the larger number by the remainder of dividing the larger by the smaller until the remainder is zero. The last non-zero remainder is the GCF. For a list, the process is repeated with the running result and each next number.

Euclid
GCF(a, b) = GCF(b, a mod b), ending when the remainder is 0

How to read your GCF calculator result

A GCF of 1 means the numbers are coprime. To simplify a fraction, divide its numerator and denominator by their GCF.

GCF Calculator worked example

Find the GCF of 16, 88 and 104.

  1. Euclid for 88 and 16: 88 = 16 × 5 + 8
  2. Euclid for 88 and 16: 16 = 8 × 2 + 0
  3. The GCF of 88 and 16 is 8; then GCF(8, 104) = 8.

GCF(16, 88, 104) = 8.

Practical uses of the GCF calculator

  • Reducing fractions to lowest terms.
  • Dividing quantities into the largest equal groups.
  • Finding the largest tile that fits a floor of given dimensions.

Assumptions and limitations of this calculator

  • Whole numbers only, with at most 100 numbers of up to 150 digits.
  • GCF of numbers that are all zero is undefined.
FAQs

GCF Calculator FAQs

Yes. Different regions and textbooks use different names for the same value.

Need Something Built Around Your Numbers?

Code & Motions designs and builds custom calculators, dashboards and web tools for businesses. Tell us what you have in mind.