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

On to step 1:
When dividing 1 by 865, we get 0 with a remainder of 1.
Write down 0 as next digit of the result. 
Result so far: 0.0
Subtract 0 from 1 to get 1.
Grab the next digit (0) from the dividend, add it to 1, then carry on: 10 / 865

Step 2:
The number 865 fits into 10 0 times, leaving a remainder of 10.
Put 0 as the next digit of the answer. 
Result so far: 0.0
The remainder is 10 after subtracting 0 from 10.
Append the next digit (1) from the dividend to 10 and continue with: 101 / 865

Moving on to step 3:
101 divided by 865 is 0 with a remainder of 101.
Put 0 as the next digit of the answer. 
Result so far: 0.0
If we take 0 away from 101, we end up with 101.
Bring next digit (6) of the dividend behind the 101 and repeat the process: 1016 / 865

Going ahead to step 4:
865 goes into 1016 1 times with a remainder of 151.
Put 1 as the next digit of the answer. 
Result so far: 1.0
If we take 865 away from 1016, we end up with 151.
Append the next digit (6) from the dividend to 151 and continue with: 1516 / 865

Going ahead to step 5:
If we divide 1516 by 865, we get 1 and a remainder of 651.
The next digit of our result is 1. 
Result so far: 11.0
If we subtract 865 from 1516, we get 651.
Fetch the next digit (3) from the dividend, attach it to 651 and continue: 6513 / 865

Let's proceed to step 6:
The number 865 fits into 6513 7 times, leaving a remainder of 458.
The number 7 becomes the next digit in our result. 
Result so far: 117.0
If we take 6055 away from 6513, we end up with 458.
Grab the next digit (1) from the dividend, add it to 458, then carry on: 4581 / 865

Going ahead to step 7:
865 goes into 4581 5 times with a remainder of 256.
Write down 5 as next digit of the result. 
Result so far: 1175.0
If we subtract 4325 from 4581, we get 256.
Bring next digit (9) of the dividend behind the 256 and repeat the process: 2569 / 865

Going ahead to step 8:
The number 865 fits into 2569 2 times, leaving a remainder of 839.
The number 2 becomes the next digit in our result. 
Result so far: 11752.0
Deduct 1730 from 2569 and we're left with 839.
Since there are no more digits in the dividend, we add a zero to the remainder making it 8390, and continue the process.

On to step 9:
The number 865 fits into 8390 9 times, leaving a remainder of 605.
The number 9 becomes the next digit in our result. 
Result so far: 11752.9
Subtracting 7785 from 8390 leaves us with 605.
Since there are no more digits in the dividend, we add a zero to the remainder making it 6050, and continue the process.

Going ahead to step 10:
The number 865 fits into 6050 6 times, leaving a remainder of 860.
Write down 6 as next digit of the result. 
Result so far: 11752.96
If we subtract 5190 from 6050, we get 860.
Since there are no more digits in the dividend, we add a zero to the remainder making it 8600, and continue the process.

Going ahead to step 11:
865 can be fit into 8600 9 times, resulting in a remainder of 815.
Record the quotient 9 as the next digit in the result. 
Result so far: 11752.969
Subtract 7785 from 8600 to get 815.
Since there are no more digits in the dividend, we add a zero to the remainder making it 8150, and continue the process.

Advancing to step 12:
When dividing 8150 by 865, we get 9 with a remainder of 365.
Use 9 as the next digit of our solution. 
Result so far: 11752.9699
The remainder is 365 after subtracting 7785 from 8150.
Since there are no more digits in the dividend, we add a zero to the remainder making it 3650, and continue the process.

Our division results in 11752.9699 with a remaining 0.00365.