We're dividing 516815 by 40 
We want to figure out the number of times 516815 can be divided by 40.

Advancing to step 1:
40 can be fit into 5 0 times, resulting in a remainder of 5.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
The remainder is 5 after subtracting 0 from 5.
Append the next digit (1) from the dividend to 5 and continue with: 51 / 40

Going ahead to step 2:
The number 40 fits into 51 1 times, leaving a remainder of 11.
Put 1 as the next digit of the answer. 
Result so far: 1.0
If we take 40 away from 51, we end up with 11.
Include the next digit (6) from the dividend after 11, then repeat: 116 / 40

Going ahead to step 3:
40 goes into 116 2 times with a remainder of 36.
Put 2 as the next digit of the answer. 
Result so far: 12.0
Subtract 80 from 116 to get 36.
Grab the next digit (8) from the dividend, add it to 36, then carry on: 368 / 40

On to step 4:
When dividing 368 by 40, we get 9 with a remainder of 8.
The next digit of our result is 9. 
Result so far: 129.0
If we subtract 360 from 368, we get 8.
Grab the next digit (1) from the dividend, add it to 8, then carry on: 81 / 40

Going ahead to step 5:
If we divide 81 by 40, we get 2 and a remainder of 1.
Record the quotient 2 as the next digit in the result. 
Result so far: 1292.0
If we subtract 80 from 81, we get 1.
Bring next digit (5) of the dividend behind the 1 and repeat the process: 15 / 40

On to step 6:
40 can be fit into 15 0 times, resulting in a remainder of 15.
Use 0 as the next digit of our solution. 
Result so far: 12920.0
If we subtract 0 from 15, we get 15.
Since there are no more digits in the dividend, we add a zero to the remainder making it 150, and continue the process.

Going ahead to step 7:
40 can be fit into 150 3 times, resulting in a remainder of 30.
Use 3 as the next digit of our solution. 
Result so far: 12920.3
Subtracting 120 from 150 leaves us 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.

On to step 8:
40 goes into 300 7 times with a remainder of 20.
The number 7 becomes the next digit in our result. 
Result so far: 12920.37
Subtracting 280 from 300 leaves us 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 9:
40 goes into 200 5 times with a remainder of 0.
Record the quotient 5 as the next digit in the result. 
Result so far: 12920.375
Subtracting 200 from 200 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 10:
40 can be fit into 0 0 times, resulting in a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 12920.375
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.

Let's proceed to step 11:
0 divided by 40 is 0 with a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 12920.375
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.

After the division, we end up with 12920.375 and a remainder of 0.0.