We divide 5165 by 7
We want to figure out the number of times 5165 can be divided by 7.

On to step 1:
The number 7 fits into 5 0 times, leaving a remainder of 5.
The number 0 becomes the next digit in our result. 
Result so far: 0.0
Deduct 0 from 5 and we're left with 5.
Take the next digit (1) from the dividend and append it to 5, then repeat: 51 / 7

Advancing to step 2:
51 divided by 7 is 7 with a remainder of 2.
Put 7 as the next digit of the answer. 
Result so far: 7.0
The remainder is 2 after subtracting 49 from 51.
Fetch the next digit (6) from the dividend, attach it to 2 and continue: 26 / 7

Moving on to step 3:
The number 7 fits into 26 3 times, leaving a remainder of 5.
Use 3 as the next digit of our solution. 
Result so far: 73.0
The remainder is 5 after subtracting 21 from 26.
Bring next digit (5) of the dividend behind the 5 and repeat the process: 55 / 7

Step 4:
The number 7 fits into 55 7 times, leaving a remainder of 6.
Put 7 as the next digit of the answer. 
Result so far: 737.0
Subtracting 49 from 55 leaves us 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.

Advancing to step 5:
7 can be fit into 60 8 times, resulting in a remainder of 4.
Write down 8 as next digit of the result. 
Result so far: 737.8
The remainder is 4 after subtracting 56 from 60.
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 6:
If we divide 40 by 7, we get 5 and a remainder of 5.
Write down 5 as next digit of the result. 
Result so far: 737.85
Subtract 35 from 40 to get 5.
Since there are no more digits in the dividend, we add a zero to the remainder making it 50, and continue the process.

Moving on to step 7:
The number 7 fits into 50 7 times, leaving a remainder of 1.
The next digit of our result is 7. 
Result so far: 737.857
If we subtract 49 from 50, 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.

On to step 8:
7 goes into 10 1 times with a remainder of 3.
Write down 1 as next digit of the result. 
Result so far: 737.8571
The remainder is 3 after subtracting 7 from 10.
Since there are no more digits in the dividend, we add a zero to the remainder making it 30, and continue the process.

On to step 9:
30 divided by 7 is 4 with a remainder of 2.
Record the quotient 4 as the next digit in the result. 
Result so far: 737.85714
If we subtract 28 from 30, we get 2.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

Step 10:
20 divided by 7 is 2 with a remainder of 6.
The next digit of our result is 2. 
Result so far: 737.857142
If we subtract 14 from 20, we get 6.
Since there are no more digits in the dividend, we add a zero to the remainder making it 60, and continue the process.

Step 11:
If we divide 60 by 7, we get 8 and a remainder of 4.
The next digit of our result is 8. 
Result so far: 737.8571428
Deduct 56 from 60 and we're left 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.

Let's proceed to step 12:
The number 7 fits into 40 5 times, leaving a remainder of 5.
The next digit of our result is 5. 
Result so far: 737.85714285
Subtract 35 from 40 to get 5.
Since there are no more digits in the dividend, we add a zero to the remainder making it 50, and continue the process.

The final result is 737.85714285 with a remainder of 5e-09.