Highest Common Factor of 40, 18, 331 using Euclid's algorithm

Created By : Jatin Gogia

Reviewed By : Rajasekhar Valipishetty

Last Updated : Apr 06, 2023


HCF Calculator using the Euclid Division Algorithm helps you to find the Highest common factor (HCF) easily for 40, 18, 331 i.e. 1 the largest integer that leaves a remainder zero for all numbers.

HCF of 40, 18, 331 is 1 the largest number which exactly divides all the numbers i.e. where the remainder is zero. Let us get into the working of this example.

Consider we have numbers 40, 18, 331 and we need to find the HCF of these numbers. To do so, we need to choose the largest integer first and then as per Euclid's Division Lemma a = bq + r where 0 ≤ r ≤ b

Highest common factor (HCF) of 40, 18, 331 is 1.

HCF(40, 18, 331) = 1

HCF of 40, 18, 331 using Euclid's algorithm

Highest common factor or Highest common divisor (hcd) can be calculated by Euclid's algotithm.

HCF of:

Highest common factor (HCF) of 40, 18, 331 is 1.

Highest Common Factor of 40,18,331 using Euclid's algorithm

Highest Common Factor of 40,18,331 is 1

Step 1: Since 40 > 18, we apply the division lemma to 40 and 18, to get

40 = 18 x 2 + 4

Step 2: Since the reminder 18 ≠ 0, we apply division lemma to 4 and 18, to get

18 = 4 x 4 + 2

Step 3: We consider the new divisor 4 and the new remainder 2, and apply the division lemma to get

4 = 2 x 2 + 0

The remainder has now become zero, so our procedure stops. Since the divisor at this stage is 2, the HCF of 40 and 18 is 2

Notice that 2 = HCF(4,2) = HCF(18,4) = HCF(40,18) .


We can take hcf of as 1st numbers and next number as another number to apply in Euclidean lemma

Step 1: Since 331 > 2, we apply the division lemma to 331 and 2, to get

331 = 2 x 165 + 1

Step 2: Since the reminder 2 ≠ 0, we apply division lemma to 1 and 2, to get

2 = 1 x 2 + 0

The remainder has now become zero, so our procedure stops. Since the divisor at this stage is 1, the HCF of 2 and 331 is 1

Notice that 1 = HCF(2,1) = HCF(331,2) .

HCF using Euclid's Algorithm Calculation Examples

Here are some samples of HCF using Euclid's Algorithm calculations.

Frequently Asked Questions on HCF of 40, 18, 331 using Euclid's Algorithm

1. What is the Euclid division algorithm?

Answer: Euclid's Division Algorithm is a technique to compute the Highest Common Factor (HCF) of given positive integers.

2. what is the HCF of 40, 18, 331?

Answer: HCF of 40, 18, 331 is 1 the largest number that divides all the numbers leaving a remainder zero.

3. How to find HCF of 40, 18, 331 using Euclid's Algorithm?

Answer: For arbitrary numbers 40, 18, 331 apply Euclid’s Division Lemma in succession until you obtain a remainder zero. HCF is the remainder in the last but one step.