We look at the division of 396816 by 31 
We want to divide 396816 by 31.

Let's proceed 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
If we subtract 0 from 3, we get 3.
Grab the next digit (9) from the dividend, add it to 3, then carry on: 39 / 31

Let's proceed to step 2:
If we divide 39 by 31, we get 1 and a remainder of 8.
Record the quotient 1 as the next digit in the result. 
Result so far: 1.0
Deduct 31 from 39 and we're left with 8.
Grab the next digit (6) from the dividend, add it to 8, then carry on: 86 / 31

Moving on to step 3:
31 can be fit into 86 2 times, resulting in a remainder of 24.
Put 2 as the next digit of the answer. 
Result so far: 12.0
Deduct 62 from 86 and we're left with 24.
Include the next digit (8) from the dividend after 24, then repeat: 248 / 31

Going ahead to step 4:
248 divided by 31 is 8 with a remainder of 0.
The next digit of our result is 8. 
Result so far: 128.0
Subtracting 248 from 248 leaves us with 0.
Fetch the next digit (1) from the dividend, attach it to 0 and continue: 1 / 31

Let's proceed to step 5:
31 goes into 1 0 times with a remainder of 1.
Put 0 as the next digit of the answer. 
Result so far: 1280.0
Subtract 0 from 1 to get 1.
Bring next digit (6) of the dividend behind the 1 and repeat the process: 16 / 31

Advancing to step 6:
If we divide 16 by 31, we get 0 and a remainder of 16.
The number 0 becomes the next digit in our result. 
Result so far: 12800.0
Subtracting 0 from 16 leaves us 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.

On to step 7:
160 divided by 31 is 5 with a remainder of 5.
Put 5 as the next digit of the answer. 
Result so far: 12800.5
Deduct 155 from 160 and we're left with 5.
Since there are no more digits in the dividend, we add a zero to the remainder making it 50, and continue the process.

Going ahead to step 8:
When dividing 50 by 31, we get 1 with a remainder of 19.
Use 1 as the next digit of our solution. 
Result so far: 12800.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.

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: 12800.516
Subtracting 186 from 190 leaves us 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.

Advancing to step 10:
When dividing 40 by 31, we get 1 with a remainder of 9.
Use 1 as the next digit of our solution. 
Result so far: 12800.5161
Deduct 31 from 40 and we're left 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.

Moving on to step 11:
90 divided by 31 is 2 with a remainder of 28.
Record the quotient 2 as the next digit in the result. 
Result so far: 12800.51612
The remainder is 28 after subtracting 62 from 90.
Since there are no more digits in the dividend, we add a zero to the remainder making it 280, and continue the process.

Advancing to step 12:
The number 31 fits into 280 9 times, leaving a remainder of 1.
Write down 9 as next digit of the result. 
Result so far: 12800.516129
Deduct 279 from 280 and we're left 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.

Going ahead to step 13:
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: 12800.516129
The remainder is 10 after subtracting 0 from 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:
100 divided by 31 is 3 with a remainder of 7.
The number 3 becomes the next digit in our result. 
Result so far: 12800.51612903
Subtracting 93 from 100 leaves us 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.

The final outcome is 12800.51612903, with a leftover of 7e-09.