Skip to tool
ZirkoMirkoTools

GCF Calculator (Greatest Common Factor)

Find the greatest common factor, also called HCF or GCD, with the steps shown.

Type two or more whole numbers separated by commas.

Example · 1071, 462

Separate numbers with commas or spaces. Use a space between numbers written with thousands commas.

Greatest common factor

21

HCF of 1,071 and 462 is 21. LCM is 23,562.

Next tool · Find a simplified ratio

Find the common factor

Processed on this device — nothing is uploaded

What you can do here

  • Calculate the greatest common factor
  • See successive Euclidean divisions
  • Compare the GCF and LCM
  • Inspect common prime powers

What is the greatest common factor?

The GCF Calculator finds the largest positive whole number that divides every input evenly. For example, the greatest common factor of 1071 and 462 is 21. GCF is also called the highest common factor (HCF) or greatest common divisor (GCD). See the Euclidean division steps and the least common multiple.

The GCF describes what your numbers have in common as factors. For example, 21 divides both 1071 and 462 evenly, and no greater number divides them both. That makes 21 their GCF. Use it to simplify a fraction, make identical groups with nothing left over or reduce a ratio. The calculator accepts two to ten positive whole numbers. It can also display their prime factorisations when each input is small enough.

Key facts

Price
Free
Sign-up
None
Upload
None — runs on your device
Limits
2 to 10 positive whole numbers up to 10^15 each · Prime factors shown for input sets at or below 10^12 per number
Works with
Positive whole numbers separated by commas, spaces or new lines
Output
GCF, LCM, Euclidean divisions and optional prime factors
Updated

How to find the greatest common factor

  1. Enter positive whole numbers

    Enter 2 to 10 positive whole numbers. Separate them with commas, spaces or new lines.

  2. Read the GCF

    Read the greatest common factor at the top of the result. The LCM is shown immediately below it.

  3. Follow the successive divisions

    Euclid steps are open on this page. Follow the remainders down to zero and read the last nonzero remainder.

How Euclid’s method finds the GCF

Divide the larger number by the smaller one and keep the remainder. Repeat by dividing the previous divisor by the previous remainder. Once a division gives remainder zero, the last nonzero remainder is the GCF. For 1071 and 462, the divisions are 1071 = 2 × 462 + 147, 462 = 3 × 147 + 21 and 147 = 7 × 21 + 0. The GCF is 21.

For more than two numbers, first find the GCF of the first pair. Then take the GCF of that result and the next number. Continue until all the inputs have been used.

With prime factors, take the primes that occur in every input and use the lowest exponent for each one. If no prime is common to all inputs the GCF is 1.

Frequently asked questions

Are HCF, GCF and GCD different calculations?

No. Highest common factor, greatest common factor and greatest common divisor all name the same result. They mean the largest positive integer that divides each of the given numbers evenly.

Which remainder is the HCF in Euclid’s algorithm?

Use the last nonzero remainder, which is also the divisor in the step that gives zero remainder. For 1071 and 462 the remainders are 147, 21 and 0, so the HCF is 21.

How do I find the highest common factor of three numbers?

First find it for two numbers, then find the HCF of that result and the third number. For 12, 18 and 24, the first pair gives 6 and the final result stays 6.

What information does the HCF share link include?

It contains the whole numbers you entered so someone else can repeat the calculation. The computation happens on your device, and anonymous tool activity events carry no numbers from the list.

Presets

Related tools

About this tool

Made by ZirkoMirko. Last updated .

Check it yourself in your browser’s Network panel while using the tool. How we handle your data.

Sources