Let's divide 40134487 by 865
Our goal is to divide 40134487 by 865.

On to step 1:
If we divide 4 by 865, we get 0 and a remainder of 4.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Subtracting 0 from 4 leaves us with 4.
Grab the next digit (0) from the dividend, add it to 4, then carry on: 40 / 865

Going ahead to step 2:
When dividing 40 by 865, we get 0 with a remainder of 40.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
Deduct 0 from 40 and we're left with 40.
Take the next digit (1) from the dividend and append it to 40, then repeat: 401 / 865

On to step 3:
The number 865 fits into 401 0 times, leaving a remainder of 401.
Use 0 as the next digit of our solution. 
Result so far: 0.0
The remainder is 401 after subtracting 0 from 401.
Fetch the next digit (3) from the dividend, attach it to 401 and continue: 4013 / 865

Going ahead to step 4:
If we divide 4013 by 865, we get 4 and a remainder of 553.
Put 4 as the next digit of the answer. 
Result so far: 4.0
Deduct 3460 from 4013 and we're left with 553.
Include the next digit (4) from the dividend after 553, then repeat: 5534 / 865

Step 5:
When dividing 5534 by 865, we get 6 with a remainder of 344.
Write down 6 as next digit of the result. 
Result so far: 46.0
The remainder is 344 after subtracting 5190 from 5534.
Include the next digit (4) from the dividend after 344, then repeat: 3444 / 865

Moving on to step 6:
If we divide 3444 by 865, we get 3 and a remainder of 849.
Put 3 as the next digit of the answer. 
Result so far: 463.0
The remainder is 849 after subtracting 2595 from 3444.
Grab the next digit (8) from the dividend, add it to 849, then carry on: 8498 / 865

Step 7:
8498 divided by 865 is 9 with a remainder of 713.
Write down 9 as next digit of the result. 
Result so far: 4639.0
Deduct 7785 from 8498 and we're left with 713.
Include the next digit (7) from the dividend after 713, then repeat: 7137 / 865

Let's proceed to step 8:
If we divide 7137 by 865, we get 8 and a remainder of 217.
Record the quotient 8 as the next digit in the result. 
Result so far: 46398.0
The remainder is 217 after subtracting 6920 from 7137.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2170, and continue the process.

Let's proceed to step 9:
2170 divided by 865 is 2 with a remainder of 440.
Write down 2 as next digit of the result. 
Result so far: 46398.2
If we subtract 1730 from 2170, we get 440.
Since there are no more digits in the dividend, we add a zero to the remainder making it 4400, and continue the process.

Advancing to step 10:
The number 865 fits into 4400 5 times, leaving a remainder of 75.
Use 5 as the next digit of our solution. 
Result so far: 46398.25
Subtract 4325 from 4400 to get 75.
Since there are no more digits in the dividend, we add a zero to the remainder making it 750, and continue the process.

Advancing to step 11:
When dividing 750 by 865, we get 0 with a remainder of 750.
Record the quotient 0 as the next digit in the result. 
Result so far: 46398.25
Deduct 0 from 750 and we're left with 750.
Since there are no more digits in the dividend, we add a zero to the remainder making it 7500, and continue the process.

Step 12:
The number 865 fits into 7500 8 times, leaving a remainder of 580.
Put 8 as the next digit of the answer. 
Result so far: 46398.2508
If we subtract 6920 from 7500, we get 580.
Since there are no more digits in the dividend, we add a zero to the remainder making it 5800, and continue the process.

Advancing to step 13:
865 goes into 5800 6 times with a remainder of 610.
Write down 6 as next digit of the result. 
Result so far: 46398.25086
Subtracting 5190 from 5800 leaves us with 610.
Since there are no more digits in the dividend, we add a zero to the remainder making it 6100, and continue the process.

Advancing to step 14:
The number 865 fits into 6100 7 times, leaving a remainder of 45.
The next digit of our result is 7. 
Result so far: 46398.250867
Deduct 6055 from 6100 and we're left with 45.
Since there are no more digits in the dividend, we add a zero to the remainder making it 450, and continue the process.

Advancing to step 15:
450 divided by 865 is 0 with a remainder of 450.
Put 0 as the next digit of the answer. 
Result so far: 46398.250867
The remainder is 450 after subtracting 0 from 450.
Since there are no more digits in the dividend, we add a zero to the remainder making it 4500, and continue the process.

Advancing to step 16:
If we divide 4500 by 865, we get 5 and a remainder of 175.
Record the quotient 5 as the next digit in the result. 
Result so far: 46398.25086705
The remainder is 175 after subtracting 4325 from 4500.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1750, and continue the process.

The final outcome is 46398.25086705, with a leftover of 1.75e-07.