Sumivo · Mathematics

GCF Calculator

Find the greatest common factor of two or more integers — the largest positive number that divides them all evenly.

01 / inputs

integers

02 / result

GREATEST COMMON FACTOR

6

GCF
6
Count
2
Coprime
No

Calculation trace

  1. gcd(12, 18) = 6
    6
    GCF step 1
§

How it works

The greatest common factor (GCF), also called the greatest common divisor (GCD), is the largest positive integer that divides every input with no remainder. The tool folds the list two at a time with the Euclidean algorithm — repeatedly replacing the pair (a, b) with (b, a mod b) until the remainder is 0 — and for three or more numbers uses gcd(a, b, c) = gcd(gcd(a, b), c).

Assumptions & limits

  • Inputs must be integers; decimals and non-numeric values are rejected.
  • A negative sign is ignored — a number and its negation share the same factors.
  • Zero is allowed because gcd(0, n) equals |n|; only an all-zero list is undefined and rejected.
§

FAQ

What is the greatest common factor?
The largest positive integer that divides each of your numbers with no remainder. For 12 and 18 the GCF is 6.
Is the GCF the same as the GCD?
Yes. Greatest common factor (GCF) and greatest common divisor (GCD) are two names for the same value; this tool computes it with the Euclidean algorithm.
What does it mean when the GCF is 1?
The numbers are coprime — they share no common factor other than 1. For example, 3 and 5 have a GCF of 1.
How are the GCF and LCM related?
For two numbers they satisfy gcf(a, b) × lcm(a, b) = |a × b|, so once you know one you can find the other.
What is the GCF used for?
Reducing fractions to lowest terms, splitting quantities into equal groups, and simplifying ratios all rely on the greatest common factor.
§

Related calculators

§

SOURCES

  • OpenStax, Rice University
    Prealgebra 2e

    Greatest common factor: prime factorization and the largest shared factor

    Accessed 2026-09-02