HCF calculator — highest common factor
Enter two or more numbers and the calculator finds their highest common factor. Beside the answer it shows the LCM and the prime factorisation.
The HCF of 12, 18, 24 is 6.
Formula
Euclid’s algorithm: divide the larger number by the smaller and repeat with the remainder until the remainder is zero.
How we got there
The HCF of two coprime numbers is 1 — they share no factor greater than one.
How to find the HCF by hand
- Divide the larger number by the smaller
For 18 and 12: 18 ÷ 12 = 1 remainder 6.
- Repeat with the divisor and the remainder
Now 12 ÷ 6 = 2 remainder 0.
- The last non-zero divisor is the HCF
The remainder hit zero, so the HCF of 18 and 12 is 6.
- For more numbers, work in pairs
HCF(12, 18, 24) is HCF(HCF(12, 18), 24), that is HCF(6, 24) = 6.
HCF and LCM before a test? a lesson with a Mathema tutor
Frequently asked questions
Use Euclid’s algorithm, or factorise into primes and multiply the shared factors. The HCF of 12 and 18 is 6.
That their HCF is 1, as for 8 and 15. They share no factor other than one.
Chiefly for simplifying fractions — dividing the numerator and denominator by the HCF gives lowest terms at once.
Unlock the Mathema lesson library
Leave your email and phone — we will take you through to the Mathema platform and open up the preparation library: problem sets, quizzes and lesson plans written by teachers.
HCF and LCM to master?
Book a free introductory lesson with a Mathema tutor. 30 minutes online, no commitment — we find the gap and the plan to close it.
