Greatest Common Factor Calculator guide
Greatest Common Factor Calculator: Find the GCF or HCF
Use our greatest common factor calculator to find the GCF (also called the HCF or GCD) of two or more numbers, with prime factorisation.
By the AllCalculator editorial teamUpdated 16 October 20261 min read
The greatest common factor (GCF) is the largest number that divides exactly into two or more numbers. In UK schools, it's usually called the highest common factor (HCF). Our Greatest Common Factor Calculator finds it instantly.
How to use the calculator (Greatest Common Factor Calculator)
Type two or more whole numbers, separated by commas or spaces. You'll see the GCF, each number's prime factors and the least common multiple.
How to find the GCF
Using prime factors: write each number as a product of primes, then multiply the primes they all share, each at its lowest power.
Euclid's algorithm: divide the bigger number by the smaller and keep the remainder. Repeat with the smaller number and the remainder until the remainder is 0. The last non-zero remainder is the GCF.
A worked example
With the calculator's default settings, 24, 36 and 60:
- 24 = 2³ × 3
- 36 = 2² × 3²
- 60 = 2² × 3 × 5
- Shared: 2² × 3 = 12
Frequently asked questions
What's the GCF used for?
Simplifying fractions and ratios. 24/36 simplifies to 2/3 by dividing by the GCF, 12.
What if the GCF is 1?
The numbers are called coprime. They share no factors other than 1.
Are HCF, GCF and GCD the same?
Yes, they're three names for the same thing.
For all the shared factors, use our Common Factor Calculator.
Sources and further reading
- GOV.UK: National curriculum in England – mathematicsgov.uk
- Wolfram MathWorld: Greatest common divisormathworld.wolfram.com
Links open official and independent websites in a new tab.
This guide is general information to help you understand your options. It isn't financial, tax, legal or building advice and doesn't take your personal circumstances into account. Figures were checked when the guide was last updated and can change, so confirm anything important with GOV.UK, HMRC, a regulated adviser or a qualified tradesperson.