We divide 504076 by 40
We're looking to find how many times 40 goes into 504076.

Advancing to step 1:
40 goes into 5 0 times with a remainder of 5.
The next digit of our result is 0. 
Result so far: 0.0
Subtract 0 from 5 to get 5.
Fetch the next digit (0) from the dividend, attach it to 5 and continue: 50 / 40

On to step 2:
40 goes into 50 1 times with a remainder of 10.
Use 1 as the next digit of our solution. 
Result so far: 1.0
Subtracting 40 from 50 leaves us with 10.
Include the next digit (4) from the dividend after 10, then repeat: 104 / 40

On to step 3:
When dividing 104 by 40, we get 2 with a remainder of 24.
Put 2 as the next digit of the answer. 
Result so far: 12.0
If we subtract 80 from 104, we get 24.
Fetch the next digit (0) from the dividend, attach it to 24 and continue: 240 / 40

Moving on to step 4:
The number 40 fits into 240 6 times, leaving a remainder of 0.
Write down 6 as next digit of the result. 
Result so far: 126.0
Deduct 240 from 240 and we're left with 0.
Take the next digit (7) from the dividend and append it to 0, then repeat: 7 / 40

Advancing to step 5:
7 divided by 40 is 0 with a remainder of 7.
Write down 0 as next digit of the result. 
Result so far: 1260.0
If we take 0 away from 7, we end up with 7.
Take the next digit (6) from the dividend and append it to 7, then repeat: 76 / 40

Going ahead to step 6:
76 divided by 40 is 1 with a remainder of 36.
Put 1 as the next digit of the answer. 
Result so far: 12601.0
If we take 40 away from 76, we end up with 36.
Since there are no more digits in the dividend, we add a zero to the remainder making it 360, and continue the process.

Step 7:
40 can be fit into 360 9 times, resulting in a remainder of 0.
The number 9 becomes the next digit in our result. 
Result so far: 12601.9
Subtracting 360 from 360 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.

Moving on to step 8:
40 goes into 0 0 times with a remainder of 0.
The next digit of our result is 0. 
Result so far: 12601.9
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.

Advancing to step 9:
When dividing 0 by 40, we get 0 with a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 12601.9
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.

The final result is 12601.9 with a remainder of 0.0.