We're dividing 166870 by 40 
We want to figure out the number of times 166870 can be divided by 40.

Step 1:
When dividing 1 by 40, we get 0 with a remainder of 1.
Use 0 as the next digit of our solution. 
Result so far: 0.0
Subtracting 0 from 1 leaves us with 1.
Take the next digit (6) from the dividend and append it to 1, then repeat: 16 / 40

Step 2:
When dividing 16 by 40, we get 0 with a remainder of 16.
Put 0 as the next digit of the answer. 
Result so far: 0.0
The remainder is 16 after subtracting 0 from 16.
Fetch the next digit (6) from the dividend, attach it to 16 and continue: 166 / 40

Advancing to step 3:
40 can be fit into 166 4 times, resulting in a remainder of 6.
Record the quotient 4 as the next digit in the result. 
Result so far: 4.0
The remainder is 6 after subtracting 160 from 166.
Take the next digit (8) from the dividend and append it to 6, then repeat: 68 / 40

Advancing to step 4:
The number 40 fits into 68 1 times, leaving a remainder of 28.
Use 1 as the next digit of our solution. 
Result so far: 41.0
If we subtract 40 from 68, we get 28.
Bring next digit (7) of the dividend behind the 28 and repeat the process: 287 / 40

Advancing to step 5:
The number 40 fits into 287 7 times, leaving a remainder of 7.
Use 7 as the next digit of our solution. 
Result so far: 417.0
The remainder is 7 after subtracting 280 from 287.
Append the next digit (0) from the dividend to 7 and continue with: 70 / 40

On to step 6:
If we divide 70 by 40, we get 1 and a remainder of 30.
Record the quotient 1 as the next digit in the result. 
Result so far: 4171.0
If we subtract 40 from 70, we get 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

Let's proceed to step 7:
The number 40 fits into 300 7 times, leaving a remainder of 20.
The number 7 becomes the next digit in our result. 
Result so far: 4171.7
If we take 280 away from 300, we end up 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 8:
When dividing 200 by 40, we get 5 with a remainder of 0.
Write down 5 as next digit of the result. 
Result so far: 4171.75
Deduct 200 from 200 and we're left 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.

Going ahead to step 9:
0 divided by 40 is 0 with a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 4171.75
The remainder is 0 after subtracting 0 from 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Moving on to step 10:
If we divide 0 by 40, we get 0 and a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 4171.75
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 quotient of the division is 4171.75, and the remainder is 0.0.