FACTORS & DIVISIBILITY

Greatest common factor calculator

Find the largest positive integer that divides every number exactly. Also called the greatest common divisor (GCD) or highest common factor (HCF).

Calculated on your device
1

Enter your numbers

Enter 2–10 integers, up to 30 digits each. Negative integers and zero are allowed, but at least one number must be nonzero. Do not use commas as thousands separators.

TRY AN EXAMPLE

EXACT ANSWER

Greatest common factor

6

6 is the largest positive integer that divides 48 and 18 exactly.

How we got there

Divide the larger number by the smaller, then repeat with the divisor and remainder. The last nonzero divisor is the GCF. For more than two numbers, repeat using the previous GCF and the next number.

  1. 48 = 18 × 2 + 12
  2. 18 = 12 × 1 + 6
  3. 12 = 6 × 2 + 0

The last nonzero divisor is 6.

What is the greatest common factor?

The greatest common factor is the largest positive integer that divides all the given integers with no remainder. For example, the common positive factors of 18 and 48 are 1, 2, 3, and 6, so their GCF is 6.

How to find the GCF of three numbers

First find the GCF of any two numbers, then combine that answer with the next. For 24, 36, and 60: GCF(24, 36) = 12, then GCF(12, 60) = 12. The same process works for longer lists.

Use the GCF to simplify fractions

Divide the numerator and denominator by their GCF. For 18/48, divide both by 6 to get 3/8. To simplify a ratio or solve a proportion directly, use the ratio solver.

Common questions

Are GCF, GCD, and HCF the same?

Yes. Greatest common factor, greatest common divisor, and highest common factor describe the same positive integer.

What if the answer is 1?

The numbers have no common positive factor greater than 1. They are collectively coprime. For a list of three or more numbers, this does not necessarily mean every pair is coprime.

Can I use zero or negative numbers?

Negative signs do not change the positive common factors, so the calculator uses absolute values. The GCF of 0 and a nonzero integer is the absolute value of that integer. An all-zero list has no greatest positive common factor; every positive integer divides zero.

Can I enter decimals?

This tool accepts integers only. Decimals and fractions must be converted into an appropriate integer problem first. Scientific notation is not accepted.

For percentages and percentage change, use the percentage calculator.

INTERPRET THE ANSWER

A common factor divides each input exactly

18 = 2 × 3² and 24 = 2³ × 3, so their greatest common factor is 2 × 3 = 6.

Assumptions and common mistakes

The greatest common factor cannot exceed the smallest positive input. Use integers; decimals need a clearly defined rescaling before factorization.

Use the worked example above to check the input convention before entering your own values. Displayed decimals are rounded; extra digits do not increase the precision of your measurements. Read about calculation accuracy and corrections.