easyonlinecalculator

GCF Calculator

Enter two or more whole numbers to find their greatest common factor, the largest number that divides all of them. The prime factorization of each number and the least common multiple are shown too.

Last updated October 20, 2026

Separate numbers with commas or spaces.

Result

GCF = 12

LCM = 360

Prime factorizations
2423 × 3
3622 × 32
6022 × 3 × 5
Show the work

Formula: GCF of two numbers by Euclid: divide, keep the remainder, repeat until it is 0

  1. Numbers: 24, 36, 60
  2. GCF(24, 36): 36 = 1 × 24 + 12; 24 = 2 × 12 + 0, so the GCF is 12
  3. GCF(12, 60): 60 = 5 × 12 + 0, so the GCF is 12
  4. Carry the running GCF through each next number, left to right.

Result: GCF = 12

How the greatest common factor is found

Formula

GCF = product of the prime factors that every number shares, each to its lowest power

Write each number as a product of primes. The GCF is made of the primes that appear in all of the numbers, each taken to the smallest exponent it has. If the numbers share no prime, the GCF is 1.

The calculator uses the Euclidean algorithm, which repeatedly replaces the larger number with the remainder of dividing it by the smaller one until the remainder is 0. The GCF is also called the greatest common divisor (GCD) or highest common factor (HCF). It is the number you divide by to reduce a fraction to lowest terms.

See how we calculate for the formulas, sources and review schedule behind every calculator.

Also useful alongside this calculator: Fraction Calculator, Exponent Calculator and Log Calculator.

Three ways to find the GCF

Listing factors works for small numbers. The factors of 24 are 1, 2, 3, 4, 6, 8, 12 and 24, and the factors of 36 are 1, 2, 3, 4, 6, 9, 12, 18 and 36. The largest factor in both lists is 12, so GCF(24, 36) = 12.

Prime factorization is the method the calculator shows next to each result: keep the primes common to every number, each at its lowest power.

The Euclidean algorithm needs no factoring and is fast even for large numbers. For 84 and 90: 90 = 1 × 84 + 6, then 84 = 14 × 6 + 0. The last non-zero remainder, 6, is the GCF. For the classic pair 1071 and 462: 1071 = 2 × 462 + 147, then 462 = 3 × 147 + 21, then 147 = 7 × 21 + 0, so the GCF is 21.

For two numbers the GCF and the LCM are linked: GCF × LCM = a × b. For 84 and 90 that is 6 × 1,260 = 7,560, which equals 84 × 90.

Where the GCF is used

Simplifying fractions: divide the top and bottom by their GCF to reach lowest terms in one step. The GCF of 36 and 48 is 12, so 36/48 = 3/4.

Tiling and cutting: the largest square tile that fits a 120 cm by 84 cm floor without cutting has a side equal to GCF(120, 84) = 12 cm, which takes 10 × 7 = 70 tiles.

Equal groups: 48 apples and 36 oranges can be shared into at most 12 identical baskets, each holding 4 apples and 3 oranges. Whenever you split different quantities into the largest number of identical groups, the answer is the GCF.

How to use the GCF Calculator

  1. Enter two or more whole numbers, up to 10 numbers.
  2. Read the GCF, the least common multiple and the prime factorization of each number.
  3. Use Copy, Print or Share to keep the result.

Worked example

Worked example

Find the GCF of 24, 36 and 60. In prime factors, 24 = 2³ × 3, 36 = 2² × 3² and 60 = 2² × 3 × 5. The primes shared by all three are 2 and 3. The lowest power of 2 is 2² and the lowest power of 3 is 3¹, so the GCF is 2² × 3 = 12. To check, 24 ÷ 12 = 2, 36 ÷ 12 = 3 and 60 ÷ 12 = 5. The quotients 2, 3 and 5 share no further factor, which confirms that 12 is the greatest common factor.

Greatest common factor of two numbers
NumbersGCF
12 and 186
24 and 3612
48 and 6012
30 and 4515
54 and 246
100 and 7525
17 and 51

Frequently asked questions

What is the difference between GCF, GCD and HCF?

They are the same thing. GCF (greatest common factor), GCD (greatest common divisor) and HCF (highest common factor) all mean the largest whole number that divides every number in the list.

What is the GCF of two prime numbers?

It is 1, because two different primes share no factor other than 1. Numbers whose GCF is 1, such as 8 and 15, are called coprime even when neither is prime.

How is the GCF used to simplify a fraction?

Divide the numerator and the denominator by their GCF. For 12/18 the GCF is 6, so the fraction simplifies to 2/3. Dividing by the GCF always gives lowest terms, so no second pass is needed.

How large can the numbers be, and are they stored?

Whole numbers from 1 up to 1,000,000,000,000, and up to 10 numbers at a time. The calculation runs in your browser and nothing you enter is saved or uploaded.