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.
How the HCF is found
- Write each number as a product of prime factors: and .
- Keep only the primes that appear in every number: 2 and 3.
- Take each with its lowest power: and .
- Multiply: .
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: . The factors only in 48 () go on the left; the factors only in 180 () go on the right.
- HCF = product of the overlap = .
- LCM = product of everything in the diagram = .
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: . See how to simplify fractions.
- Factorising: 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. , then , then . The last non-zero remainder, 12, is the HCF. More in our guide on how to find the HCF.
More worked examples
| Numbers | Prime factors | HCF |
|---|---|---|
| 134 and 188 | and | 2 |
| 180 and 320 | and | |
| 78 and 195 | and | |
| 75, 105 and 1125 | , and |
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 . 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
- National curriculum in England: mathematics programmes of study. Department for Education.
- Common Core State Standards for Mathematics. Common Core State Standards Initiative.
Keep reading
LCM calculator with steps (lowest common multiple)
Lowest common multiple of 2 to 10 numbers, with prime factors, a Venn diagram and every step.
Prime factorisation calculator with a factor tree
Any number as a product of primes, in index form, with its factor tree drawn for you.
How to find the HCF (highest common factor): 3 methods
Listing factors, prime factors and Euclid's method, with worked examples and word problems.
Prime factorisation, HCF and LCM
Write a number as a product of primes with a factor tree, then use it to find the highest common factor and lowest common multiple.