40365799 divided by 586 
We're looking to find how many times 586 goes into 40365799.

On to step 1:
586 goes into 4 0 times with a remainder of 4.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
If we subtract 0 from 4, we get 4.
Include the next digit (0) from the dividend after 4, then repeat: 40 / 586

Advancing to step 2:
586 can be fit into 40 0 times, resulting in a remainder of 40.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
If we take 0 away from 40, we end up with 40.
Include the next digit (3) from the dividend after 40, then repeat: 403 / 586

Moving on to step 3:
586 can be fit into 403 0 times, resulting in a remainder of 403.
Use 0 as the next digit of our solution. 
Result so far: 0.0
If we subtract 0 from 403, we get 403.
Bring next digit (6) of the dividend behind the 403 and repeat the process: 4036 / 586

Going ahead to step 4:
586 can be fit into 4036 6 times, resulting in a remainder of 520.
Record the quotient 6 as the next digit in the result. 
Result so far: 6.0
Subtracting 3516 from 4036 leaves us with 520.
Fetch the next digit (5) from the dividend, attach it to 520 and continue: 5205 / 586

Going ahead to step 5:
When dividing 5205 by 586, we get 8 with a remainder of 517.
Record the quotient 8 as the next digit in the result. 
Result so far: 68.0
Subtracting 4688 from 5205 leaves us with 517.
Take the next digit (7) from the dividend and append it to 517, then repeat: 5177 / 586

Moving on to step 6:
When dividing 5177 by 586, we get 8 with a remainder of 489.
Put 8 as the next digit of the answer. 
Result so far: 688.0
If we take 4688 away from 5177, we end up with 489.
Grab the next digit (9) from the dividend, add it to 489, then carry on: 4899 / 586

Going ahead to step 7:
The number 586 fits into 4899 8 times, leaving a remainder of 211.
Record the quotient 8 as the next digit in the result. 
Result so far: 6888.0
The remainder is 211 after subtracting 4688 from 4899.
Grab the next digit (9) from the dividend, add it to 211, then carry on: 2119 / 586

Let's proceed to step 8:
The number 586 fits into 2119 3 times, leaving a remainder of 361.
Put 3 as the next digit of the answer. 
Result so far: 68883.0
Subtract 1758 from 2119 to get 361.
Since there are no more digits in the dividend, we add a zero to the remainder making it 3610, and continue the process.

On to step 9:
3610 divided by 586 is 6 with a remainder of 94.
Put 6 as the next digit of the answer. 
Result so far: 68883.6
Subtract 3516 from 3610 to get 94.
Since there are no more digits in the dividend, we add a zero to the remainder making it 940, and continue the process.

On to step 10:
586 goes into 940 1 times with a remainder of 354.
Write down 1 as next digit of the result. 
Result so far: 68883.61
Subtract 586 from 940 to get 354.
Since there are no more digits in the dividend, we add a zero to the remainder making it 3540, and continue the process.

Let's proceed to step 11:
When dividing 3540 by 586, we get 6 with a remainder of 24.
Use 6 as the next digit of our solution. 
Result so far: 68883.616
If we subtract 3516 from 3540, we get 24.
Since there are no more digits in the dividend, we add a zero to the remainder making it 240, and continue the process.

Moving on to step 12:
When dividing 240 by 586, we get 0 with a remainder of 240.
The number 0 becomes the next digit in our result. 
Result so far: 68883.616
Subtracting 0 from 240 leaves us with 240.
Since there are no more digits in the dividend, we add a zero to the remainder making it 2400, and continue the process.

Advancing to step 13:
586 goes into 2400 4 times with a remainder of 56.
Put 4 as the next digit of the answer. 
Result so far: 68883.61604
Deduct 2344 from 2400 and we're left with 56.
Since there are no more digits in the dividend, we add a zero to the remainder making it 560, and continue the process.

Moving on to step 14:
If we divide 560 by 586, we get 0 and a remainder of 560.
Write down 0 as next digit of the result. 
Result so far: 68883.61604
If we subtract 0 from 560, we get 560.
Since there are no more digits in the dividend, we add a zero to the remainder making it 5600, and continue the process.

Going ahead to step 15:
If we divide 5600 by 586, we get 9 and a remainder of 326.
Use 9 as the next digit of our solution. 
Result so far: 68883.6160409
Subtract 5274 from 5600 to get 326.
Since there are no more digits in the dividend, we add a zero to the remainder making it 3260, and continue the process.

Advancing to step 16:
When dividing 3260 by 586, we get 5 with a remainder of 330.
Record the quotient 5 as the next digit in the result. 
Result so far: 68883.61604095
Deduct 2930 from 3260 and we're left with 330.
Since there are no more digits in the dividend, we add a zero to the remainder making it 3300, and continue the process.

In conclusion, the division gives 68883.61604095 with a balance of 3.3e-07.