400796 ÷ 31 
Let's see how many times 31 fits into 400796.

Advancing to step 1:
31 can be fit into 4 0 times, resulting in a remainder of 4.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
If we take 0 away from 4, we end up with 4.
Grab the next digit (0) from the dividend, add it to 4, then carry on: 40 / 31

Let's proceed to step 2:
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: 1.0
Subtracting 31 from 40 leaves us with 9.
Append the next digit (0) from the dividend to 9 and continue with: 90 / 31

Let's proceed to step 3:
The number 31 fits into 90 2 times, leaving a remainder of 28.
Use 2 as the next digit of our solution. 
Result so far: 12.0
Deduct 62 from 90 and we're left with 28.
Append the next digit (7) from the dividend to 28 and continue with: 287 / 31

Going ahead to step 4:
31 can be fit into 287 9 times, resulting in a remainder of 8.
The next digit of our result is 9. 
Result so far: 129.0
The remainder is 8 after subtracting 279 from 287.
Append the next digit (9) from the dividend to 8 and continue with: 89 / 31

Going ahead to step 5:
31 can be fit into 89 2 times, resulting in a remainder of 27.
The number 2 becomes the next digit in our result. 
Result so far: 1292.0
If we subtract 62 from 89, we get 27.
Append the next digit (6) from the dividend to 27 and continue with: 276 / 31

Let's proceed to step 6:
The number 31 fits into 276 8 times, leaving a remainder of 28.
Use 8 as the next digit of our solution. 
Result so far: 12928.0
Subtract 248 from 276 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.

Advancing to step 7:
The number 31 fits into 280 9 times, leaving a remainder of 1.
The next digit of our result is 9. 
Result so far: 12928.9
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.

Moving on to step 8:
31 can be fit into 10 0 times, resulting in a remainder of 10.
The next digit of our result is 0. 
Result so far: 12928.9
Deduct 0 from 10 and we're left 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.

Let's proceed to step 9:
If we divide 100 by 31, we get 3 and a remainder of 7.
Put 3 as the next digit of the answer. 
Result so far: 12928.903
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.

Moving on to step 10:
31 goes into 70 2 times with a remainder of 8.
The next digit of our result is 2. 
Result so far: 12928.9032
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.

Advancing to step 11:
The number 31 fits into 80 2 times, leaving a remainder of 18.
Record the quotient 2 as the next digit in the result. 
Result so far: 12928.90322
If we take 62 away from 80, we end up 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 12928.90322 with a balance of 1.8e-05.