We divide 40147 by 87
We want to divide 40147 by 87.

On to step 1:
87 goes into 4 0 times with a remainder of 4.
Write down 0 as next digit of the result. 
Result so far: 0.0
If we subtract 0 from 4, we get 4.
Include the next digit (0) from the dividend after 4, then repeat: 40 / 87

Going ahead to step 2:
The number 87 fits into 40 0 times, leaving a remainder of 40.
Use 0 as the next digit of our solution. 
Result so far: 0.0
If we take 0 away from 40, we end up with 40.
Grab the next digit (1) from the dividend, add it to 40, then carry on: 401 / 87

Moving on to step 3:
401 divided by 87 is 4 with a remainder of 53.
Write down 4 as next digit of the result. 
Result so far: 4.0
Deduct 348 from 401 and we're left with 53.
Bring next digit (4) of the dividend behind the 53 and repeat the process: 534 / 87

Let's proceed to step 4:
When dividing 534 by 87, we get 6 with a remainder of 12.
Write down 6 as next digit of the result. 
Result so far: 46.0
Subtracting 522 from 534 leaves us with 12.
Grab the next digit (7) from the dividend, add it to 12, then carry on: 127 / 87

On to step 5:
If we divide 127 by 87, we get 1 and a remainder of 40.
Put 1 as the next digit of the answer. 
Result so far: 461.0
Subtracting 87 from 127 leaves us with 40.
Since there are no more digits in the dividend, we add a zero to the remainder making it 400, and continue the process.

On to step 6:
When dividing 400 by 87, we get 4 with a remainder of 52.
Put 4 as the next digit of the answer. 
Result so far: 461.4
Subtract 348 from 400 to get 52.
Since there are no more digits in the dividend, we add a zero to the remainder making it 520, and continue the process.

Moving on to step 7:
If we divide 520 by 87, we get 5 and a remainder of 85.
Write down 5 as next digit of the result. 
Result so far: 461.45
If we subtract 435 from 520, we get 85.
Since there are no more digits in the dividend, we add a zero to the remainder making it 850, and continue the process.

Going ahead to step 8:
The number 87 fits into 850 9 times, leaving a remainder of 67.
Put 9 as the next digit of the answer. 
Result so far: 461.459
The remainder is 67 after subtracting 783 from 850.
Since there are no more digits in the dividend, we add a zero to the remainder making it 670, and continue the process.

Let's proceed to step 9:
If we divide 670 by 87, we get 7 and a remainder of 61.
The number 7 becomes the next digit in our result. 
Result so far: 461.4597
Subtracting 609 from 670 leaves us with 61.
Since there are no more digits in the dividend, we add a zero to the remainder making it 610, and continue the process.

Step 10:
When dividing 610 by 87, we get 7 with a remainder of 1.
Use 7 as the next digit of our solution. 
Result so far: 461.45977
If we take 609 away from 610, we end up with 1.
Since there are no more digits in the dividend, we add a zero to the remainder making it 10, and continue the process.

After the division, we end up with 461.45977 and a remainder of 1e-06.