We divide 506412 by 40
We want to figure out the number of times 506412 can be divided by 40.

Step 1:
5 divided by 40 is 0 with a remainder of 5.
Write down 0 as next digit of the result. 
Result so far: 0.0
If we take 0 away from 5, we end up with 5.
Bring next digit (0) of the dividend behind the 5 and repeat the process: 50 / 40

Moving on to step 2:
50 divided by 40 is 1 with a remainder of 10.
Put 1 as the next digit of the answer. 
Result so far: 1.0
Deduct 40 from 50 and we're left with 10.
Take the next digit (6) from the dividend and append it to 10, then repeat: 106 / 40

Advancing to step 3:
If we divide 106 by 40, we get 2 and a remainder of 26.
Write down 2 as next digit of the result. 
Result so far: 12.0
The remainder is 26 after subtracting 80 from 106.
Include the next digit (4) from the dividend after 26, then repeat: 264 / 40

Going ahead to step 4:
40 goes into 264 6 times with a remainder of 24.
The next digit of our result is 6. 
Result so far: 126.0
Subtracting 240 from 264 leaves us with 24.
Fetch the next digit (1) from the dividend, attach it to 24 and continue: 241 / 40

Step 5:
The number 40 fits into 241 6 times, leaving a remainder of 1.
The next digit of our result is 6. 
Result so far: 1266.0
Subtract 240 from 241 to get 1.
Include the next digit (2) from the dividend after 1, then repeat: 12 / 40

Step 6:
When dividing 12 by 40, we get 0 with a remainder of 12.
The number 0 becomes the next digit in our result. 
Result so far: 12660.0
If we subtract 0 from 12, we get 12.
Since there are no more digits in the dividend, we add a zero to the remainder making it 120, and continue the process.

Moving on to step 7:
40 goes into 120 3 times with a remainder of 0.
Write down 3 as next digit of the result. 
Result so far: 12660.3
If we take 120 away from 120, 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.

Going ahead to step 8:
The number 40 fits into 0 0 times, leaving a remainder of 0.
The next digit of our result is 0. 
Result so far: 12660.3
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.

Advancing to step 9:
If we divide 0 by 40, we get 0 and a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 12660.3
The remainder is 0 after subtracting 0 from 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 12660.3 with a remainder of 0.0.