Let's divide 313166 by 13
We want to figure out the number of times 313166 can be divided by 13.

Advancing to step 1:
13 can be fit into 3 0 times, resulting in a remainder of 3.
Put 0 as the next digit of the answer. 
Result so far: 0.0
Subtracting 0 from 3 leaves us with 3.
Fetch the next digit (1) from the dividend, attach it to 3 and continue: 31 / 13

Advancing to step 2:
When dividing 31 by 13, we get 2 with a remainder of 5.
Record the quotient 2 as the next digit in the result. 
Result so far: 2.0
Deduct 26 from 31 and we're left with 5.
Fetch the next digit (3) from the dividend, attach it to 5 and continue: 53 / 13

Advancing to step 3:
The number 13 fits into 53 4 times, leaving a remainder of 1.
The next digit of our result is 4. 
Result so far: 24.0
Deduct 52 from 53 and we're left with 1.
Fetch the next digit (1) from the dividend, attach it to 1 and continue: 11 / 13

Advancing to step 4:
11 divided by 13 is 0 with a remainder of 11.
Record the quotient 0 as the next digit in the result. 
Result so far: 240.0
Deduct 0 from 11 and we're left with 11.
Fetch the next digit (6) from the dividend, attach it to 11 and continue: 116 / 13

Advancing to step 5:
When dividing 116 by 13, we get 8 with a remainder of 12.
Record the quotient 8 as the next digit in the result. 
Result so far: 2408.0
Subtract 104 from 116 to get 12.
Take the next digit (6) from the dividend and append it to 12, then repeat: 126 / 13

Step 6:
The number 13 fits into 126 9 times, leaving a remainder of 9.
Put 9 as the next digit of the answer. 
Result so far: 24089.0
Subtract 117 from 126 to get 9.
Since there are no more digits in the dividend, we add a zero to the remainder making it 90, and continue the process.

Going ahead to step 7:
The number 13 fits into 90 6 times, leaving a remainder of 12.
Record the quotient 6 as the next digit in the result. 
Result so far: 24089.6
If we subtract 78 from 90, 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 8:
120 divided by 13 is 9 with a remainder of 3.
The next digit of our result is 9. 
Result so far: 24089.69
Subtracting 117 from 120 leaves us with 3.
Since there are no more digits in the dividend, we add a zero to the remainder making it 30, and continue the process.

Advancing to step 9:
The number 13 fits into 30 2 times, leaving a remainder of 4.
The next digit of our result is 2. 
Result so far: 24089.692
The remainder is 4 after subtracting 26 from 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 40, and continue the process.

On to step 10:
40 divided by 13 is 3 with a remainder of 1.
Put 3 as the next digit of the answer. 
Result so far: 24089.6923
If we subtract 39 from 40, we get 1.
Since there are no more digits in the dividend, we add a zero to the remainder making it 10, and continue the process.

Let's proceed to step 11:
10 divided by 13 is 0 with a remainder of 10.
Write down 0 as next digit of the result. 
Result so far: 24089.6923
If we subtract 0 from 10, we get 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 100, and continue the process.

Let's proceed to step 12:
13 goes into 100 7 times with a remainder of 9.
Put 7 as the next digit of the answer. 
Result so far: 24089.692307
If we subtract 91 from 100, we get 9.
Since there are no more digits in the dividend, we add a zero to the remainder making it 90, and continue the process.

Step 13:
13 goes into 90 6 times with a remainder of 12.
The next digit of our result is 6. 
Result so far: 24089.6923076
Deduct 78 from 90 and we're left with 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 14:
If we divide 120 by 13, we get 9 and a remainder of 3.
Put 9 as the next digit of the answer. 
Result so far: 24089.69230769
If we subtract 117 from 120, we get 3.
Since there are no more digits in the dividend, we add a zero to the remainder making it 30, and continue the process.

After the division, we end up with 24089.69230769 and a remainder of 3e-09.