40787415 ÷ 507 
We want to figure out the number of times 40787415 can be divided by 507.

Advancing to step 1:
The number 507 fits into 4 0 times, leaving a remainder of 4.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Subtract 0 from 4 to get 4.
Append the next digit (0) from the dividend to 4 and continue with: 40 / 507

Step 2:
40 divided by 507 is 0 with a remainder of 40.
Put 0 as the next digit of the answer. 
Result so far: 0.0
If we subtract 0 from 40, we get 40.
Bring next digit (7) of the dividend behind the 40 and repeat the process: 407 / 507

Step 3:
When dividing 407 by 507, we get 0 with a remainder of 407.
Use 0 as the next digit of our solution. 
Result so far: 0.0
If we take 0 away from 407, we end up with 407.
Grab the next digit (8) from the dividend, add it to 407, then carry on: 4078 / 507

Advancing to step 4:
If we divide 4078 by 507, we get 8 and a remainder of 22.
Use 8 as the next digit of our solution. 
Result so far: 8.0
If we subtract 4056 from 4078, we get 22.
Fetch the next digit (7) from the dividend, attach it to 22 and continue: 227 / 507

Let's proceed to step 5:
227 divided by 507 is 0 with a remainder of 227.
Use 0 as the next digit of our solution. 
Result so far: 80.0
If we subtract 0 from 227, we get 227.
Take the next digit (4) from the dividend and append it to 227, then repeat: 2274 / 507

Step 6:
2274 divided by 507 is 4 with a remainder of 246.
The number 4 becomes the next digit in our result. 
Result so far: 804.0
The remainder is 246 after subtracting 2028 from 2274.
Grab the next digit (1) from the dividend, add it to 246, then carry on: 2461 / 507

Step 7:
507 goes into 2461 4 times with a remainder of 433.
Record the quotient 4 as the next digit in the result. 
Result so far: 8044.0
The remainder is 433 after subtracting 2028 from 2461.
Include the next digit (5) from the dividend after 433, then repeat: 4335 / 507

Let's proceed to step 8:
4335 divided by 507 is 8 with a remainder of 279.
The number 8 becomes the next digit in our result. 
Result so far: 80448.0
Deduct 4056 from 4335 and we're left with 279.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2790, and continue the process.

Step 9:
If we divide 2790 by 507, we get 5 and a remainder of 255.
Put 5 as the next digit of the answer. 
Result so far: 80448.5
Subtracting 2535 from 2790 leaves us with 255.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2550, and continue the process.

Advancing to step 10:
If we divide 2550 by 507, we get 5 and a remainder of 15.
Use 5 as the next digit of our solution. 
Result so far: 80448.55
If we subtract 2535 from 2550, we get 15.
Since there are no more digits in the dividend, we add a zero to the remainder making it 150, and continue the process.

In conclusion, the division gives 80448.55 with a balance of 0.015.