We look at the division of 40474 by 8 
Let's see how many times 8 fits into 40474.

Advancing to step 1:
If we divide 4 by 8, we get 0 and a remainder of 4.
The next digit of our result is 0. 
Result so far: 0.0
If we take 0 away from 4, we end up with 4.
Bring next digit (0) of the dividend behind the 4 and repeat the process: 40 / 8

Going ahead to step 2:
40 divided by 8 is 5 with a remainder of 0.
Put 5 as the next digit of the answer. 
Result so far: 5.0
Subtracting 40 from 40 leaves us with 0.
Fetch the next digit (4) from the dividend, attach it to 0 and continue: 4 / 8

On to step 3:
8 goes into 4 0 times with a remainder of 4.
Use 0 as the next digit of our solution. 
Result so far: 50.0
Subtracting 0 from 4 leaves us with 4.
Grab the next digit (7) from the dividend, add it to 4, then carry on: 47 / 8

Going ahead to step 4:
8 can be fit into 47 5 times, resulting in a remainder of 7.
Write down 5 as next digit of the result. 
Result so far: 505.0
Subtract 40 from 47 to get 7.
Bring next digit (4) of the dividend behind the 7 and repeat the process: 74 / 8

Going ahead to step 5:
If we divide 74 by 8, we get 9 and a remainder of 2.
The number 9 becomes the next digit in our result. 
Result so far: 5059.0
Subtracting 72 from 74 leaves us with 2.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

Moving on to step 6:
20 divided by 8 is 2 with a remainder of 4.
Use 2 as the next digit of our solution. 
Result so far: 5059.2
The remainder is 4 after subtracting 16 from 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 40, and continue the process.

Let's proceed to step 7:
The number 8 fits into 40 5 times, leaving a remainder of 0.
Write down 5 as next digit of the result. 
Result so far: 5059.25
The remainder is 0 after subtracting 40 from 40.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Step 8:
8 can be fit into 0 0 times, resulting in a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 5059.25
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.

Let's proceed to step 9:
When dividing 0 by 8, we get 0 with a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 5059.25
The remainder is 0 after subtracting 0 from 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 5059.25 with a remainder of 0.0.