ToolsForWeb

Saved

Tap ☆ on any tool to keep it here.

toolsforweb

GCF Calculator

Find the greatest common factor of two or more whole numbers, with exact answers and worked steps.

Runs in your browser — nothing is uploaded

Loading tool…

Results are provided as is, for general information. Check anything important before relying on it. See the Terms of Use.

About this tool

The greatest common factor (GCF) is the largest positive whole number that divides every number in a list without a remainder. It is also called the greatest common divisor (GCD) or highest common factor (HCF). This calculator accepts 2–20 whole numbers, up to 50 digits each, and uses exact integer arithmetic. The worked steps use repeated division rather than listing every factor. All processing stays in your browser.

How it works

a = b × quotient + remainder
Repeat with (b, remainder) until remainder = 0
GCF(a, b, c) = GCF(GCF(a, b), c)

Start with the larger number. Divide by the smaller and keep the remainder. Continue until a division has no remainder; its divisor is the greatest common factor. Repeat with the next number for a longer list. A zero paired with a positive number leaves that positive number as the GCF.

Worked examples
QuestionWorkingAnswer
What is the GCF of 12 and 18?18 = 12 × 1 + 6; 12 = 6 × 2 + 06
What is the GCF of 18, 30 and 42?GCF(18, 30) = 6; GCF(6, 42) = 66
What is the GCF of 17 and 29?29 = 17 + 12; 17 = 12 + 5; 12 = 5 × 2 + 2; 5 = 2 × 2 + 1; 2 = 1 × 21
What is the GCF of 0 and 18?18 divides itself and also divides 018

When to use it

Checking a common-factor answer for homework.
Finding the number to divide a fraction's numerator and denominator by when simplifying it.
Splitting quantities into the largest equal-size groups without leftovers.

Questions

What is the GCF of 12 and 18?

It is 6: 12 ÷ 6 = 2 and 18 ÷ 6 = 3. No larger positive whole number divides both evenly. Dividing both parts of 12/18 by 6 gives 2/3.

Are GCF, GCD and HCF the same?

Yes. Greatest common factor, greatest common divisor and highest common factor refer to the same number. These names share this calculator; no separate input or mode is needed.

Can I find the GCF of three or more numbers?

Yes. Enter up to 20 numbers. First find the GCF of the first pair, then use that answer with the next number. For 18, 30 and 42, GCF(18, 30) is 6 and GCF(6, 42) is 6.

How do the worked steps find the GCF?

The Euclidean algorithm divides the larger number by the smaller, then repeats using the divisor and remainder. When the remainder reaches zero, the last nonzero divisor is the answer. For 18 and 30: 30 = 18 × 1 + 12, then 18 = 12 × 1 + 6, then 12 = 6 × 2 + 0. The GCF is 6.

What does a GCF of 1 mean?

Only 1 divides every number in the list. For two numbers this means they are relatively prime, also called coprime. For a longer list, a GCF of 1 does not mean every possible pair is coprime: 6, 10 and 15 have GCF 1, although each pair shares a larger factor.

Can I enter zero, negative numbers or decimals?

Zero is accepted alongside at least one positive whole number: GCF(0, 18) is 18. If every value is zero, there is no greatest positive common factor, so this tool asks for a positive value. Negative numbers, signs, decimals, fractions and scientific notation are not accepted.

How do I enter a list or a large number?

Separate values with commas, spaces, semicolons or new lines. Commas always separate values, never thousands: enter 1000, not 1,000. Each number can contain up to 50 digits, and the whole input is limited to 2000 characters. Answers are exact, without rounding.

Sources

Related tools