GCF Calculator (Greatest Common Factor)

Find the greatest common factor of two or more numbers, with step-by-step working. Free to use, with no sign-up required.

Enter 2–10 positive integers from 1 to 1,000,000, separated by commas or whitespace. Commas separate numbers, not thousands (write 1000000). Find the GCF of two numbers, three numbers, or up to ten.

What is the greatest common factor?

The greatest common factor is the largest positive integer that divides each of your numbers exactly. For 24 and 36, the common factors are 1, 2, 3, 4, 6, and 12, so the greatest is 12.

This greatest common factor calculator also works as a greatest common divisor calculator (GCD) or highest common factor calculator (HCF). Those names describe the same calculation for positive integers.

How to find the greatest common factor

1. Enter your numbers

Enter your numbers and select Calculate GCF, or try an example.

2. Divide and repeat

The Euclidean algorithm divides the larger number by the smaller. Repeat with the smaller number and the remainder until the remainder is zero.

3. Read the GCF

The last nonzero divisor is the GCF. For multiple numbers, use that GCF with the next number and repeat.

Check with prime factorization

You can also find the GCF by writing each number as a product of prime factors.

  • 24 = 2³ × 3
  • 36 = 2² × 3²

Take each shared prime factor with the smaller exponent, then multiply.

GCF = 2² × 3 = 12

Worked GCF examples

GCF of 24 and 36

  1. Find GCF(24, 36):

    • 36 = 24 × 1 + 12 (remainder 12)
    • 24 = 12 × 2 + 0 (remainder 0)

The last nonzero divisor is 12, so GCF(24, 36) = 12.

GCF of 18, 24, and 30

  1. Find GCF(18, 24):

    • 24 = 18 × 1 + 6 (remainder 6)
    • 18 = 6 × 3 + 0 (remainder 0)
  2. Find GCF(6, 30):

    • 30 = 6 × 5 + 0 (remainder 0)

First find GCF(18, 24) = 6. Then GCF(6, 30) = 6, so the three numbers have GCF 6.

GCF of 8 and 15

  1. Find GCF(8, 15):

    • 15 = 8 × 1 + 7 (remainder 7)
    • 8 = 7 × 1 + 1 (remainder 1)
    • 7 = 1 × 7 + 0 (remainder 0)

The last nonzero divisor is 1. These numbers are coprime: their only common positive factor is 1.

Use GCF to simplify fractions and make equal groups

To simplify 24/36, divide the numerator and denominator by their GCF, 12: (24 ÷ 12)/(36 ÷ 12) = 2/3. Dividing both by the same nonzero number preserves the fraction’s value.

When adding fractions, you need a common denominator. The least common denominator of 1/24 and 1/36 is 72, the LCM of 24 and 36. Their GCF helps you find it: 24 × 36 ÷ 12 = 72.

GCF also helps you make the largest possible number of identical groups with no leftovers. With 18 pencils, 24 erasers, and 30 stickers, you can make 6 identical packs containing 3 pencils, 4 erasers, and 5 stickers each.

For help translating a situation into equations, explore the word-problem solver. For equations and expressions, try the algebra calculator.

Frequently asked questions

What is the Greatest Common Factor?
The greatest common factor (GCF) is the largest positive integer that divides all the given numbers without a remainder. For example, 12 is the greatest common factor of 24 and 36 because it divides both numbers exactly and no larger integer does.
How to find the Greatest Common Factor?
For small numbers, list the factors of each number, identify the common factors, and choose the largest. For 8 and 15, the only common factor is 1. You can also use prime factorization or the Euclidean algorithm; this calculator uses the Euclidean algorithm and shows each division step.
How to find the GCF using Euclid’s Algorithm?
Divide the larger number by the smaller and keep the remainder. Repeat with the previous divisor and remainder until the remainder is zero. The last nonzero divisor is the GCF. For 36 and 24: 36 = 24 × 1 + 12, then 24 = 12 × 2 + 0, so the GCF is 12. For more numbers, repeat using that GCF and the next number.
Are GCF, GCD, and HCF the same thing?
Yes, for positive integers. Greatest common factor (GCF), greatest common divisor (GCD), and highest common factor (HCF) all mean the largest positive integer that divides every input without a remainder. You can use this tool as a GCD calculator or HCF calculator for the same inputs.
Can I find the greatest common factor of multiple numbers?
Yes. Enter 2–10 positive integers between 1 and 1,000,000. To find the GCF of three numbers, the calculator finds the GCF of the first two, then combines that result with the third. It repeats this process for any additional numbers.
Is the GCF calculator free, and do I need to sign up?
The calculation and all steps are free, with no sign-up required. Arithmetic runs in your browser. Optional practice and broader math help in Julius require an account and follow your account’s usage limits.
What is the difference between GCF and LCM?
GCF is the largest positive integer that divides each number; LCM is the smallest positive integer that is a multiple of each number. For 24 and 36, the GCF is 12 and the LCM is 72. This tool calculates GCF only.
Why is my GCF 1?
A GCF of 1 means there is no common positive factor greater than 1 across all the numbers. For example, 8 and 15 have GCF 1. Including 1 in any supported input also makes the GCF 1.
Can I enter fractions, decimals, or algebraic expressions?
This calculator accepts positive integers only. To simplify a fraction, enter its positive integer numerator and denominator, then divide both by their GCF. For equations and expressions, explore the Julius algebra calculator.

Related math tools

Use Julius’s Math AI for broader problem solving, including photos, equations, and step-by-step explanations.