We're dividing 508199 by 31 
We want to figure out the number of times 508199 can be divided by 31.

Moving on to step 1:
31 can be fit into 5 0 times, resulting in a remainder of 5.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
If we subtract 0 from 5, we get 5.
Bring next digit (0) of the dividend behind the 5 and repeat the process: 50 / 31

Advancing to step 2:
50 divided by 31 is 1 with a remainder of 19.
Record the quotient 1 as the next digit in the result. 
Result so far: 1.0
The remainder is 19 after subtracting 31 from 50.
Include the next digit (8) from the dividend after 19, then repeat: 198 / 31

On to step 3:
The number 31 fits into 198 6 times, leaving a remainder of 12.
The next digit of our result is 6. 
Result so far: 16.0
If we subtract 186 from 198, we get 12.
Include the next digit (1) from the dividend after 12, then repeat: 121 / 31

On to step 4:
If we divide 121 by 31, we get 3 and a remainder of 28.
The number 3 becomes the next digit in our result. 
Result so far: 163.0
Subtracting 93 from 121 leaves us with 28.
Include the next digit (9) from the dividend after 28, then repeat: 289 / 31

Let's proceed to step 5:
When dividing 289 by 31, we get 9 with a remainder of 10.
Write down 9 as next digit of the result. 
Result so far: 1639.0
Deduct 279 from 289 and we're left with 10.
Bring next digit (9) of the dividend behind the 10 and repeat the process: 109 / 31

Advancing to step 6:
When dividing 109 by 31, we get 3 with a remainder of 16.
The number 3 becomes the next digit in our result. 
Result so far: 16393.0
Deduct 93 from 109 and we're left with 16.
Since there are no more digits in the dividend, we add a zero to the remainder making it 160, and continue the process.

Step 7:
31 can be fit into 160 5 times, resulting in a remainder of 5.
The next digit of our result is 5. 
Result so far: 16393.5
The remainder is 5 after subtracting 155 from 160.
Since there are no more digits in the dividend, we add a zero to the remainder making it 50, and continue the process.

Let's proceed to step 8:
31 goes into 50 1 times with a remainder of 19.
The next digit of our result is 1. 
Result so far: 16393.51
Subtract 31 from 50 to get 19.
Since there are no more digits in the dividend, we add a zero to the remainder making it 190, and continue the process.

Going ahead to step 9:
If we divide 190 by 31, we get 6 and a remainder of 4.
Put 6 as the next digit of the answer. 
Result so far: 16393.516
If we take 186 away from 190, we end up with 4.
Since there are no more digits in the dividend, we add a zero to the remainder making it 40, and continue the process.

Let's proceed to step 10:
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: 16393.5161
The remainder is 9 after subtracting 31 from 40.
Since there are no more digits in the dividend, we add a zero to the remainder making it 90, and continue the process.

Let's proceed to step 11:
When dividing 90 by 31, we get 2 with a remainder of 28.
Record the quotient 2 as the next digit in the result. 
Result so far: 16393.51612
Subtract 62 from 90 to get 28.
Since there are no more digits in the dividend, we add a zero to the remainder making it 280, and continue the process.

On to step 12:
31 goes into 280 9 times with a remainder of 1.
Use 9 as the next digit of our solution. 
Result so far: 16393.516129
Subtracting 279 from 280 leaves us 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 13:
31 goes into 10 0 times with a remainder of 10.
Put 0 as the next digit of the answer. 
Result so far: 16393.516129
Subtract 0 from 10 to get 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Moving on to step 14:
The number 31 fits into 100 3 times, leaving a remainder of 7.
Record the quotient 3 as the next digit in the result. 
Result so far: 16393.51612903
The remainder is 7 after subtracting 93 from 100.
Since there are no more digits in the dividend, we add a zero to the remainder making it 70, and continue the process.

After the division, we end up with 16393.51612903 and a remainder of 7e-09.