Let's divide 399861 by 40
Our goal is to divide 399861 by 40.

Moving on to step 1:
If we divide 3 by 40, we get 0 and a remainder of 3.
Put 0 as the next digit of the answer. 
Result so far: 0.0
The remainder is 3 after subtracting 0 from 3.
Take the next digit (9) from the dividend and append it to 3, then repeat: 39 / 40

Let's proceed to step 2:
If we divide 39 by 40, we get 0 and a remainder of 39.
Write down 0 as next digit of the result. 
Result so far: 0.0
The remainder is 39 after subtracting 0 from 39.
Fetch the next digit (9) from the dividend, attach it to 39 and continue: 399 / 40

On to step 3:
When dividing 399 by 40, we get 9 with a remainder of 39.
Record the quotient 9 as the next digit in the result. 
Result so far: 9.0
Deduct 360 from 399 and we're left with 39.
Bring next digit (8) of the dividend behind the 39 and repeat the process: 398 / 40

Going ahead to step 4:
The number 40 fits into 398 9 times, leaving a remainder of 38.
Put 9 as the next digit of the answer. 
Result so far: 99.0
Deduct 360 from 398 and we're left with 38.
Grab the next digit (6) from the dividend, add it to 38, then carry on: 386 / 40

Advancing to step 5:
If we divide 386 by 40, we get 9 and a remainder of 26.
Record the quotient 9 as the next digit in the result. 
Result so far: 999.0
The remainder is 26 after subtracting 360 from 386.
Bring next digit (1) of the dividend behind the 26 and repeat the process: 261 / 40

Step 6:
The number 40 fits into 261 6 times, leaving a remainder of 21.
Record the quotient 6 as the next digit in the result. 
Result so far: 9996.0
The remainder is 21 after subtracting 240 from 261.
Since there are no more digits in the dividend, we add a zero to the remainder making it 210, and continue the process.

Advancing to step 7:
The number 40 fits into 210 5 times, leaving a remainder of 10.
The number 5 becomes the next digit in our result. 
Result so far: 9996.5
Subtracting 200 from 210 leaves us with 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Let's proceed to step 8:
The number 40 fits into 100 2 times, leaving a remainder of 20.
Record the quotient 2 as the next digit in the result. 
Result so far: 9996.52
Deduct 80 from 100 and we're left 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.

Let's proceed to step 9:
40 goes into 200 5 times with a remainder of 0.
Use 5 as the next digit of our solution. 
Result so far: 9996.525
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 10:
0 divided by 40 is 0 with a remainder of 0.
The next digit of our result is 0. 
Result so far: 9996.525
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:
0 divided by 40 is 0 with a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 9996.525
If we take 0 away from 0, 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.

Our division results in 9996.525 with a remaining 0.0.