We're dividing 587947 by 31 
Our goal is to divide 587947 by 31.

Moving on to step 1:
When dividing 5 by 31, we get 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.
Grab the next digit (8) from the dividend, add it to 5, then carry on: 58 / 31

Step 2:
31 goes into 58 1 times with a remainder of 27.
Use 1 as the next digit of our solution. 
Result so far: 1.0
The remainder is 27 after subtracting 31 from 58.
Take the next digit (7) from the dividend and append it to 27, then repeat: 277 / 31

Advancing to step 3:
If we divide 277 by 31, we get 8 and a remainder of 29.
The next digit of our result is 8. 
Result so far: 18.0
Subtracting 248 from 277 leaves us with 29.
Grab the next digit (9) from the dividend, add it to 29, then carry on: 299 / 31

Advancing to step 4:
If we divide 299 by 31, we get 9 and a remainder of 20.
Write down 9 as next digit of the result. 
Result so far: 189.0
The remainder is 20 after subtracting 279 from 299.
Bring next digit (4) of the dividend behind the 20 and repeat the process: 204 / 31

On to step 5:
204 divided by 31 is 6 with a remainder of 18.
Write down 6 as next digit of the result. 
Result so far: 1896.0
If we take 186 away from 204, we end up with 18.
Bring next digit (7) of the dividend behind the 18 and repeat the process: 187 / 31

Moving on to step 6:
31 can be fit into 187 6 times, resulting in a remainder of 1.
Record the quotient 6 as the next digit in the result. 
Result so far: 18966.0
Deduct 186 from 187 and we're left with 1.
Since there are no more digits in the dividend, we add a zero to the remainder making it 10, and continue the process.

Step 7:
31 can be fit into 10 0 times, resulting in a remainder of 10.
The number 0 becomes the next digit in our result. 
Result so far: 18966.0
Deduct 0 from 10 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.

Step 8:
31 goes into 100 3 times with a remainder of 7.
Write down 3 as next digit of the result. 
Result so far: 18966.03
If we subtract 93 from 100, we 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.

On to step 9:
31 can be fit into 70 2 times, resulting in a remainder of 8.
Put 2 as the next digit of the answer. 
Result so far: 18966.032
Subtract 62 from 70 to get 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 10:
31 can be fit into 80 2 times, resulting in a remainder of 18.
The next digit of our result is 2. 
Result so far: 18966.0322
If we subtract 62 from 80, we 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.

The final result is 18966.0322 with a remainder of 0.00018.