396711 divided by 31 
Our goal is to divide 396711 by 31.

On to step 1:
31 can be fit into 3 0 times, resulting in a remainder of 3.
Put 0 as the next digit of the answer. 
Result so far: 0.0
The remainder is 3 after subtracting 0 from 3.
Bring next digit (9) of the dividend behind the 3 and repeat the process: 39 / 31

Advancing to step 2:
When dividing 39 by 31, we get 1 with a remainder of 8.
Use 1 as the next digit of our solution. 
Result so far: 1.0
The remainder is 8 after subtracting 31 from 39.
Take the next digit (6) from the dividend and append it to 8, then repeat: 86 / 31

Step 3:
86 divided by 31 is 2 with a remainder of 24.
Put 2 as the next digit of the answer. 
Result so far: 12.0
Subtracting 62 from 86 leaves us with 24.
Grab the next digit (7) from the dividend, add it to 24, then carry on: 247 / 31

Advancing to step 4:
When dividing 247 by 31, we get 7 with a remainder of 30.
The next digit of our result is 7. 
Result so far: 127.0
If we take 217 away from 247, we end up with 30.
Take the next digit (1) from the dividend and append it to 30, then repeat: 301 / 31

On to step 5:
301 divided by 31 is 9 with a remainder of 22.
The number 9 becomes the next digit in our result. 
Result so far: 1279.0
If we take 279 away from 301, we end up with 22.
Include the next digit (1) from the dividend after 22, then repeat: 221 / 31

Step 6:
31 goes into 221 7 times with a remainder of 4.
Record the quotient 7 as the next digit in the result. 
Result so far: 12797.0
The remainder is 4 after subtracting 217 from 221.
Since there are no more digits in the dividend, we add a zero to the remainder making it 40, and continue the process.

Moving on to step 7:
31 can be fit into 40 1 times, resulting in a remainder of 9.
Put 1 as the next digit of the answer. 
Result so far: 12797.1
If we take 31 away from 40, we end up with 9.
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 8:
31 can be fit into 90 2 times, resulting in a remainder of 28.
Use 2 as the next digit of our solution. 
Result so far: 12797.12
Subtracting 62 from 90 leaves us with 28.
Since there are no more digits in the dividend, we add a zero to the remainder making it 280, and continue the process.

Going ahead to step 9:
When dividing 280 by 31, we get 9 with a remainder of 1.
Use 9 as the next digit of our solution. 
Result so far: 12797.129
The remainder is 1 after subtracting 279 from 280.
Since there are no more digits in the dividend, we add a zero to the remainder making it 10, and continue the process.

Moving on to step 10:
If we divide 10 by 31, we get 0 and a remainder of 10.
Record the quotient 0 as the next digit in the result. 
Result so far: 12797.129
Subtracting 0 from 10 leaves us 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.

On to step 11:
When dividing 100 by 31, we get 3 with a remainder of 7.
Put 3 as the next digit of the answer. 
Result so far: 12797.12903
Deduct 93 from 100 and we're left with 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 12:
70 divided by 31 is 2 with a remainder of 8.
The number 2 becomes the next digit in our result. 
Result so far: 12797.129032
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.

Going ahead to step 13:
When dividing 80 by 31, we get 2 with a remainder of 18.
Record the quotient 2 as the next digit in the result. 
Result so far: 12797.1290322
Deduct 62 from 80 and we're left with 18.
Since there are no more digits in the dividend, we add a zero to the remainder making it 180, and continue the process.

In conclusion, the division gives 12797.1290322 with a balance of 1.8e-07.