Skip to content

HCF and GCF calculator with steps (highest common factor)

Free TutorAura tool · no sign-up · Updated

Type two or more whole numbers to find their highest common factor (HCF), called the greatest common factor (GCF) or greatest common divisor in the US: the largest number that divides into all of them exactly. The calculator shows each number's prime factors and how the HCF is built from the primes they share.

Loading the tool

How the HCF is found

  1. Write each number as a product of prime factors: 48=24×348 = 2^4 \times 3 and 180=22×32×5180 = 2^2 \times 3^2 \times 5.
  2. Keep only the primes that appear in every number: 2 and 3.
  3. Take each with its lowest power: 222^2 and 33.
  4. Multiply: HCF=22×3=12\text{HCF} = 2^2 \times 3 = 12.

If no prime appears in every number, the HCF is 1 and the numbers are called co-prime.

Worked example with a Venn diagram

For 48 and 180, put the shared prime factors in the overlap of two circles: 2,2,32, 2, 3. The factors only in 48 (2,22, 2) go on the left; the factors only in 180 (3,53, 5) go on the right.

  • HCF = product of the overlap = 2×2×3=122 \times 2 \times 3 = 12.
  • LCM = product of everything in the diagram = 2×2×2×2×3×3×5=7202 \times 2 \times 2 \times 2 \times 3 \times 3 \times 5 = 720.

The calculator draws this diagram whenever you enter two numbers.

Where the HCF is used

  • Simplifying fractions: divide the top and bottom by their HCF in one step: 48180=415\tfrac{48}{180} = \tfrac{4}{15}. See how to simplify fractions.
  • Factorising: 12x+18=6(2x+3)12x + 18 = 6(2x + 3) uses the HCF of 12 and 18.
  • Sharing problems: the largest equal groups you can make from 48 red and 180 blue counters, with none left over, is 12 groups.

Common mistakes

  • Using the highest powers. That gives the LCM.
  • Including a prime that isn't in every number. The 5 in 180 isn't a factor of 48, so it's left out.
  • Stopping at a common factor that isn't the highest, like 6 for 48 and 180. Prime factors make sure you find the largest.

Another method: repeated division

For two numbers you can use Euclid's algorithm: divide the larger by the smaller and keep the remainder. 180=3×48+36180 = 3 \times 48 + 36, then 48=1×36+1248 = 1 \times 36 + 12, then 36=3×12+036 = 3 \times 12 + 0. The last non-zero remainder, 12, is the HCF. More in our guide on how to find the HCF.

More worked examples

NumbersPrime factorsHCF
134 and 1882×672 \times 67 and 22×472^2 \times 472
180 and 32022×32×52^2 \times 3^2 \times 5 and 26×52^6 \times 522×5=202^2 \times 5 = 20
78 and 1952×3×132 \times 3 \times 13 and 3×5×133 \times 5 \times 133×13=393 \times 13 = 39
75, 105 and 11253×523 \times 5^2, 3×5×73 \times 5 \times 7 and 32×533^2 \times 5^33×5=153 \times 5 = 15

For three or more numbers, the method is the same: a prime goes into the HCF only if it's in every number, at the lowest power that appears. In the last row, 7 is only in 105, so it's left out, and 5 appears once in 105, so the HCF takes 515^1. Enter all three numbers in the calculator above to see the factor trees.

Frequently asked questions

Is HCF the same as GCF?

Yes. Highest common factor (HCF) is the usual name in the UK; greatest common factor (GCF) or greatest common divisor (GCD) are used in the US.

What is the HCF of 48 and 180?

12. 48 = 2⁴ × 3 and 180 = 2² × 3² × 5, so the HCF is 2² × 3 = 12.

What if the HCF is 1?

Then the numbers share no prime factors and are called co-prime, like 8 and 15.

How do I find the HCF of three numbers?

Write each number as a product of primes and multiply the primes that appear in all three, each at its lowest power. For 75, 105 and 1125 that's 3 × 5 = 15.

Sources

  1. National curriculum in England: mathematics programmes of study. Department for Education.
  2. Common Core State Standards for Mathematics. Common Core State Standards Initiative.