We look at the division of 40666807 by 504 
We want to figure out the number of times 40666807 can be divided by 504.

On to step 1:
When dividing 4 by 504, we get 0 with a remainder of 4.
The next digit of our result is 0. 
Result so far: 0.0
If we take 0 away from 4, we end up with 4.
Append the next digit (0) from the dividend to 4 and continue with: 40 / 504

Step 2:
When dividing 40 by 504, we get 0 with a remainder of 40.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
If we subtract 0 from 40, we get 40.
Take the next digit (6) from the dividend and append it to 40, then repeat: 406 / 504

Step 3:
504 goes into 406 0 times with a remainder of 406.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
Subtracting 0 from 406 leaves us with 406.
Append the next digit (6) from the dividend to 406 and continue with: 4066 / 504

On to step 4:
4066 divided by 504 is 8 with a remainder of 34.
Use 8 as the next digit of our solution. 
Result so far: 8.0
Subtract 4032 from 4066 to get 34.
Grab the next digit (6) from the dividend, add it to 34, then carry on: 346 / 504

On to step 5:
When dividing 346 by 504, we get 0 with a remainder of 346.
Record the quotient 0 as the next digit in the result. 
Result so far: 80.0
If we subtract 0 from 346, we get 346.
Fetch the next digit (8) from the dividend, attach it to 346 and continue: 3468 / 504

Advancing to step 6:
3468 divided by 504 is 6 with a remainder of 444.
Use 6 as the next digit of our solution. 
Result so far: 806.0
If we subtract 3024 from 3468, we get 444.
Fetch the next digit (0) from the dividend, attach it to 444 and continue: 4440 / 504

On to step 7:
4440 divided by 504 is 8 with a remainder of 408.
Put 8 as the next digit of the answer. 
Result so far: 8068.0
If we take 4032 away from 4440, we end up with 408.
Include the next digit (7) from the dividend after 408, then repeat: 4087 / 504

Let's proceed to step 8:
504 goes into 4087 8 times with a remainder of 55.
Put 8 as the next digit of the answer. 
Result so far: 80688.0
If we subtract 4032 from 4087, we get 55.
Since there are no more digits in the dividend, we add a zero to the remainder making it 550, and continue the process.

Let's proceed to step 9:
When dividing 550 by 504, we get 1 with a remainder of 46.
Write down 1 as next digit of the result. 
Result so far: 80688.1
Subtracting 504 from 550 leaves us with 46.
Since there are no more digits in the dividend, we add a zero to the remainder making it 460, and continue the process.

On to step 10:
The number 504 fits into 460 0 times, leaving a remainder of 460.
The number 0 becomes the next digit in our result. 
Result so far: 80688.1
Deduct 0 from 460 and we're left with 460.
Since there are no more digits in the dividend, we add a zero to the remainder making it 4600, and continue the process.

Step 11:
4600 divided by 504 is 9 with a remainder of 64.
The number 9 becomes the next digit in our result. 
Result so far: 80688.109
If we take 4536 away from 4600, we end up with 64.
Since there are no more digits in the dividend, we add a zero to the remainder making it 640, and continue the process.

Advancing to step 12:
The number 504 fits into 640 1 times, leaving a remainder of 136.
Put 1 as the next digit of the answer. 
Result so far: 80688.1091
If we take 504 away from 640, we end up with 136.
Since there are no more digits in the dividend, we add a zero to the remainder making it 1360, and continue the process.

Let's proceed to step 13:
1360 divided by 504 is 2 with a remainder of 352.
Put 2 as the next digit of the answer. 
Result so far: 80688.10912
The remainder is 352 after subtracting 1008 from 1360.
Since there are no more digits in the dividend, we add a zero to the remainder making it 3520, and continue the process.

Let's proceed to step 14:
3520 divided by 504 is 6 with a remainder of 496.
Put 6 as the next digit of the answer. 
Result so far: 80688.109126
If we take 3024 away from 3520, we end up with 496.
Since there are no more digits in the dividend, we add a zero to the remainder making it 4960, and continue the process.

Moving on to step 15:
504 can be fit into 4960 9 times, resulting in a remainder of 424.
The next digit of our result is 9. 
Result so far: 80688.1091269
The remainder is 424 after subtracting 4536 from 4960.
Since there are no more digits in the dividend, we add a zero to the remainder making it 4240, and continue the process.

Moving on to step 16:
4240 divided by 504 is 8 with a remainder of 208.
Use 8 as the next digit of our solution. 
Result so far: 80688.10912698
Deduct 4032 from 4240 and we're left with 208.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2080, and continue the process.

The final result is 80688.10912698 with a remainder of 2.08e-07.