Let's divide 397574 by 31
We want to divide 397574 by 31.

Advancing to step 1:
3 divided by 31 is 0 with a remainder of 3.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Subtract 0 from 3 to get 3.
Include the next digit (9) from the dividend after 3, then repeat: 39 / 31

Step 2:
31 can be fit into 39 1 times, resulting in a remainder of 8.
Use 1 as the next digit of our solution. 
Result so far: 1.0
Subtracting 31 from 39 leaves us with 8.
Take the next digit (7) from the dividend and append it to 8, then repeat: 87 / 31

Let's proceed to step 3:
31 goes into 87 2 times with a remainder of 25.
Put 2 as the next digit of the answer. 
Result so far: 12.0
The remainder is 25 after subtracting 62 from 87.
Append the next digit (5) from the dividend to 25 and continue with: 255 / 31

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

On to step 5:
77 divided by 31 is 2 with a remainder of 15.
Put 2 as the next digit of the answer. 
Result so far: 1282.0
The remainder is 15 after subtracting 62 from 77.
Include the next digit (4) from the dividend after 15, then repeat: 154 / 31

On to step 6:
31 goes into 154 4 times with a remainder of 30.
Write down 4 as next digit of the result. 
Result so far: 12824.0
Subtract 124 from 154 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.

Let's proceed to step 7:
31 can be fit into 300 9 times, resulting in a remainder of 21.
Use 9 as the next digit of our solution. 
Result so far: 12824.9
Deduct 279 from 300 and we're left 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.

Moving on to step 8:
If we divide 210 by 31, we get 6 and a remainder of 24.
Put 6 as the next digit of the answer. 
Result so far: 12824.96
Subtracting 186 from 210 leaves us with 24.
Since there are no more digits in the dividend, we add a zero to the remainder making it 240, and continue the process.

Going ahead to step 9:
31 goes into 240 7 times with a remainder of 23.
The next digit of our result is 7. 
Result so far: 12824.967
The remainder is 23 after subtracting 217 from 240.
Since there are no more digits in the dividend, we add a zero to the remainder making it 230, and continue the process.

Advancing to step 10:
The number 31 fits into 230 7 times, leaving a remainder of 13.
Put 7 as the next digit of the answer. 
Result so far: 12824.9677
Deduct 217 from 230 and we're left with 13.
Since there are no more digits in the dividend, we add a zero to the remainder making it 130, and continue the process.

In conclusion, the division gives 12824.9677 with a balance of 0.00013.