Let's divide 400588 by 31
Our goal is to divide 400588 by 31.

Advancing to step 1:
The number 31 fits into 4 0 times, leaving a remainder of 4.
The next digit of our result is 0. 
Result so far: 0.0
If we take 0 away from 4, we end up with 4.
Take the next digit (0) from the dividend and append it to 4, then repeat: 40 / 31

On to step 2:
31 can be fit into 40 1 times, resulting in a remainder of 9.
Use 1 as the next digit of our solution. 
Result so far: 1.0
If we take 31 away from 40, we end up with 9.
Fetch the next digit (0) from the dividend, attach it to 9 and continue: 90 / 31

Step 3:
31 goes into 90 2 times with a remainder of 28.
Put 2 as the next digit of the answer. 
Result so far: 12.0
Subtracting 62 from 90 leaves us with 28.
Append the next digit (5) from the dividend to 28 and continue with: 285 / 31

Let's proceed to step 4:
When dividing 285 by 31, we get 9 with a remainder of 6.
Record the quotient 9 as the next digit in the result. 
Result so far: 129.0
Subtracting 279 from 285 leaves us with 6.
Take the next digit (8) from the dividend and append it to 6, then repeat: 68 / 31

Step 5:
When dividing 68 by 31, we get 2 with a remainder of 6.
The next digit of our result is 2. 
Result so far: 1292.0
If we take 62 away from 68, we end up with 6.
Grab the next digit (8) from the dividend, add it to 6, then carry on: 68 / 31

Let's proceed to step 6:
31 can be fit into 68 2 times, resulting in a remainder of 6.
The next digit of our result is 2. 
Result so far: 12922.0
Subtracting 62 from 68 leaves us with 6.
Since there are no more digits in the dividend, we add a zero to the remainder making it 60, and continue the process.

Moving on to step 7:
31 goes into 60 1 times with a remainder of 29.
Use 1 as the next digit of our solution. 
Result so far: 12922.1
Subtract 31 from 60 to get 29.
Since there are no more digits in the dividend, we add a zero to the remainder making it 290, and continue the process.

Going ahead to step 8:
When dividing 290 by 31, we get 9 with a remainder of 11.
Use 9 as the next digit of our solution. 
Result so far: 12922.19
Deduct 279 from 290 and we're left with 11.
Since there are no more digits in the dividend, we add a zero to the remainder making it 110, and continue the process.

Let's proceed to step 9:
If we divide 110 by 31, we get 3 and a remainder of 17.
Put 3 as the next digit of the answer. 
Result so far: 12922.193
If we subtract 93 from 110, we get 17.
Since there are no more digits in the dividend, we add a zero to the remainder making it 170, and continue the process.

On to step 10:
When dividing 170 by 31, we get 5 with a remainder of 15.
The number 5 becomes the next digit in our result. 
Result so far: 12922.1935
Subtracting 155 from 170 leaves us with 15.
Since there are no more digits in the dividend, we add a zero to the remainder making it 150, and continue the process.

Step 11:
If we divide 150 by 31, we get 4 and a remainder of 26.
Put 4 as the next digit of the answer. 
Result so far: 12922.19354
If we subtract 124 from 150, we get 26.
Since there are no more digits in the dividend, we add a zero to the remainder making it 260, and continue the process.

Let's proceed to step 12:
31 can be fit into 260 8 times, resulting in a remainder of 12.
Use 8 as the next digit of our solution. 
Result so far: 12922.193548
If we take 248 away from 260, we end up with 12.
Since there are no more digits in the dividend, we add a zero to the remainder making it 120, and continue the process.

Going ahead to step 13:
If we divide 120 by 31, we get 3 and a remainder of 27.
Write down 3 as next digit of the result. 
Result so far: 12922.1935483
Deduct 93 from 120 and we're left with 27.
Since there are no more digits in the dividend, we add a zero to the remainder making it 270, and continue the process.

On to step 14:
270 divided by 31 is 8 with a remainder of 22.
The number 8 becomes the next digit in our result. 
Result so far: 12922.19354838
Subtract 248 from 270 to get 22.
Since there are no more digits in the dividend, we add a zero to the remainder making it 220, and continue the process.

In conclusion, the division gives 12922.19354838 with a balance of 2.2e-08.