We're dividing 871502 by 31 
Let's see how many times 31 fits into 871502.

Let's proceed to step 1:
When dividing 8 by 31, we get 0 with a remainder of 8.
Use 0 as the next digit of our solution. 
Result so far: 0.0
If we subtract 0 from 8, we get 8.
Take the next digit (7) from the dividend and append it to 8, then repeat: 87 / 31

Let's proceed to step 2:
31 goes into 87 2 times with a remainder of 25.
Use 2 as the next digit of our solution. 
Result so far: 2.0
Deduct 62 from 87 and we're left with 25.
Append the next digit (1) from the dividend to 25 and continue with: 251 / 31

Advancing to step 3:
When dividing 251 by 31, we get 8 with a remainder of 3.
Use 8 as the next digit of our solution. 
Result so far: 28.0
If we take 248 away from 251, we end up with 3.
Fetch the next digit (5) from the dividend, attach it to 3 and continue: 35 / 31

On to step 4:
If we divide 35 by 31, we get 1 and a remainder of 4.
Use 1 as the next digit of our solution. 
Result so far: 281.0
Deduct 31 from 35 and we're left with 4.
Fetch the next digit (0) from the dividend, attach it to 4 and continue: 40 / 31

On to step 5:
31 can be fit into 40 1 times, resulting in a remainder of 9.
The number 1 becomes the next digit in our result. 
Result so far: 2811.0
Subtracting 31 from 40 leaves us with 9.
Include the next digit (2) from the dividend after 9, then repeat: 92 / 31

Advancing to step 6:
31 can be fit into 92 2 times, resulting in a remainder of 30.
Put 2 as the next digit of the answer. 
Result so far: 28112.0
Subtract 62 from 92 to get 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

On to step 7:
300 divided by 31 is 9 with a remainder of 21.
Write down 9 as next digit of the result. 
Result so far: 28112.9
The remainder is 21 after subtracting 279 from 300.
Since there are no more digits in the dividend, we add a zero to the remainder making it 210, and continue the process.

On to step 8:
31 can be fit into 210 6 times, resulting in a remainder of 24.
Write down 6 as next digit of the result. 
Result so far: 28112.96
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.

Advancing to step 9:
The number 31 fits into 240 7 times, leaving a remainder of 23.
Use 7 as the next digit of our solution. 
Result so far: 28112.967
If we subtract 217 from 240, we get 23.
Since there are no more digits in the dividend, we add a zero to the remainder making it 230, and continue the process.

Advancing to step 10:
31 goes into 230 7 times with a remainder of 13.
Write down 7 as next digit of the result. 
Result so far: 28112.9677
If we take 217 away from 230, we end up 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 outcome is 28112.9677, with a leftover of 0.00013.