Feedback form
Hi! What do you think?

Drag it here or paste with Ctrl+V


    You can also email us on infocalculat.io

    Greatest Common Factor of 3 Numbers

    Find the Greatest Common Factor (GCF) of three numbers

    "Greatest Common Factor of 3 Numbers" Calculator

    Greatest Common Factor of
    ,
    and

    How to Find the Greatest Common Factor (GCF) of Three Numbers

    What the GCF of three numbers is

    The greatest common factor of three numbers is the largest positive integer that divides all of them without a remainder. English textbooks also call it the greatest common divisor (GCD) or highest common factor (HCF) — three names for one value. It always exists, because 1 divides everything, and it is never larger than the smallest of the three.

    GCF(a, b, c) = the largest d > 0 such that d | a, d | b and d | c

    Where the formula comes from

    Every integer above 1 is a unique product of primes, and d divides a exactly when every prime of d appears in a at least as many times. To divide all three at once, d may therefore contain each prime only as many times as the poorest of the three contains it — and taking that much makes it the largest such divisor.

    GCF = ∏ pmin(e₁, e₂, e₃) over every prime p shared by all three

    A prime missing from even one of the numbers drops out of the product entirely, which is why adding a third number can only lower the answer, never raise it.

    How to compute it in three steps

    1. Factor all three numbers into primes, for example 12 = 2² × 3, 18 = 2 × 3² and 30 = 2 × 3 × 5.
    2. Keep only the primes present in all three, each taken the smallest number of times: one 2 and one 3.
    3. Multiply what is left: 2 × 3 = 6. That is the greatest common factor.

    Factorization against Euclid, worked on one example

    Two routes lead to the same answer, and it is worth seeing them side by side on 12, 18 and 30. The first lays the prime powers out in a grid and reads the minimum of each row:

    Prime121830Lowest power
    2222
    3333
    55
    GCF(12, 18, 30) = 2 × 3 = 6

    The 5 contributes nothing: it is absent from two of the three numbers, so no divisor of all three can carry it. The second route never factors anything. It leans on associativity — GCF(a, b, c) = GCF(GCF(a, b), c) — and runs the Euclidean algorithm twice:

    18 = 12 × 1 + 6, then 12 = 6 × 2 + 0 → GCF(12, 18) = 6

    30 = 6 × 5 + 0 → GCF(6, 30) = 6

    GCF(12, 18, 30) = 6

    Euclid described this procedure in the Elements around 300 BC, and it is still the reason the pairwise route wins on large numbers: it only ever divides with remainder, so it never has to factor anything. The grid, on the other hand, shows why the answer is what it is, which is what a worked school solution is usually asked for.

    Common triples and their GCF

    Three numbersGCF
    2, 3 and 41
    3, 6 and 93
    4, 6 and 82
    4, 8 and 124
    6, 12 and 186
    8, 12 and 164
    12, 18 and 246
    20, 30 and 4010

    Where three numbers at once actually come up

    • Simplifying a ratio of three terms — 12 : 18 : 24 divided by their GCF 6 becomes 2 : 3 : 4
    • Cutting without waste — boards of 12 m, 18 m and 30 m split into equal pieces with no offcut only at lengths dividing 6 m
    • Packing into equal boxes — 12, 18 and 30 items of three kinds fill at most 6 identical boxes with nothing left over
    • Tiling a rectangle — the largest square tile that fits three side lengths exactly is their greatest common divisor
    • Reducing a three-way recipe — scaling 12 g, 18 g and 30 g down by 6 keeps the proportions intact
    • School problems — «the largest number that divides 12, 18 and 30» is this calculation word for word

    Limits and caveats

    • Order does not matter. GCF(12, 18, 24), GCF(24, 12, 18) and GCF(18, 24, 12) are one and the same 6, so this calculator keeps one page per unordered triple.
    • The answer is never larger than the smallest number, and it equals it exactly when that number divides the other two — GCF(6, 12, 18) = 6.
    • A 1 among the three forces the answer to 1, because nothing above 1 divides 1.
    • Pairwise coprime is not the same as coprime as a set. 6, 10 and 15 have a GCF of 1 even though every pair among them shares a factor, so a GCF of 1 does not mean the numbers have nothing in common two by two.
    • The GCF divides every difference. For 12, 18 and 30 it divides 18 − 12 = 6 and 30 − 18 = 12 — a quick way to check an answer by hand.

    See Also

    Last Results

    FAQ

    How do you find the GCF of three numbers?

    Factor all three into primes and multiply the primes they all share, each taken as many times as it appears in the poorest of the three factorizations. 12 = 2² × 3, 18 = 2 × 3² and 30 = 2 × 3 × 5 all contain one 2 and one 3, so the GCF is 2 × 3 = 6. A prime missing from even one of the numbers contributes nothing.

    Can you find the GCF of three numbers two at a time?

    Yes — GCF is associative, so GCF(a, b, c) = GCF(GCF(a, b), c) and the order does not matter. For 12, 18 and 30: GCF(12, 18) = 6, then GCF(6, 30) = 6. This is what makes the Euclidean algorithm usable on three numbers: run it on the first pair, then run it again on that result and the third number.

    What does it mean when the GCF of three numbers is 1?

    It means the three numbers share no prime factor at all and are called relatively prime as a set. Note that this is weaker than being pairwise coprime: 6, 10 and 15 have a GCF of 1, yet every pair among them shares a factor — 6 and 10 share 2, 6 and 15 share 3, 10 and 15 share 5.

    How big can the GCF of three numbers be?

    Never larger than the smallest of the three, because it has to divide that one too — and it equals the smallest exactly when that number divides the other two, as in GCF(6, 12, 18) = 6. It also divides every difference between the numbers, which is a quick way to sanity-check an answer: the GCF of 12, 18 and 30 divides 18 − 12 = 6.