640031 divided by 31 
We want to divide 640031 by 31.

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
Deduct 0 from 6 and we're left with 6.
Append the next digit (4) from the dividend to 6 and continue with: 64 / 31

Going ahead to step 2:
If we divide 64 by 31, we get 2 and a remainder of 2.
The number 2 becomes the next digit in our result. 
Result so far: 2.0
If we take 62 away from 64, we end up with 2.
Take the next digit (0) from the dividend and append it to 2, then repeat: 20 / 31

Going ahead to step 3:
The number 31 fits into 20 0 times, leaving a remainder of 20.
Write down 0 as next digit of the result. 
Result so far: 20.0
The remainder is 20 after subtracting 0 from 20.
Fetch the next digit (0) from the dividend, attach it to 20 and continue: 200 / 31

Moving on to step 4:
200 divided by 31 is 6 with a remainder of 14.
The next digit of our result is 6. 
Result so far: 206.0
The remainder is 14 after subtracting 186 from 200.
Take the next digit (3) from the dividend and append it to 14, then repeat: 143 / 31

Advancing to step 5:
If we divide 143 by 31, we get 4 and a remainder of 19.
Write down 4 as next digit of the result. 
Result so far: 2064.0
If we subtract 124 from 143, we get 19.
Append the next digit (1) from the dividend to 19 and continue with: 191 / 31

Moving on to step 6:
31 goes into 191 6 times with a remainder of 5.
Record the quotient 6 as the next digit in the result. 
Result so far: 20646.0
The remainder is 5 after subtracting 186 from 191.
Since there are no more digits in the dividend, we add a zero to the remainder making it 50, and continue the process.

On to step 7:
The number 31 fits into 50 1 times, leaving a remainder of 19.
The next digit of our result is 1. 
Result so far: 20646.1
Subtracting 31 from 50 leaves us with 19.
Since there are no more digits in the dividend, we add a zero to the remainder making it 190, and continue the process.

On to step 8:
31 can be fit into 190 6 times, resulting in a remainder of 4.
The number 6 becomes the next digit in our result. 
Result so far: 20646.16
Subtracting 186 from 190 leaves us with 4.
Since there are no more digits in the dividend, we add a zero to the remainder making it 40, and continue the process.

Advancing to step 9:
40 divided by 31 is 1 with a remainder of 9.
Record the quotient 1 as the next digit in the result. 
Result so far: 20646.161
The remainder is 9 after subtracting 31 from 40.
Since there are no more digits in the dividend, we add a zero to the remainder making it 90, and continue the process.

Advancing to step 10:
31 can be fit into 90 2 times, resulting in a remainder of 28.
Write down 2 as next digit of the result. 
Result so far: 20646.1612
Subtract 62 from 90 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.

Going ahead to step 11:
31 can be fit into 280 9 times, resulting in a remainder of 1.
Put 9 as the next digit of the answer. 
Result so far: 20646.16129
The remainder is 1 after subtracting 279 from 280.
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 12:
31 goes into 10 0 times with a remainder of 10.
The next digit of our result is 0. 
Result so far: 20646.16129
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.

Advancing to step 13:
31 can be fit into 100 3 times, resulting in a remainder of 7.
Record the quotient 3 as the next digit in the result. 
Result so far: 20646.1612903
The remainder is 7 after subtracting 93 from 100.
Since there are no more digits in the dividend, we add a zero to the remainder making it 70, and continue the process.

Advancing to step 14:
31 goes into 70 2 times with a remainder of 8.
Put 2 as the next digit of the answer. 
Result so far: 20646.16129032
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.

The quotient of the division is 20646.16129032, and the remainder is 8e-09.