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

Step 1:
When dividing 4 by 870, we get 0 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.
Append the next digit (0) from the dividend to 4 and continue with: 40 / 870

Let's proceed to step 2:
When dividing 40 by 870, we get 0 with a remainder of 40.
Write down 0 as next digit of the result. 
Result so far: 0.0
Subtracting 0 from 40 leaves us with 40.
Include the next digit (5) from the dividend after 40, then repeat: 405 / 870

Going ahead to step 3:
870 goes into 405 0 times with a remainder of 405.
The next digit of our result is 0. 
Result so far: 0.0
Subtracting 0 from 405 leaves us with 405.
Take the next digit (0) from the dividend and append it to 405, then repeat: 4050 / 870

On to step 4:
870 goes into 4050 4 times with a remainder of 570.
Use 4 as the next digit of our solution. 
Result so far: 4.0
If we subtract 3480 from 4050, we get 570.
Take the next digit (0) from the dividend and append it to 570, then repeat: 5700 / 870

On to step 5:
870 goes into 5700 6 times with a remainder of 480.
Put 6 as the next digit of the answer. 
Result so far: 46.0
The remainder is 480 after subtracting 5220 from 5700.
Append the next digit (2) from the dividend to 480 and continue with: 4802 / 870

Step 6:
The number 870 fits into 4802 5 times, leaving a remainder of 452.
The number 5 becomes the next digit in our result. 
Result so far: 465.0
Subtract 4350 from 4802 to get 452.
Include the next digit (3) from the dividend after 452, then repeat: 4523 / 870

Step 7:
The number 870 fits into 4523 5 times, leaving a remainder of 173.
Put 5 as the next digit of the answer. 
Result so far: 4655.0
Deduct 4350 from 4523 and we're left with 173.
Append the next digit (8) from the dividend to 173 and continue with: 1738 / 870

Going ahead to step 8:
When dividing 1738 by 870, we get 1 with a remainder of 868.
Use 1 as the next digit of our solution. 
Result so far: 46551.0
Subtract 870 from 1738 to get 868.
Since there are no more digits in the dividend, we add a zero to the remainder making it 8680, and continue the process.

Step 9:
8680 divided by 870 is 9 with a remainder of 850.
Use 9 as the next digit of our solution. 
Result so far: 46551.9
If we subtract 7830 from 8680, we get 850.
Since there are no more digits in the dividend, we add a zero to the remainder making it 8500, and continue the process.

Let's proceed to step 10:
The number 870 fits into 8500 9 times, leaving a remainder of 670.
Put 9 as the next digit of the answer. 
Result so far: 46551.99
If we take 7830 away from 8500, we end up with 670.
Since there are no more digits in the dividend, we add a zero to the remainder making it 6700, and continue the process.

The quotient of the division is 46551.99, and the remainder is 0.67.