keencalculator
  1. Home
  2. Math
  3. GCF Calculator

GCF Calculator

Find the greatest common factor of two or more whole numbers — the largest number that divides all of them exactly. Enter the numbers separated by commas to get the GCF, the least common multiple and each number divided by the GCF.

Quick examples

Whole numbers separated by commas or spaces.

Your numbers stay in your browser. Nothing is uploaded.
Greatest common factor6
Least common multiple
72
Each number ÷ GCF
2, 3, 4

Saved setups

Save a set of inputs you reuse — your usual rate, your loan, your room sizes — and load it back in one tap.

    Your recent calculations

    Results you calculate here are kept on this device so you can come back to them.

      Formula

      Euclid’s algorithm: GCF(a, b) = GCF(b, a mod b), repeated until the remainder is 0
      For more than two numbers: GCF(a, b, c) = GCF(GCF(a, b), c)
      LCM(a, b) = a × b ÷ GCF(a, b)

      How to use it

      1. Type two or more whole numbers separated by commas or spaces.
      2. Read the greatest common factor.
      3. Use the “each number ÷ GCF” line to simplify a fraction or ratio.

      Worked examples

      GCF of 12, 18 and 24

      Greatest common factor
      6
      Least common multiple
      72
      Each number ÷ GCF
      2, 3, 4

      GCF of 48 and 180

      Greatest common factor
      12
      Least common multiple
      720
      Each number ÷ GCF
      4, 15

      Two ways to find it by hand

      Euclid’s algorithm for 48 and 180: 180 = 3 × 48 + 36, then 48 = 1 × 36 + 12, then 36 = 3 × 12 + 0. The last non-zero remainder, 12, is the GCF.

      Prime factors for 12, 18 and 24: 12 = 2² × 3, 18 = 2 × 3², 24 = 2³ × 3. Take the lowest power of each prime they all share: 2 × 3 = 6.

      Names and uses

      GCF, GCD (greatest common divisor) and HCF (highest common factor) all mean the same thing. The main use is simplifying: 18/24 divided through by 6 is 3/4. When the GCF is 1, the numbers are called coprime and the fraction is already in lowest terms.

      Questions people ask

      What is the GCF of 12 and 18?

      6. The factors of 12 are 1, 2, 3, 4, 6, 12 and the factors of 18 are 1, 2, 3, 6, 9, 18; the largest in both lists is 6.

      What is the GCF of 48 and 180?

      12.

      What is the GCF of 17 and 31?

      1. Both are prime, so they share no factor other than 1.

      Related calculators