Let's divide 986790 by 40
We want to figure out the number of times 986790 can be divided by 40.

Going ahead to step 1:
40 goes into 9 0 times with a remainder of 9.
Put 0 as the next digit of the answer. 
Result so far: 0.0
Subtracting 0 from 9 leaves us with 9.
Grab the next digit (8) from the dividend, add it to 9, then carry on: 98 / 40

Moving on to step 2:
40 goes into 98 2 times with a remainder of 18.
Put 2 as the next digit of the answer. 
Result so far: 2.0
Subtract 80 from 98 to get 18.
Fetch the next digit (6) from the dividend, attach it to 18 and continue: 186 / 40

Advancing to step 3:
186 divided by 40 is 4 with a remainder of 26.
Put 4 as the next digit of the answer. 
Result so far: 24.0
The remainder is 26 after subtracting 160 from 186.
Append the next digit (7) from the dividend to 26 and continue with: 267 / 40

Let's proceed to step 4:
The number 40 fits into 267 6 times, leaving a remainder of 27.
Use 6 as the next digit of our solution. 
Result so far: 246.0
Subtracting 240 from 267 leaves us with 27.
Include the next digit (9) from the dividend after 27, then repeat: 279 / 40

Advancing to step 5:
279 divided by 40 is 6 with a remainder of 39.
The next digit of our result is 6. 
Result so far: 2466.0
Subtract 240 from 279 to get 39.
Bring next digit (0) of the dividend behind the 39 and repeat the process: 390 / 40

Step 6:
390 divided by 40 is 9 with a remainder of 30.
The number 9 becomes the next digit in our result. 
Result so far: 24669.0
Deduct 360 from 390 and we're left with 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

Step 7:
When dividing 300 by 40, we get 7 with a remainder of 20.
The next digit of our result is 7. 
Result so far: 24669.7
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 8:
200 divided by 40 is 5 with a remainder of 0.
The next digit of our result is 5. 
Result so far: 24669.75
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 9:
40 goes into 0 0 times with a remainder of 0.
The next digit of our result is 0. 
Result so far: 24669.75
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.

Going ahead to step 10:
0 divided by 40 is 0 with a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 24669.75
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.

The final outcome is 24669.75, with a leftover of 0.0.