316478 ÷ 40 
We're looking to find how many times 40 goes into 316478.

Advancing 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
If we subtract 0 from 3, we get 3.
Grab the next digit (1) from the dividend, add it to 3, then carry on: 31 / 40

Advancing to step 2:
If we divide 31 by 40, we get 0 and a remainder of 31.
The next digit of our result is 0. 
Result so far: 0.0
The remainder is 31 after subtracting 0 from 31.
Append the next digit (6) from the dividend to 31 and continue with: 316 / 40

Moving on to step 3:
316 divided by 40 is 7 with a remainder of 36.
The next digit of our result is 7. 
Result so far: 7.0
Subtracting 280 from 316 leaves us with 36.
Take the next digit (4) from the dividend and append it to 36, then repeat: 364 / 40

Let's proceed to step 4:
364 divided by 40 is 9 with a remainder of 4.
Record the quotient 9 as the next digit in the result. 
Result so far: 79.0
The remainder is 4 after subtracting 360 from 364.
Grab the next digit (7) from the dividend, add it to 4, then carry on: 47 / 40

Going ahead to step 5:
47 divided by 40 is 1 with a remainder of 7.
The number 1 becomes the next digit in our result. 
Result so far: 791.0
If we take 40 away from 47, we end up with 7.
Bring next digit (8) of the dividend behind the 7 and repeat the process: 78 / 40

Going ahead to step 6:
40 goes into 78 1 times with a remainder of 38.
The number 1 becomes the next digit in our result. 
Result so far: 7911.0
Subtracting 40 from 78 leaves us with 38.
Since there are no more digits in the dividend, we add a zero to the remainder making it 380, and continue the process.

Going ahead to step 7:
40 goes into 380 9 times with a remainder of 20.
Record the quotient 9 as the next digit in the result. 
Result so far: 7911.9
If we take 360 away from 380, 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.

Going ahead to step 8:
40 goes into 200 5 times with a remainder of 0.
Write down 5 as next digit of the result. 
Result so far: 7911.95
If we subtract 200 from 200, 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.

Moving on to step 9:
0 divided by 40 is 0 with a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 7911.95
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.

Advancing to step 10:
When dividing 0 by 40, we get 0 with a remainder of 0.
The next digit of our result is 0. 
Result so far: 7911.95
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.

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