Let's divide 164663 by 31
We're looking to find how many times 31 goes into 164663.

Going ahead to step 1:
If we divide 1 by 31, we get 0 and a remainder of 1.
Put 0 as the next digit of the answer. 
Result so far: 0.0
Deduct 0 from 1 and we're left with 1.
Take the next digit (6) from the dividend and append it to 1, then repeat: 16 / 31

Moving on to step 2:
31 can be fit into 16 0 times, resulting in a remainder of 16.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
If we subtract 0 from 16, we get 16.
Append the next digit (4) from the dividend to 16 and continue with: 164 / 31

Going ahead to step 3:
31 can be fit into 164 5 times, resulting in a remainder of 9.
The next digit of our result is 5. 
Result so far: 5.0
The remainder is 9 after subtracting 155 from 164.
Bring next digit (6) of the dividend behind the 9 and repeat the process: 96 / 31

Going ahead to step 4:
31 can be fit into 96 3 times, resulting in a remainder of 3.
Write down 3 as next digit of the result. 
Result so far: 53.0
Subtracting 93 from 96 leaves us with 3.
Bring next digit (6) of the dividend behind the 3 and repeat the process: 36 / 31

Advancing to step 5:
If we divide 36 by 31, we get 1 and a remainder of 5.
The number 1 becomes the next digit in our result. 
Result so far: 531.0
Deduct 31 from 36 and we're left with 5.
Include the next digit (3) from the dividend after 5, then repeat: 53 / 31

Advancing to step 6:
31 can be fit into 53 1 times, resulting in a remainder of 22.
The next digit of our result is 1. 
Result so far: 5311.0
Deduct 31 from 53 and we're left with 22.
Since there are no more digits in the dividend, we add a zero to the remainder making it 220, and continue the process.

On to step 7:
The number 31 fits into 220 7 times, leaving a remainder of 3.
Record the quotient 7 as the next digit in the result. 
Result so far: 5311.7
Subtracting 217 from 220 leaves us with 3.
Since there are no more digits in the dividend, we add a zero to the remainder making it 30, and continue the process.

Moving on to step 8:
The number 31 fits into 30 0 times, leaving a remainder of 30.
Write down 0 as next digit of the result. 
Result so far: 5311.7
Subtract 0 from 30 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.

Advancing to step 9:
31 goes into 300 9 times with a remainder of 21.
The number 9 becomes the next digit in our result. 
Result so far: 5311.709
If we take 279 away from 300, we end up 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.

Step 10:
31 goes into 210 6 times with a remainder of 24.
Record the quotient 6 as the next digit in the result. 
Result so far: 5311.7096
Subtract 186 from 210 to 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.

Let's proceed to step 11:
31 can be fit into 240 7 times, resulting in a remainder of 23.
Record the quotient 7 as the next digit in the result. 
Result so far: 5311.70967
Subtract 217 from 240 to 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.

Going ahead to step 12:
230 divided by 31 is 7 with a remainder of 13.
The next digit of our result is 7. 
Result so far: 5311.709677
If we subtract 217 from 230, we get 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 5311.709677 with a remainder of 1.3e-06.