Let's divide 866158 by 40
We want to divide 866158 by 40.

On to step 1:
40 goes into 8 0 times with a remainder of 8.
Put 0 as the next digit of the answer. 
Result so far: 0.0
The remainder is 8 after subtracting 0 from 8.
Append the next digit (6) from the dividend to 8 and continue with: 86 / 40

Let's proceed to step 2:
40 goes into 86 2 times with a remainder of 6.
The next digit of our result is 2. 
Result so far: 2.0
Subtract 80 from 86 to get 6.
Include the next digit (6) from the dividend after 6, then repeat: 66 / 40

Moving on to step 3:
40 can be fit into 66 1 times, resulting in a remainder of 26.
Record the quotient 1 as the next digit in the result. 
Result so far: 21.0
Subtracting 40 from 66 leaves us with 26.
Include the next digit (1) from the dividend after 26, then repeat: 261 / 40

Moving on to step 4:
If we divide 261 by 40, we get 6 and a remainder of 21.
Put 6 as the next digit of the answer. 
Result so far: 216.0
If we subtract 240 from 261, we get 21.
Bring next digit (5) of the dividend behind the 21 and repeat the process: 215 / 40

Step 5:
40 goes into 215 5 times with a remainder of 15.
The number 5 becomes the next digit in our result. 
Result so far: 2165.0
If we subtract 200 from 215, we get 15.
Append the next digit (8) from the dividend to 15 and continue with: 158 / 40

Advancing to step 6:
If we divide 158 by 40, we get 3 and a remainder of 38.
Put 3 as the next digit of the answer. 
Result so far: 21653.0
Subtract 120 from 158 to get 38.
Since there are no more digits in the dividend, we add a zero to the remainder making it 380, and continue the process.

Advancing to step 7:
When dividing 380 by 40, we get 9 with a remainder of 20.
The next digit of our result is 9. 
Result so far: 21653.9
Subtract 360 from 380 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.

Advancing to step 8:
If we divide 200 by 40, we get 5 and a remainder of 0.
The next digit of our result is 5. 
Result so far: 21653.95
If we take 200 away from 200, 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.

Step 9:
The number 40 fits into 0 0 times, leaving a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 21653.95
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:
The number 40 fits into 0 0 times, leaving a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 21653.95
Deduct 0 from 0 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.

Our division results in 21653.95 with a remaining 0.0.