We look at the division of 654165 by 40 
We're looking to find how many times 40 goes into 654165.

Step 1:
When dividing 6 by 40, we get 0 with a remainder of 6.
Use 0 as the next digit of our solution. 
Result so far: 0.0
Subtract 0 from 6 to get 6.
Fetch the next digit (5) from the dividend, attach it to 6 and continue: 65 / 40

Let's proceed to step 2:
40 can be fit into 65 1 times, resulting in a remainder of 25.
Use 1 as the next digit of our solution. 
Result so far: 1.0
Subtracting 40 from 65 leaves us with 25.
Fetch the next digit (4) from the dividend, attach it to 25 and continue: 254 / 40

On to step 3:
40 can be fit into 254 6 times, resulting in a remainder of 14.
Write down 6 as next digit of the result. 
Result so far: 16.0
Subtracting 240 from 254 leaves us with 14.
Fetch the next digit (1) from the dividend, attach it to 14 and continue: 141 / 40

Let's proceed to step 4:
When dividing 141 by 40, we get 3 with a remainder of 21.
Put 3 as the next digit of the answer. 
Result so far: 163.0
If we subtract 120 from 141, we get 21.
Bring next digit (6) of the dividend behind the 21 and repeat the process: 216 / 40

Going ahead to step 5:
The number 40 fits into 216 5 times, leaving a remainder of 16.
Use 5 as the next digit of our solution. 
Result so far: 1635.0
Subtract 200 from 216 to get 16.
Fetch the next digit (5) from the dividend, attach it to 16 and continue: 165 / 40

Moving on to step 6:
40 goes into 165 4 times with a remainder of 5.
Write down 4 as next digit of the result. 
Result so far: 16354.0
The remainder is 5 after subtracting 160 from 165.
Since there are no more digits in the dividend, we add a zero to the remainder making it 50, and continue the process.

Moving on to step 7:
40 goes into 50 1 times with a remainder of 10.
Put 1 as the next digit of the answer. 
Result so far: 16354.1
If we take 40 away from 50, we end up with 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Moving on to step 8:
If we divide 100 by 40, we get 2 and a remainder of 20.
The number 2 becomes the next digit in our result. 
Result so far: 16354.12
Subtracting 80 from 100 leaves us with 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Step 9:
40 goes into 200 5 times with a remainder of 0.
Write down 5 as next digit of the result. 
Result so far: 16354.125
The remainder is 0 after subtracting 200 from 200.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Advancing to step 10:
When dividing 0 by 40, we get 0 with a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 16354.125
If we take 0 away from 0, we end up with 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Let's proceed to step 11:
The number 40 fits into 0 0 times, leaving a remainder of 0.
The next digit of our result is 0. 
Result so far: 16354.125
Subtracting 0 from 0 leaves us with 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

The final result is 16354.125 with a remainder of 0.0.