Let's divide 501799 by 9
The aim is to understand the frequency of 9 in 501799.

Let's proceed to step 1:
9 can be fit into 5 0 times, resulting in a remainder of 5.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
The remainder is 5 after subtracting 0 from 5.
Take the next digit (0) from the dividend and append it to 5, then repeat: 50 / 9

On to step 2:
9 goes into 50 5 times with a remainder of 5.
Put 5 as the next digit of the answer. 
Result so far: 5.0
Deduct 45 from 50 and we're left with 5.
Take the next digit (1) from the dividend and append it to 5, then repeat: 51 / 9

Step 3:
9 can be fit into 51 5 times, resulting in a remainder of 6.
The next digit of our result is 5. 
Result so far: 55.0
If we take 45 away from 51, we end up with 6.
Bring next digit (7) of the dividend behind the 6 and repeat the process: 67 / 9

Going ahead to step 4:
When dividing 67 by 9, we get 7 with a remainder of 4.
Record the quotient 7 as the next digit in the result. 
Result so far: 557.0
Subtracting 63 from 67 leaves us with 4.
Append the next digit (9) from the dividend to 4 and continue with: 49 / 9

Step 5:
9 can be fit into 49 5 times, resulting in a remainder of 4.
Put 5 as the next digit of the answer. 
Result so far: 5575.0
Subtract 45 from 49 to get 4.
Take the next digit (9) from the dividend and append it to 4, then repeat: 49 / 9

Let's proceed to step 6:
9 goes into 49 5 times with a remainder of 4.
The number 5 becomes the next digit in our result. 
Result so far: 55755.0
If we take 45 away from 49, we end up 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.

Moving on to step 7:
9 goes into 40 4 times with a remainder of 4.
The next digit of our result is 4. 
Result so far: 55755.4
If we take 36 away from 40, we end up 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 8:
When dividing 40 by 9, we get 4 with a remainder of 4.
Put 4 as the next digit of the answer. 
Result so far: 55755.44
The remainder is 4 after subtracting 36 from 40.
Since there are no more digits in the dividend, we add a zero to the remainder making it 40, and continue the process.

Our division results in 55755.44 with a remaining 0.004.