We're dividing 87365163 by 40 
We want to figure out the number of times 87365163 can be divided by 40.

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

Let's proceed to step 2:
The number 40 fits into 87 2 times, leaving a remainder of 7.
The next digit of our result is 2. 
Result so far: 2.0
Subtracting 80 from 87 leaves us with 7.
Grab the next digit (3) from the dividend, add it to 7, then carry on: 73 / 40

On to step 3:
73 divided by 40 is 1 with a remainder of 33.
Use 1 as the next digit of our solution. 
Result so far: 21.0
If we take 40 away from 73, we end up with 33.
Take the next digit (6) from the dividend and append it to 33, then repeat: 336 / 40

Moving on to step 4:
If we divide 336 by 40, we get 8 and a remainder of 16.
Put 8 as the next digit of the answer. 
Result so far: 218.0
Subtracting 320 from 336 leaves us with 16.
Append the next digit (5) from the dividend to 16 and continue with: 165 / 40

Advancing to step 5:
The number 40 fits into 165 4 times, leaving a remainder of 5.
Put 4 as the next digit of the answer. 
Result so far: 2184.0
If we subtract 160 from 165, we get 5.
Include the next digit (1) from the dividend after 5, then repeat: 51 / 40

Going ahead to step 6:
40 can be fit into 51 1 times, resulting in a remainder of 11.
Record the quotient 1 as the next digit in the result. 
Result so far: 21841.0
If we take 40 away from 51, we end up with 11.
Take the next digit (6) from the dividend and append it to 11, then repeat: 116 / 40

Going ahead to step 7:
40 can be fit into 116 2 times, resulting in a remainder of 36.
Use 2 as the next digit of our solution. 
Result so far: 218412.0
Deduct 80 from 116 and we're left with 36.
Take the next digit (3) from the dividend and append it to 36, then repeat: 363 / 40

On to step 8:
When dividing 363 by 40, we get 9 with a remainder of 3.
The next digit of our result is 9. 
Result so far: 2184129.0
Subtract 360 from 363 to get 3.
Since there are no more digits in the dividend, we add a zero to the remainder making it 30, and continue the process.

Let's proceed to step 9:
40 can be fit into 30 0 times, resulting in a remainder of 30.
Write down 0 as next digit of the result. 
Result so far: 2184129.0
Deduct 0 from 30 and we're left 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.

Let's proceed to step 10:
The number 40 fits into 300 7 times, leaving a remainder of 20.
The number 7 becomes the next digit in our result. 
Result so far: 2184129.07
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.

Step 11:
If we divide 200 by 40, we get 5 and a remainder of 0.
The number 5 becomes the next digit in our result. 
Result so far: 2184129.075
Subtracting 200 from 200 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 12:
0 divided by 40 is 0 with a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 2184129.075
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.

Advancing to step 13:
If we divide 0 by 40, we get 0 and a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 2184129.075
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 outcome is 2184129.075, with a leftover of 0.0.