Let's divide 158723 by 31
Let's see how many times 31 fits into 158723.

Let's proceed to step 1:
The number 31 fits into 1 0 times, leaving a remainder of 1.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Subtracting 0 from 1 leaves us with 1.
Bring next digit (5) of the dividend behind the 1 and repeat the process: 15 / 31

On to step 2:
15 divided by 31 is 0 with a remainder of 15.
Put 0 as the next digit of the answer. 
Result so far: 0.0
If we subtract 0 from 15, we get 15.
Append the next digit (8) from the dividend to 15 and continue with: 158 / 31

On to step 3:
31 goes into 158 5 times with a remainder of 3.
Record the quotient 5 as the next digit in the result. 
Result so far: 5.0
If we subtract 155 from 158, we get 3.
Grab the next digit (7) from the dividend, add it to 3, then carry on: 37 / 31

Advancing to step 4:
When dividing 37 by 31, we get 1 with a remainder of 6.
The number 1 becomes the next digit in our result. 
Result so far: 51.0
Deduct 31 from 37 and we're left with 6.
Fetch the next digit (2) from the dividend, attach it to 6 and continue: 62 / 31

Let's proceed to step 5:
The number 31 fits into 62 2 times, leaving a remainder of 0.
Write down 2 as next digit of the result. 
Result so far: 512.0
Subtracting 62 from 62 leaves us with 0.
Append the next digit (3) from the dividend to 0 and continue with: 3 / 31

Going ahead to step 6:
When dividing 3 by 31, we get 0 with a remainder of 3.
Use 0 as the next digit of our solution. 
Result so far: 5120.0
Subtract 0 from 3 to get 3.
Since there are no more digits in the dividend, we add a zero to the remainder making it 30, and continue the process.

Going ahead to step 7:
31 goes into 30 0 times with a remainder of 30.
The next digit of our result is 0. 
Result so far: 5120.0
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.

Going ahead to step 8:
When dividing 300 by 31, we get 9 with a remainder of 21.
Put 9 as the next digit of the answer. 
Result so far: 5120.09
Deduct 279 from 300 and we're left with 21.
Since there are no more digits in the dividend, we add a zero to the remainder making it 210, and continue the process.

Going ahead to step 9:
31 goes into 210 6 times with a remainder of 24.
Put 6 as the next digit of the answer. 
Result so far: 5120.096
If we subtract 186 from 210, 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.

Step 10:
31 goes into 240 7 times with a remainder of 23.
The number 7 becomes the next digit in our result. 
Result so far: 5120.0967
Deduct 217 from 240 and we're left with 23.
Since there are no more digits in the dividend, we add a zero to the remainder making it 230, and continue the process.

Step 11:
The number 31 fits into 230 7 times, leaving a remainder of 13.
The next digit of our result is 7. 
Result so far: 5120.09677
Subtracting 217 from 230 leaves us with 13.
Since there are no more digits in the dividend, we add a zero to the remainder making it 130, and continue the process.

The final result is 5120.09677 with a remainder of 1.3e-05.