Skip to content

Math

GCF

Enter your values and the result updates as you type. The formula and a worked example are below the calculator.

3 numbers read. Separate them with commas or new lines.

GCF(240, 360, 600)

120

240, 360, 600 can each be split into equal groups of 120, and 120 is the largest group size that works for all of them.

Greatest common factor (GCF)
120
Least common multiple (LCM)
3,600
Relatively prime?
No

Steps: prime factorization

240 = 2 × 2 × 2 × 2 × 3 × 5

360 = 2 × 2 × 2 × 3 × 3 × 5

600 = 2 × 2 × 2 × 3 × 5 × 5

Underlined primes are shared by every number.

GCF(240, 360, 600)

= 2 × 2 × 2 × 3 × 5

= 120

Euclidean algorithm

Divide the larger number by the smaller and keep the remainder. Repeat with the smaller number and the remainder; the last non-zero remainder is the GCF.

GCF(240, 360) = 120

360 = 240 × 1 + 120

240 = 120 × 2 + 0

GCF(120, 600) = 120

600 = 120 × 5 + 0

Division ladder

Divide every number by a prime that divides them all, until none is left. Multiply the primes on the left to get the GCF.

Division ladder for the greatest common factor
2240360600
2120180300
26090150
3304575
5101525
Left over235

How to use

  1. Type or paste two or more whole numbers, separated by commas, spaces or new lines.
  2. Read the greatest common factor in the large result, with the prime factorization of every number and the primes they share marked.
  3. Open the Euclidean algorithm and the division ladder to see the same answer worked out two other ways.

Formula

GCF(a, b) is found by repeating a = b x q + r with (b, r) until the remainder is 0; the last divisor is the answer. For more numbers, GCF(a, b, c) = GCF(GCF(a, b), c). By primes, take every prime the numbers share, each to the lowest power it has in any of them.

Example

For 330, 75, 450 and 225: 330 = 2 x 3 x 5 x 11, 75 = 3 x 5 x 5, 450 = 2 x 3 x 3 x 5 x 5, 225 = 3 x 3 x 5 x 5. They all share one 3 and one 5, so the GCF is 3 x 5 = 15. In practice, 240 kg, 360 kg and 600 kg of grain can be packed into equal sacks of at most 120 kg.

Only whole numbers of 1 or more are accepted, up to 18 digits each and 50 numbers. Two numbers with a GCF of 1 are called relatively prime (coprime). The GCF is also called the highest common factor (HCF) or greatest common divisor (GCD).