HCF Calculator — Highest Common Factor
Find the highest common factor (HCF) of two numbers, also called the greatest common divisor (GCD). Uses the Euclidean algorithm with full step-by-step working shown.
HCF(48, 36)
12
How it works
Apply the Euclidean algorithm
The Euclidean algorithm: divide the larger number by the smaller, then repeat with (divisor, remainder) until the remainder is 0. The last non-zero remainder is the HCF.
48 = 36 × 1 + 12
Remainder is 12. Now apply the algorithm to (36, 12).
36 = 12 × 3 + 0
The remainder is 0, so the algorithm ends. The HCF is the last non-zero remainder (or divisor): 12.
Result:HCF = 12
The formula
Example substitution
Keep applying until remainder is 0. Last non-zero remainder is the HCF = 6.
Worked examples
Find the highest common factor of 48 and 36.
- 1Step 1: 48 = 1 × 36 + 12
- 2Step 2: 36 = 3 × 12 + 0
- 3Remainder 0: HCF = 12
Find the highest common factor of 120 and 45.
- 1Step 1: 120 = 2 × 45 + 30
- 2Step 2: 45 = 1 × 30 + 15
- 3Step 3: 30 = 2 × 15 + 0
Find the highest common factor of 56 and 98.
- 1Step 1: 98 = 1 × 56 + 42
- 2Step 2: 56 = 1 × 42 + 14
- 3Step 3: 42 = 3 × 14 + 0
Frequently asked questions
What is the HCF?+
The highest common factor (HCF), also called the greatest common divisor (GCD), is the largest number that divides exactly into two or more numbers.
How do you find the HCF?+
List all factors of each number and find the largest one they share. Alternatively, use the Euclidean algorithm for large numbers.
What is the HCF of 24 and 36?+
Factors of 24: 1, 2, 3, 4, 6, 8, 12, 24. Factors of 36: 1, 2, 3, 4, 6, 9, 12, 18, 36. HCF = 12.
What is the Euclidean algorithm?+
Divide the larger number by the smaller, take the remainder, repeat with (smaller, remainder) until the remainder is 0. The last divisor is the HCF.