We divide 398311 by 31
We're looking to find how many times 31 goes into 398311.

Going ahead to step 1:
3 divided by 31 is 0 with a remainder of 3.
Write down 0 as next digit of the result. 
Result so far: 0.0
If we take 0 away from 3, we end up with 3.
Take the next digit (9) from the dividend and append it to 3, then repeat: 39 / 31

Let's proceed to step 2:
When dividing 39 by 31, we get 1 with a remainder of 8.
The next digit of our result is 1. 
Result so far: 1.0
Subtracting 31 from 39 leaves us with 8.
Take the next digit (8) from the dividend and append it to 8, then repeat: 88 / 31

Let's proceed to step 3:
88 divided by 31 is 2 with a remainder of 26.
Record the quotient 2 as the next digit in the result. 
Result so far: 12.0
If we take 62 away from 88, we end up with 26.
Grab the next digit (3) from the dividend, add it to 26, then carry on: 263 / 31

On to step 4:
The number 31 fits into 263 8 times, leaving a remainder of 15.
The next digit of our result is 8. 
Result so far: 128.0
The remainder is 15 after subtracting 248 from 263.
Grab the next digit (1) from the dividend, add it to 15, then carry on: 151 / 31

Step 5:
31 goes into 151 4 times with a remainder of 27.
Write down 4 as next digit of the result. 
Result so far: 1284.0
If we take 124 away from 151, we end up with 27.
Fetch the next digit (1) from the dividend, attach it to 27 and continue: 271 / 31

Going ahead to step 6:
When dividing 271 by 31, we get 8 with a remainder of 23.
Use 8 as the next digit of our solution. 
Result so far: 12848.0
If we subtract 248 from 271, we get 23.
Since there are no more digits in the dividend, we add a zero to the remainder making it 230, and continue the process.

Step 7:
When dividing 230 by 31, we get 7 with a remainder of 13.
The next digit of our result is 7. 
Result so far: 12848.7
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.

Going ahead to step 8:
31 can be fit into 130 4 times, resulting in a remainder of 6.
Use 4 as the next digit of our solution. 
Result so far: 12848.74
Deduct 124 from 130 and we're left 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 9:
When dividing 60 by 31, we get 1 with a remainder of 29.
Put 1 as the next digit of the answer. 
Result so far: 12848.741
The remainder is 29 after subtracting 31 from 60.
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 10:
31 goes into 290 9 times with a remainder of 11.
The number 9 becomes the next digit in our result. 
Result so far: 12848.7419
If we take 279 away from 290, we end up 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.

Step 11:
31 can be fit into 110 3 times, resulting in a remainder of 17.
Record the quotient 3 as the next digit in the result. 
Result so far: 12848.74193
Subtract 93 from 110 to 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 12:
When dividing 170 by 31, we get 5 with a remainder of 15.
Use 5 as the next digit of our solution. 
Result so far: 12848.741935
If we subtract 155 from 170, we get 15.
Since there are no more digits in the dividend, we add a zero to the remainder making it 150, and continue the process.

Going ahead to step 13:
When dividing 150 by 31, we get 4 with a remainder of 26.
The number 4 becomes the next digit in our result. 
Result so far: 12848.7419354
Deduct 124 from 150 and we're left with 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 14:
31 goes into 260 8 times with a remainder of 12.
Put 8 as the next digit of the answer. 
Result so far: 12848.74193548
If we subtract 248 from 260, we get 12.
Since there are no more digits in the dividend, we add a zero to the remainder making it 120, and continue the process.

The quotient of the division is 12848.74193548, and the remainder is 1.2e-08.