We look at the division of 642228 by 31 
We're looking to find how many times 31 goes into 642228.

Moving on to step 1:
31 can be fit into 6 0 times, resulting in a remainder of 6.
Put 0 as the next digit of the answer. 
Result so far: 0.0
If we subtract 0 from 6, we get 6.
Include the next digit (4) from the dividend after 6, then repeat: 64 / 31

Let's proceed to step 2:
31 can be fit into 64 2 times, resulting in a remainder of 2.
Write down 2 as next digit of the result. 
Result so far: 2.0
Subtract 62 from 64 to get 2.
Take the next digit (2) from the dividend and append it to 2, then repeat: 22 / 31

Step 3:
The number 31 fits into 22 0 times, leaving a remainder of 22.
The next digit of our result is 0. 
Result so far: 20.0
The remainder is 22 after subtracting 0 from 22.
Fetch the next digit (2) from the dividend, attach it to 22 and continue: 222 / 31

Going ahead to step 4:
If we divide 222 by 31, we get 7 and a remainder of 5.
The next digit of our result is 7. 
Result so far: 207.0
Subtracting 217 from 222 leaves us with 5.
Include the next digit (2) from the dividend after 5, then repeat: 52 / 31

Moving on to step 5:
31 goes into 52 1 times with a remainder of 21.
Put 1 as the next digit of the answer. 
Result so far: 2071.0
Deduct 31 from 52 and we're left with 21.
Fetch the next digit (8) from the dividend, attach it to 21 and continue: 218 / 31

Let's proceed to step 6:
31 can be fit into 218 7 times, resulting in a remainder of 1.
Put 7 as the next digit of the answer. 
Result so far: 20717.0
Deduct 217 from 218 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 7:
10 divided by 31 is 0 with a remainder of 10.
The number 0 becomes the next digit in our result. 
Result so far: 20717.0
If we take 0 away from 10, we end up 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.

On to step 8:
When dividing 100 by 31, we get 3 with a remainder of 7.
Record the quotient 3 as the next digit in the result. 
Result so far: 20717.03
If we subtract 93 from 100, we get 7.
Since there are no more digits in the dividend, we add a zero to the remainder making it 70, and continue the process.

On to step 9:
70 divided by 31 is 2 with a remainder of 8.
The number 2 becomes the next digit in our result. 
Result so far: 20717.032
If we take 62 away from 70, we end up with 8.
Since there are no more digits in the dividend, we add a zero to the remainder making it 80, and continue the process.

Going ahead to step 10:
31 can be fit into 80 2 times, resulting in a remainder of 18.
The number 2 becomes the next digit in our result. 
Result so far: 20717.0322
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.

The final result is 20717.0322 with a remainder of 0.00018.