Skip to content
Calcapedia
Math

GCF Calculator

Find the greatest common factor of 2 to 10 whole numbers, with the Euclidean algorithm worked out.

Level: Grade 6

  • Common Core standard 6.NS.B.4Find the greatest common factor of two whole numbers less than or equal to 100 and the least common multiple of two whole numbers less than or equal to 12. Use the distributive property to express a sum of two whole numbers 1-100 with a common factor as a multiple of a sum of two whole numbers with no common factor.
Printable worksheet

GCF Calculator

Inputs

Enter 2 to 10 whole numbers separated by commas or spaces.

Result

Greatest common factor

12

The greatest common factor of 48, 180, 300 is 12.

Each number divided by the GCF
4, 15, 25
Share a factor other than 1?
Yes

See the step-by-step solution ↓

Step-by-step solution

  1. Use Euclid's method (the Euclidean algorithm). Divide the larger number by the smaller and keep the remainder. Then repeat with the smaller number and the remainder until nothing is left over

    gcf(48, 180)
  2. Division 1: 180 ÷ 48 leaves a remainder of 36

    180=3×48+36
  3. Division 2: 48 ÷ 36 leaves a remainder of 12

    48=1×36+12
  4. Division 3: nothing is left over, so the number you divided by, 12, is the GCF of the pair

    36=3×12+0
  5. The GCF of the first pair

    gcf(48, 180)=12
  6. Bring in the next number: find the GCF of the answer so far and that number

    gcf(12, 300)=12

Test yourself

20 quick questions built from this calculator's formula: work out results, predict what happens when an input changes, and work backward from an answer. Every answer comes with the working.

What this calculator does

Find the biggest whole number that divides evenly into all of your numbers. That number is the greatest common factor (GCF). It's also called the greatest common divisor or the highest common factor. It divides each number in your list with no remainder. It's the key to reducing fractions and ratios to lowest terms. It also helps you split things into equal groups.

Type in two to ten whole numbers. The calculator uses Euclid's method, the Euclidean algorithm, on the first pair, showing every division. Then it brings in the other numbers one at a time to reach the GCF of the whole list.

Where it's used

Why this math matters outside the classroom:

  • Party bags. A host with 24 pencils and 36 stickers makes GCF(24, 36) = 12 identical bags, each with 2 pencils and 3 stickers.
  • Square tiles. The largest square tile that fits a 120 cm by 84 cm area exactly is GCF(120, 84) = 12 cm on a side.
  • Simplifying fractions. Students reduce 42/56 by dividing top and bottom by their GCF, 14, to get 3/4.
  • Cutting boards. A woodworker cuts 48 in and 72 in boards into equal pieces as long as possible, which is GCF(48, 72) = 24 in.
  • Factoring sums. Students rewrite 18 + 30 as 6(3 + 5) by pulling out the greatest common factor, 6.

Grade level and standards: Grade 6; Common Core State Standards for Mathematics 6.NS.B.4. © Copyright 2010. National Governors Association Center for Best Practices and Council of Chief State School Officers. All rights reserved.

How to use it

  1. Enter 2 to 10 whole numbers, separated by commas, spaces or new lines.
  2. Read the GCF at the top, along with each number divided by it.
  3. Open the working to follow the Euclidean algorithm division by division.

What the inputs mean

Whole numbers
Whole numbers only. Negative numbers are allowed, and the minus sign is ignored, since −12 and 12 have the same factors. A 0 is allowed as long as at least one number isn't zero.

Formula and method

a = q × b + r   (0 ≤ r < b)
gcf(a, b) = gcf(b, r), until r = 0
gcf(a, b, c) = gcf(gcf(a, b), c)

In the formulas, a is the larger number and b the smaller. q is how many times b fits into a, and r is the remainder left over. gcf(a, b) means the GCF of a and b.

Any number that divides both a and b also divides the remainder r = a − q × b. The reverse is true, too. So swapping the pair (a, b) for (b, r) never changes the GCF. The numbers get smaller at every step. When the remainder reaches 0, the last number you divided by is the answer.

For a longer list, the GCF of the first two is combined with the third. That result is combined with the fourth, and so on. The order doesn't change the final result.

Worked example

Find the GCF of 48, 180 and 300.

  1. Start with the first pair, 48 and 180. Divide the larger by the smaller: 180 = 3 × 48 + 36.
  2. Repeat with 48 and the remainder 36: 48 = 1 × 36 + 12.
  3. Repeat with 36 and 12: 36 = 3 × 12 + 0. The remainder is 0, so gcf(48, 180) = 12.
  4. Bring in 300: gcf(12, 300) = 12.

Result: The GCF is 12. Dividing each number by it gives 4, 15 and 25, which share no common factor other than 1.

Understanding the result

A GCF of 1 means the numbers are coprime: they share no factor except 1. A fraction whose top and bottom are coprime is already in lowest terms.

The GCF can never be larger than the smallest number in the list that isn't zero.

Assumptions and limitations

  • Inputs are whole numbers between −9,007,199,254,740,991 and 9,007,199,254,740,991. That's the range a computer can store exactly.
  • It finds only the greatest common factor. It doesn't list every common factor or break numbers into primes (prime factorization).
  • Decimals and fractions aren't accepted, since common factors only make sense for whole numbers.

Frequently asked questions

Are GCF, GCD and HCF the same thing?

Yes. Greatest common factor, greatest common divisor and highest common factor are three names for the same number.

Why use the Euclidean algorithm instead of listing factors?

Listing factors gets slow for large numbers. Euclid's method needs only a handful of divisions, even for numbers in the billions, because the remainders shrink quickly.

How does the GCF help simplify a fraction?

Divide the top (numerator) and bottom (denominator) by their GCF. For 48/180, the GCF is 12, so the fraction reduces to 4/15.

What is the GCF when one of the numbers is 0?

Every whole number divides 0, so gcf(n, 0) is just n. If every number is 0, no greatest factor exists and the calculator reports that.

How this calculator is checked

Method: Euclidean algorithm (Euclid, Elements VII.2); associativity of gcd for more than two numbers. The calculation is covered by automated tests with known reference values and edge cases. Last updated 2026-10-18. Found a problem? Tell us.

Embed this calculator

Put this GCF Calculator on your own website or blog for free. Paste this code where you want it to appear: