865947 ÷ 40 
Let's see how many times 40 fits into 865947.

Going ahead to step 1:
The number 40 fits into 8 0 times, leaving a remainder of 8.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Subtracting 0 from 8 leaves us with 8.
Bring next digit (6) of the dividend behind the 8 and repeat the process: 86 / 40

Moving on to step 2:
When dividing 86 by 40, we get 2 with a remainder of 6.
Record the quotient 2 as the next digit in the result. 
Result so far: 2.0
If we subtract 80 from 86, we get 6.
Append the next digit (5) from the dividend to 6 and continue with: 65 / 40

Step 3:
The number 40 fits into 65 1 times, leaving a remainder of 25.
Write down 1 as next digit of the result. 
Result so far: 21.0
Deduct 40 from 65 and we're left with 25.
Append the next digit (9) from the dividend to 25 and continue with: 259 / 40

On to step 4:
If we divide 259 by 40, we get 6 and a remainder of 19.
Record the quotient 6 as the next digit in the result. 
Result so far: 216.0
Subtracting 240 from 259 leaves us with 19.
Include the next digit (4) from the dividend after 19, then repeat: 194 / 40

Going ahead to step 5:
40 can be fit into 194 4 times, resulting in a remainder of 34.
Record the quotient 4 as the next digit in the result. 
Result so far: 2164.0
Subtract 160 from 194 to get 34.
Append the next digit (7) from the dividend to 34 and continue with: 347 / 40

On to step 6:
The number 40 fits into 347 8 times, leaving a remainder of 27.
Write down 8 as next digit of the result. 
Result so far: 21648.0
If we subtract 320 from 347, we get 27.
Since there are no more digits in the dividend, we add a zero to the remainder making it 270, and continue the process.

Let's proceed to step 7:
When dividing 270 by 40, we get 6 with a remainder of 30.
Record the quotient 6 as the next digit in the result. 
Result so far: 21648.6
If we subtract 240 from 270, 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.

Advancing to step 8:
If we divide 300 by 40, we get 7 and a remainder of 20.
Write down 7 as next digit of the result. 
Result so far: 21648.67
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.

Advancing to step 9:
40 can be fit into 200 5 times, resulting in a remainder of 0.
Put 5 as the next digit of the answer. 
Result so far: 21648.675
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.

Let's proceed to step 10:
When dividing 0 by 40, we get 0 with a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 21648.675
Subtract 0 from 0 to get 0.
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 11:
The number 40 fits into 0 0 times, leaving a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 21648.675
If we subtract 0 from 0, we get 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 21648.675 with a remainder of 0.0.