We're dividing 516985 by 40 
Let's see how many times 40 fits into 516985.

Moving on to step 1:
If we divide 5 by 40, we get 0 and a remainder of 5.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Deduct 0 from 5 and we're left with 5.
Take the next digit (1) from the dividend and append it to 5, then repeat: 51 / 40

Moving on 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
Subtracting 40 from 51 leaves us with 11.
Take the next digit (6) from the dividend and append it to 11, then repeat: 116 / 40

Let's proceed to step 3:
The number 40 fits into 116 2 times, leaving a remainder of 36.
The next digit of our result is 2. 
Result so far: 12.0
If we subtract 80 from 116, we get 36.
Append the next digit (9) from the dividend to 36 and continue with: 369 / 40

Advancing to step 4:
369 divided by 40 is 9 with a remainder of 9.
Write down 9 as next digit of the result. 
Result so far: 129.0
Subtracting 360 from 369 leaves us with 9.
Bring next digit (8) of the dividend behind the 9 and repeat the process: 98 / 40

Step 5:
40 goes into 98 2 times with a remainder of 18.
Record the quotient 2 as the next digit in the result. 
Result so far: 1292.0
If we take 80 away from 98, we end up with 18.
Grab the next digit (5) from the dividend, add it to 18, then carry on: 185 / 40

On to step 6:
The number 40 fits into 185 4 times, leaving a remainder of 25.
Use 4 as the next digit of our solution. 
Result so far: 12924.0
If we take 160 away from 185, we end up with 25.
Since there are no more digits in the dividend, we add a zero to the remainder making it 250, and continue the process.

Moving on to step 7:
When dividing 250 by 40, we get 6 with a remainder of 10.
Record the quotient 6 as the next digit in the result. 
Result so far: 12924.6
If we take 240 away from 250, we end up with 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

On to step 8:
When dividing 100 by 40, we get 2 with a remainder of 20.
Use 2 as the next digit of our solution. 
Result so far: 12924.62
If we take 80 away from 100, 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 9:
When dividing 200 by 40, we get 5 with a remainder of 0.
Write down 5 as next digit of the result. 
Result so far: 12924.625
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.

On to step 10:
When dividing 0 by 40, we get 0 with a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 12924.625
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.

Step 11:
The number 40 fits into 0 0 times, leaving a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 12924.625
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.

Our division results in 12924.625 with a remaining 0.0.