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

On to step 1:
When dividing 5 by 31, we get 0 with a remainder of 5.
Write down 0 as next digit of the result. 
Result so far: 0.0
The remainder is 5 after subtracting 0 from 5.
Take the next digit (1) from the dividend and append it to 5, then repeat: 51 / 31

Going ahead to step 2:
When dividing 51 by 31, we get 1 with a remainder of 20.
Record the quotient 1 as the next digit in the result. 
Result so far: 1.0
If we subtract 31 from 51, we get 20.
Include the next digit (1) from the dividend after 20, then repeat: 201 / 31

Advancing to step 3:
31 goes into 201 6 times with a remainder of 15.
Use 6 as the next digit of our solution. 
Result so far: 16.0
Subtracting 186 from 201 leaves us with 15.
Fetch the next digit (6) from the dividend, attach it to 15 and continue: 156 / 31

Advancing to step 4:
31 can be fit into 156 5 times, resulting in a remainder of 1.
The next digit of our result is 5. 
Result so far: 165.0
If we subtract 155 from 156, we get 1.
Fetch the next digit (6) from the dividend, attach it to 1 and continue: 16 / 31

Let's proceed to step 5:
The number 31 fits into 16 0 times, leaving a remainder of 16.
The number 0 becomes the next digit in our result. 
Result so far: 1650.0
If we subtract 0 from 16, we get 16.
Include the next digit (1) from the dividend after 16, then repeat: 161 / 31

Going ahead to step 6:
When dividing 161 by 31, we get 5 with a remainder of 6.
Use 5 as the next digit of our solution. 
Result so far: 16505.0
If we take 155 away from 161, we end up 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.
Put 1 as the next digit of the answer. 
Result so far: 16505.1
Subtracting 31 from 60 leaves us with 29.
Since there are no more digits in the dividend, we add a zero to the remainder making it 290, and continue the process.

Moving on to step 8:
The number 31 fits into 290 9 times, leaving a remainder of 11.
Record the quotient 9 as the next digit in the result. 
Result so far: 16505.19
Subtract 279 from 290 to get 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 9:
31 goes into 110 3 times with a remainder of 17.
Write down 3 as next digit of the result. 
Result so far: 16505.193
Subtracting 93 from 110 leaves us with 17.
Since there are no more digits in the dividend, we add a zero to the remainder making it 170, and continue the process.

Let's proceed to step 10:
31 can be fit into 170 5 times, resulting in a remainder of 15.
Write down 5 as next digit of the result. 
Result so far: 16505.1935
The remainder is 15 after subtracting 155 from 170.
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:
The number 31 fits into 150 4 times, leaving a remainder of 26.
Write down 4 as next digit of the result. 
Result so far: 16505.19354
Subtract 124 from 150 to 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.

Advancing to step 12:
If we divide 260 by 31, we get 8 and a remainder of 12.
Write down 8 as next digit of the result. 
Result so far: 16505.193548
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.

On to step 13:
31 goes into 120 3 times with a remainder of 27.
Use 3 as the next digit of our solution. 
Result so far: 16505.1935483
Subtracting 93 from 120 leaves us 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.

Going ahead to step 14:
If we divide 270 by 31, we get 8 and a remainder of 22.
Record the quotient 8 as the next digit in the result. 
Result so far: 16505.19354838
If we take 248 away from 270, we end up with 22.
Since there are no more digits in the dividend, we add a zero to the remainder making it 220, and continue the process.

The final result is 16505.19354838 with a remainder of 2.2e-08.