We divide 504615 by 40
We want to divide 504615 by 40.

On to step 1:
40 can be fit into 5 0 times, resulting in a remainder of 5.
Write down 0 as next digit of the result. 
Result so far: 0.0
Subtract 0 from 5 to get 5.
Grab the next digit (0) from the dividend, add it to 5, then carry on: 50 / 40

On to step 2:
40 can be fit into 50 1 times, resulting in a remainder of 10.
The number 1 becomes the next digit in our result. 
Result so far: 1.0
Deduct 40 from 50 and we're left with 10.
Grab the next digit (4) from the dividend, add it to 10, then carry on: 104 / 40

Step 3:
If we divide 104 by 40, we get 2 and a remainder of 24.
Record the quotient 2 as the next digit in the result. 
Result so far: 12.0
The remainder is 24 after subtracting 80 from 104.
Include the next digit (6) from the dividend after 24, then repeat: 246 / 40

Step 4:
40 goes into 246 6 times with a remainder of 6.
The next digit of our result is 6. 
Result so far: 126.0
If we subtract 240 from 246, we get 6.
Append the next digit (1) from the dividend to 6 and continue with: 61 / 40

Let's proceed to step 5:
If we divide 61 by 40, we get 1 and a remainder of 21.
Write down 1 as next digit of the result. 
Result so far: 1261.0
If we subtract 40 from 61, we get 21.
Take the next digit (5) from the dividend and append it to 21, then repeat: 215 / 40

Advancing to step 6:
When dividing 215 by 40, we get 5 with a remainder of 15.
Record the quotient 5 as the next digit in the result. 
Result so far: 12615.0
Subtracting 200 from 215 leaves us with 15.
Since there are no more digits in the dividend, we add a zero to the remainder making it 150, and continue the process.

Advancing to step 7:
150 divided by 40 is 3 with a remainder of 30.
Use 3 as the next digit of our solution. 
Result so far: 12615.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.

Going ahead 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: 12615.37
If we take 280 away from 300, 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:
40 goes into 200 5 times with a remainder of 0.
Put 5 as the next digit of the answer. 
Result so far: 12615.375
Subtract 200 from 200 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.

Step 10:
The number 40 fits into 0 0 times, leaving a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 12615.375
Subtracting 0 from 0 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.

Going ahead to step 11:
If we divide 0 by 40, we get 0 and a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 12615.375
Subtracting 0 from 0 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.

The final result is 12615.375 with a remainder of 0.0.