Let's divide 166586 by 45
Our goal is to divide 166586 by 45.

Moving on to step 1:
1 divided by 45 is 0 with a remainder of 1.
Record the quotient 0 as the next digit in the 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 / 45

Going ahead to step 2:
45 goes into 16 0 times with a remainder of 16.
The next digit of our result is 0. 
Result so far: 0.0
Deduct 0 from 16 and we're left with 16.
Include the next digit (6) from the dividend after 16, then repeat: 166 / 45

On to step 3:
The number 45 fits into 166 3 times, leaving a remainder of 31.
The number 3 becomes the next digit in our result. 
Result so far: 3.0
If we subtract 135 from 166, we get 31.
Take the next digit (5) from the dividend and append it to 31, then repeat: 315 / 45

Advancing to step 4:
When dividing 315 by 45, we get 7 with a remainder of 0.
The next digit of our result is 7. 
Result so far: 37.0
The remainder is 0 after subtracting 315 from 315.
Bring next digit (8) of the dividend behind the 0 and repeat the process: 8 / 45

Going ahead to step 5:
8 divided by 45 is 0 with a remainder of 8.
Record the quotient 0 as the next digit in the result. 
Result so far: 370.0
Deduct 0 from 8 and we're left with 8.
Take the next digit (6) from the dividend and append it to 8, then repeat: 86 / 45

Moving on to step 6:
86 divided by 45 is 1 with a remainder of 41.
The number 1 becomes the next digit in our result. 
Result so far: 3701.0
Deduct 45 from 86 and we're left with 41.
Since there are no more digits in the dividend, we add a zero to the remainder making it 410, and continue the process.

On to step 7:
45 can be fit into 410 9 times, resulting in a remainder of 5.
Use 9 as the next digit of our solution. 
Result so far: 3701.9
Subtracting 405 from 410 leaves us with 5.
Since there are no more digits in the dividend, we add a zero to the remainder making it 50, and continue the process.

Going ahead to step 8:
The number 45 fits into 50 1 times, leaving a remainder of 5.
The number 1 becomes the next digit in our result. 
Result so far: 3701.91
Deduct 45 from 50 and we're left with 5.
Since there are no more digits in the dividend, we add a zero to the remainder making it 50, and continue the process.

On to step 9:
If we divide 50 by 45, we get 1 and a remainder of 5.
Write down 1 as next digit of the result. 
Result so far: 3701.911
Subtracting 45 from 50 leaves us with 5.
Since there are no more digits in the dividend, we add a zero to the remainder making it 50, and continue the process.

In conclusion, the division gives 3701.911 with a balance of 0.0005.