Let's divide 586049 by 40
We want to figure out the number of times 586049 can be divided by 40.

On to step 1:
If we divide 5 by 40, we get 0 and a remainder of 5.
Write down 0 as next digit of the result. 
Result so far: 0.0
Subtract 0 from 5 to get 5.
Grab the next digit (8) from the dividend, add it to 5, then carry on: 58 / 40

Going ahead to step 2:
When dividing 58 by 40, we get 1 with a remainder of 18.
The next digit of our result is 1. 
Result so far: 1.0
If we take 40 away from 58, we end up with 18.
Include the next digit (6) from the dividend after 18, then repeat: 186 / 40

Going ahead to step 3:
186 divided by 40 is 4 with a remainder of 26.
Put 4 as the next digit of the answer. 
Result so far: 14.0
Subtract 160 from 186 to get 26.
Bring next digit (0) of the dividend behind the 26 and repeat the process: 260 / 40

Going ahead to step 4:
260 divided by 40 is 6 with a remainder of 20.
Record the quotient 6 as the next digit in the result. 
Result so far: 146.0
Deduct 240 from 260 and we're left with 20.
Take the next digit (4) from the dividend and append it to 20, then repeat: 204 / 40

Step 5:
When dividing 204 by 40, we get 5 with a remainder of 4.
The next digit of our result is 5. 
Result so far: 1465.0
If we take 200 away from 204, we end up with 4.
Append the next digit (9) from the dividend to 4 and continue with: 49 / 40

Let's proceed to step 6:
The number 40 fits into 49 1 times, leaving a remainder of 9.
The number 1 becomes the next digit in our result. 
Result so far: 14651.0
If we subtract 40 from 49, we get 9.
Since there are no more digits in the dividend, we add a zero to the remainder making it 90, and continue the process.

Advancing to step 7:
90 divided by 40 is 2 with a remainder of 10.
The number 2 becomes the next digit in our result. 
Result so far: 14651.2
Deduct 80 from 90 and we're left with 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Going ahead to step 8:
40 goes into 100 2 times with a remainder of 20.
Record the quotient 2 as the next digit in the result. 
Result so far: 14651.22
If we take 80 away from 100, we end up with 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

After the division, we end up with 14651.22 and a remainder of 0.02.