387840 ÷ 40 
Our goal is to divide 387840 by 40.

On to step 1:
40 goes into 3 0 times with a remainder of 3.
Write down 0 as next digit of the result. 
Result so far: 0.0
If we take 0 away from 3, we end up with 3.
Take the next digit (8) from the dividend and append it to 3, then repeat: 38 / 40

Let's proceed to step 2:
40 can be fit into 38 0 times, resulting in a remainder of 38.
Use 0 as the next digit of our solution. 
Result so far: 0.0
Subtracting 0 from 38 leaves us with 38.
Include the next digit (7) from the dividend after 38, then repeat: 387 / 40

Advancing to step 3:
The number 40 fits into 387 9 times, leaving a remainder of 27.
Write down 9 as next digit of the result. 
Result so far: 9.0
Deduct 360 from 387 and we're left with 27.
Bring next digit (8) of the dividend behind the 27 and repeat the process: 278 / 40

Let's proceed to step 4:
40 goes into 278 6 times with a remainder of 38.
Put 6 as the next digit of the answer. 
Result so far: 96.0
Deduct 240 from 278 and we're left with 38.
Append the next digit (4) from the dividend to 38 and continue with: 384 / 40

On to step 5:
The number 40 fits into 384 9 times, leaving a remainder of 24.
The number 9 becomes the next digit in our result. 
Result so far: 969.0
The remainder is 24 after subtracting 360 from 384.
Grab the next digit (0) from the dividend, add it to 24, then carry on: 240 / 40

Moving on to step 6:
The number 40 fits into 240 6 times, leaving a remainder of 0.
The next digit of our result is 6. 
Result so far: 9696.0
Deduct 240 from 240 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.

Moving on to step 7:
The number 40 fits into 0 0 times, leaving a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 9696.0
Subtracting 0 from 0 leaves us 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 8:
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: 9696.0
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.

In conclusion, the division gives 9696.0 with a balance of 0.0.