We look at the division of 586558 by 31 
Our goal is to divide 586558 by 31.

On to step 1:
31 goes into 5 0 times with a remainder of 5.
The next digit of our result is 0. 
Result so far: 0.0
If we subtract 0 from 5, we get 5.
Take the next digit (8) from the dividend and append it to 5, then repeat: 58 / 31

Advancing 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.
Include the next digit (6) from the dividend after 27, then repeat: 276 / 31

Moving on to step 3:
When dividing 276 by 31, we get 8 with a remainder of 28.
The number 8 becomes the next digit in our result. 
Result so far: 18.0
Subtracting 248 from 276 leaves us with 28.
Include the next digit (5) from the dividend after 28, then repeat: 285 / 31

On to step 4:
When dividing 285 by 31, we get 9 with a remainder of 6.
Put 9 as the next digit of the answer. 
Result so far: 189.0
The remainder is 6 after subtracting 279 from 285.
Fetch the next digit (5) from the dividend, attach it to 6 and continue: 65 / 31

Advancing to step 5:
31 can be fit into 65 2 times, resulting in a remainder of 3.
Write down 2 as next digit of the result. 
Result so far: 1892.0
Subtracting 62 from 65 leaves us with 3.
Grab the next digit (8) from the dividend, add it to 3, then carry on: 38 / 31

Step 6:
If we divide 38 by 31, we get 1 and a remainder of 7.
Write down 1 as next digit of the result. 
Result so far: 18921.0
Subtract 31 from 38 to get 7.
Since there are no more digits in the dividend, we add a zero to the remainder making it 70, and continue the process.

Advancing to step 7:
31 can be fit into 70 2 times, resulting in a remainder of 8.
Use 2 as the next digit of our solution. 
Result so far: 18921.2
Subtracting 62 from 70 leaves us with 8.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

On to step 8:
If we divide 80 by 31, we get 2 and a remainder of 18.
The next digit of our result is 2. 
Result so far: 18921.22
Subtract 62 from 80 to get 18.
Since there are no more digits in the dividend, we add a zero to the remainder making it 180, and continue the process.

In conclusion, the division gives 18921.22 with a balance of 0.018.