We divide 399471 by 40
Let's see how many times 40 fits into 399471.

Advancing to step 1:
When dividing 3 by 40, we get 0 with a remainder of 3.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Subtract 0 from 3 to get 3.
Fetch the next digit (9) from the dividend, attach it to 3 and continue: 39 / 40

Advancing to step 2:
The number 40 fits into 39 0 times, leaving a remainder of 39.
The next digit of our result is 0. 
Result so far: 0.0
Subtract 0 from 39 to get 39.
Take the next digit (9) from the dividend and append it to 39, then repeat: 399 / 40

On to step 3:
The number 40 fits into 399 9 times, leaving a remainder of 39.
Record the quotient 9 as the next digit in the result. 
Result so far: 9.0
If we take 360 away from 399, we end up with 39.
Grab the next digit (4) from the dividend, add it to 39, then carry on: 394 / 40

On to step 4:
40 goes into 394 9 times with a remainder of 34.
The number 9 becomes the next digit in our result. 
Result so far: 99.0
The remainder is 34 after subtracting 360 from 394.
Bring next digit (7) of the dividend behind the 34 and repeat the process: 347 / 40

Let's proceed to step 5:
40 can be fit into 347 8 times, resulting in a remainder of 27.
Record the quotient 8 as the next digit in the result. 
Result so far: 998.0
Subtracting 320 from 347 leaves us with 27.
Grab the next digit (1) from the dividend, add it to 27, then carry on: 271 / 40

Step 6:
The number 40 fits into 271 6 times, leaving a remainder of 31.
The number 6 becomes the next digit in our result. 
Result so far: 9986.0
The remainder is 31 after subtracting 240 from 271.
Since there are no more digits in the dividend, we add a zero to the remainder making it 310, and continue the process.

On to step 7:
When dividing 310 by 40, we get 7 with a remainder of 30.
Put 7 as the next digit of the answer. 
Result so far: 9986.7
If we subtract 280 from 310, 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.

Moving on to step 8:
If we divide 300 by 40, we get 7 and a remainder of 20.
The number 7 becomes the next digit in our result. 
Result so far: 9986.77
The remainder is 20 after subtracting 280 from 300.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

In conclusion, the division gives 9986.77 with a balance of 0.02.