We're dividing 40001387 by 842 
We want to divide 40001387 by 842.

Moving on to step 1:
842 goes into 4 0 times with a remainder of 4.
Put 0 as the next digit of the answer. 
Result so far: 0.0
Deduct 0 from 4 and we're left with 4.
Fetch the next digit (0) from the dividend, attach it to 4 and continue: 40 / 842

Step 2:
The number 842 fits into 40 0 times, leaving a remainder of 40.
The next digit of our result is 0. 
Result so far: 0.0
Subtract 0 from 40 to get 40.
Include the next digit (0) from the dividend after 40, then repeat: 400 / 842

Let's proceed to step 3:
When dividing 400 by 842, we get 0 with a remainder of 400.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Deduct 0 from 400 and we're left with 400.
Include the next digit (0) from the dividend after 400, then repeat: 4000 / 842

Advancing to step 4:
842 goes into 4000 4 times with a remainder of 632.
Use 4 as the next digit of our solution. 
Result so far: 4.0
If we take 3368 away from 4000, we end up with 632.
Include the next digit (1) from the dividend after 632, then repeat: 6321 / 842

Step 5:
If we divide 6321 by 842, we get 7 and a remainder of 427.
Put 7 as the next digit of the answer. 
Result so far: 47.0
Subtract 5894 from 6321 to get 427.
Bring next digit (3) of the dividend behind the 427 and repeat the process: 4273 / 842

Advancing to step 6:
4273 divided by 842 is 5 with a remainder of 63.
Write down 5 as next digit of the result. 
Result so far: 475.0
The remainder is 63 after subtracting 4210 from 4273.
Include the next digit (8) from the dividend after 63, then repeat: 638 / 842

On to step 7:
The number 842 fits into 638 0 times, leaving a remainder of 638.
Write down 0 as next digit of the result. 
Result so far: 4750.0
If we take 0 away from 638, we end up with 638.
Bring next digit (7) of the dividend behind the 638 and repeat the process: 6387 / 842

Moving on to step 8:
The number 842 fits into 6387 7 times, leaving a remainder of 493.
Write down 7 as next digit of the result. 
Result so far: 47507.0
The remainder is 493 after subtracting 5894 from 6387.
Since there are no more digits in the dividend, we add a zero to the remainder making it 4930, and continue the process.

On to step 9:
If we divide 4930 by 842, we get 5 and a remainder of 720.
Put 5 as the next digit of the answer. 
Result so far: 47507.5
Subtracting 4210 from 4930 leaves us with 720.
Since there are no more digits in the dividend, we add a zero to the remainder making it 7200, and continue the process.

Advancing to step 10:
842 can be fit into 7200 8 times, resulting in a remainder of 464.
Put 8 as the next digit of the answer. 
Result so far: 47507.58
Deduct 6736 from 7200 and we're left with 464.
Since there are no more digits in the dividend, we add a zero to the remainder making it 4640, and continue the process.

On to step 11:
842 can be fit into 4640 5 times, resulting in a remainder of 430.
Write down 5 as next digit of the result. 
Result so far: 47507.585
Subtract 4210 from 4640 to get 430.
Since there are no more digits in the dividend, we add a zero to the remainder making it 4300, and continue the process.

On to step 12:
4300 divided by 842 is 5 with a remainder of 90.
Use 5 as the next digit of our solution. 
Result so far: 47507.5855
If we take 4210 away from 4300, we end up with 90.
Since there are no more digits in the dividend, we add a zero to the remainder making it 900, and continue the process.

After the division, we end up with 47507.5855 and a remainder of 0.0009.