We divide 166462 by 40
We're looking to find how many times 40 goes into 166462.

On to step 1:
40 can be fit into 1 0 times, resulting in a remainder of 1.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
If we subtract 0 from 1, we get 1.
Include the next digit (6) from the dividend after 1, then repeat: 16 / 40

Going ahead to step 2:
40 can be fit into 16 0 times, resulting in a remainder of 16.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
The remainder is 16 after subtracting 0 from 16.
Take the next digit (6) from the dividend and append it to 16, then repeat: 166 / 40

Let's proceed to step 3:
When dividing 166 by 40, we get 4 with a remainder of 6.
The number 4 becomes the next digit in our result. 
Result so far: 4.0
Subtract 160 from 166 to get 6.
Bring next digit (4) of the dividend behind the 6 and repeat the process: 64 / 40

On to step 4:
64 divided by 40 is 1 with a remainder of 24.
Record the quotient 1 as the next digit in the result. 
Result so far: 41.0
Subtracting 40 from 64 leaves us with 24.
Fetch the next digit (6) from the dividend, attach it to 24 and continue: 246 / 40

On to step 5:
If we divide 246 by 40, we get 6 and a remainder of 6.
Record the quotient 6 as the next digit in the result. 
Result so far: 416.0
If we subtract 240 from 246, we get 6.
Bring next digit (2) of the dividend behind the 6 and repeat the process: 62 / 40

On to step 6:
If we divide 62 by 40, we get 1 and a remainder of 22.
The number 1 becomes the next digit in our result. 
Result so far: 4161.0
Deduct 40 from 62 and we're left with 22.
Since there are no more digits in the dividend, we add a zero to the remainder making it 220, and continue the process.

On to step 7:
220 divided by 40 is 5 with a remainder of 20.
Write down 5 as next digit of the result. 
Result so far: 4161.5
Subtract 200 from 220 to get 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Moving on to step 8:
If we divide 200 by 40, we get 5 and a remainder of 0.
The number 5 becomes the next digit in our result. 
Result so far: 4161.55
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.

After the division, we end up with 4161.55 and a remainder of 0.0.