We're dividing 586004 by 31 
We want to divide 586004 by 31.

On to step 1:
5 divided by 31 is 0 with a remainder of 5.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Deduct 0 from 5 and we're left with 5.
Take the next digit (8) from the dividend and append it to 5, then repeat: 58 / 31

Let's proceed to step 2:
31 can be fit into 58 1 times, resulting in a remainder of 27.
Write down 1 as next digit of the result. 
Result so far: 1.0
Subtract 31 from 58 to get 27.
Bring next digit (6) of the dividend behind the 27 and repeat the process: 276 / 31

On to step 3:
If we divide 276 by 31, we get 8 and a remainder of 28.
The next digit of our result is 8. 
Result so far: 18.0
If we take 248 away from 276, we end up with 28.
Fetch the next digit (0) from the dividend, attach it to 28 and continue: 280 / 31

Going ahead to step 4:
The number 31 fits into 280 9 times, leaving a remainder of 1.
Record the quotient 9 as the next digit in the result. 
Result so far: 189.0
The remainder is 1 after subtracting 279 from 280.
Append the next digit (0) from the dividend to 1 and continue with: 10 / 31

Advancing to step 5:
If we divide 10 by 31, we get 0 and a remainder of 10.
The number 0 becomes the next digit in our result. 
Result so far: 1890.0
If we take 0 away from 10, we end up with 10.
Take the next digit (4) from the dividend and append it to 10, then repeat: 104 / 31

Let's proceed to step 6:
The number 31 fits into 104 3 times, leaving a remainder of 11.
Put 3 as the next digit of the answer. 
Result so far: 18903.0
Deduct 93 from 104 and we're left with 11.
Since there are no more digits in the dividend, we add a zero to the remainder making it 110, and continue the process.

Step 7:
31 goes into 110 3 times with a remainder of 17.
Put 3 as the next digit of the answer. 
Result so far: 18903.3
Subtracting 93 from 110 leaves us with 17.
Since there are no more digits in the dividend, we add a zero to the remainder making it 170, and continue the process.

Let's proceed to step 8:
If we divide 170 by 31, we get 5 and a remainder of 15.
The number 5 becomes the next digit in our result. 
Result so far: 18903.35
Deduct 155 from 170 and we're left with 15.
Since there are no more digits in the dividend, we add a zero to the remainder making it 150, and continue the process.

On to step 9:
150 divided by 31 is 4 with a remainder of 26.
The number 4 becomes the next digit in our result. 
Result so far: 18903.354
Subtracting 124 from 150 leaves us with 26.
Since there are no more digits in the dividend, we add a zero to the remainder making it 260, and continue the process.

Let's proceed to step 10:
31 can be fit into 260 8 times, resulting in a remainder of 12.
Use 8 as the next digit of our solution. 
Result so far: 18903.3548
Subtracting 248 from 260 leaves us with 12.
Since there are no more digits in the dividend, we add a zero to the remainder making it 120, and continue the process.

Let's proceed to step 11:
When dividing 120 by 31, we get 3 with a remainder of 27.
The number 3 becomes the next digit in our result. 
Result so far: 18903.35483
Subtracting 93 from 120 leaves us with 27.
Since there are no more digits in the dividend, we add a zero to the remainder making it 270, and continue the process.

Step 12:
31 goes into 270 8 times with a remainder of 22.
The number 8 becomes the next digit in our result. 
Result so far: 18903.354838
If we take 248 away from 270, we end up with 22.
Since there are no more digits in the dividend, we add a zero to the remainder making it 220, and continue the process.

Step 13:
31 goes into 220 7 times with a remainder of 3.
Use 7 as the next digit of our solution. 
Result so far: 18903.3548387
Subtracting 217 from 220 leaves us with 3.
Since there are no more digits in the dividend, we add a zero to the remainder making it 30, and continue the process.

Step 14:
The number 31 fits into 30 0 times, leaving a remainder of 30.
Write down 0 as next digit of the result. 
Result so far: 18903.3548387
The remainder is 30 after subtracting 0 from 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

After the division, we end up with 18903.3548387 and a remainder of 3e-08.