Skip to content
NumberCalculator365

GCF Calculator

Find the greatest common factor of two or more positive whole numbers. GCF, GCD and HCF are names for the same value: the largest integer that divides every number in the list with no remainder.

GCF Calculator tool

About the GCF Calculator

The calculator uses the Euclidean algorithm pairwise. Remainders replace the larger number until a remainder is 0; the last nonzero remainder is the GCF. It does not return 0 as a classroom factor — inputs must be at least 1.

Reducing a fraction a/b is divide both parts by GCF(a, b). This page reports the GCF. The fraction calculator applies that reduction after an operation. The LCM calculator is the counterpart for common multiples.

How the GCF Calculator works

Euclid: GCF(a, b) = GCF(b, a mod b), and GCF(a, 0) = |a|. For more than two numbers, GCF(a, b, c) = GCF(GCF(a, b), c).

Worked: GCF(48, 18) → 48 = 2×18 + 12, 18 = 1×12 + 6, 12 = 2×6 + 0, so GCF = 6. Then GCF(6, 30) = 6.

GCF(a, b) = GCF(b, a mod b)
GCF(a, 0) = |a|
GCF(a, b, c) = GCF(GCF(a, b), c)

Example

GCF(48, 18, 30) = 6, the default on this page.

How to Use the GCF Calculator

  1. Enter 2 to 12 positive whole numbers.
  2. Read the greatest common factor.
  3. If the GCF is 1, the numbers are coprime — they share no prime factor.
  4. To reduce a fraction, divide numerator and denominator by this GCF.
  5. Use the factor calculator if you want every divisor of a single number.

GCF Calculator Examples

Two numbers

GCF(54, 24) = 6. 54 = 2 × 3³, 24 = 2³ × 3, shared primes 2¹ × 3¹ = 6.

Three numbers

GCF(48, 18, 30) = 6. Each is divisible by 6; 12 does not divide 18 or 30.

Coprime pair

GCF(17, 19) = 1. Consecutive integers are always coprime.

Powers

GCF(16, 24) = 8. Keep the lowest power of each shared prime: 2⁴ and 2³×3 share 2³.

How to Find GCF by Prime Factors

Factor each number, then multiply the primes that appear in every factorization, using the smallest exponent. 48 = 2⁴ × 3, 18 = 2 × 3², 30 = 2 × 3 × 5. Shared: 2¹ × 3¹ = 6. Listing all factors and picking the overlap works for small numbers and is slower for 12-digit inputs — Euclid only needs remainders, which is why the tool uses it.

Using GCF to Simplify a Fraction

54/24 divided by GCF 6 is 9/4. The ratio 54:24 simplifies to 9:4 the same way. The fraction calculator will also reduce after you add or multiply. This GCF calculator is the shared-divisor step when you already have the two integers.

GCF versus LCM

For two numbers, product = GCF × LCM. That check is a good homework audit: 54 × 24 = 1,296 and 6 × 216 = 1,296. It does not hold in the same simple form for three numbers. If you needed a common multiple (when to line up repeating events, or a common denominator), switch to the LCM calculator.

GCF examples you can check in the tool
NumbersGCFCoprime?
54, 246No
48, 18, 306No
17, 191Yes
16, 248No
100, 45, 805No
9, 281Yes

Word problems GCF actually solves

Splitting 48, 18 and 30 items into identical bundles with none left over uses GCF 6 — six bundles of 8, 3 and 5. Tiling a 48-by-18 rectangle with the largest square tiles also uses GCF (here 6). Those are packing problems, not percentages. Use the percentage calculator only if the question is “what percent is 18 of 48.”

Frequently Asked Questions

Are GCF, GCD and HCF different?

No. Greatest common factor, greatest common divisor and highest common factor are the same integer. This page uses GCF in the result label.

What does a GCF of 1 mean?

The numbers are coprime. They still have 1 as a trivial common factor.

Can I simplify a ratio here?

The GCF is the number you would divide by. The ratio calculator applies that division and prints A:B in lowest terms.

Why not allow 0?

GCF(0, n) = n mathematically. This form is built for positive counting numbers used in homework lists.

How many numbers can I paste?

2 to 12, each from 1 through 1,000,000,000,000.

Is this prime factorization?

No. It only reports the shared factor. Open the factor calculator for the full list of divisors of one integer.

Guides that use this calculator