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

Let's proceed to step 1:
When dividing 4 by 40, we get 0 with a remainder of 4.
Put 0 as the next digit of the answer. 
Result so far: 0.0
Subtracting 0 from 4 leaves us with 4.
Append the next digit (9) from the dividend to 4 and continue with: 49 / 40

Moving on to step 2:
40 can be fit into 49 1 times, resulting in a remainder of 9.
The next digit of our result is 1. 
Result so far: 1.0
Subtract 40 from 49 to get 9.
Include the next digit (7) from the dividend after 9, then repeat: 97 / 40

On to step 3:
If we divide 97 by 40, we get 2 and a remainder of 17.
The number 2 becomes the next digit in our result. 
Result so far: 12.0
If we subtract 80 from 97, we get 17.
Bring next digit (7) of the dividend behind the 17 and repeat the process: 177 / 40

Advancing to step 4:
40 goes into 177 4 times with a remainder of 17.
Put 4 as the next digit of the answer. 
Result so far: 124.0
If we take 160 away from 177, we end up with 17.
Append the next digit (1) from the dividend to 17 and continue with: 171 / 40

On to step 5:
The number 40 fits into 171 4 times, leaving a remainder of 11.
Use 4 as the next digit of our solution. 
Result so far: 1244.0
If we take 160 away from 171, we end up with 11.
Include the next digit (1) from the dividend after 11, then repeat: 111 / 40

On to step 6:
If we divide 111 by 40, we get 2 and a remainder of 31.
Write down 2 as next digit of the result. 
Result so far: 12442.0
If we subtract 80 from 111, we get 31.
Since there are no more digits in the dividend, we add a zero to the remainder making it 310, and continue the process.

Moving on to step 7:
310 divided by 40 is 7 with a remainder of 30.
The number 7 becomes the next digit in our result. 
Result so far: 12442.7
Subtract 280 from 310 to get 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

On to step 8:
The number 40 fits into 300 7 times, leaving a remainder of 20.
The next digit of our result is 7. 
Result so far: 12442.77
Deduct 280 from 300 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.

The final result is 12442.77 with a remainder of 0.02.