Let's divide 642487 by 6
The aim is to understand the frequency of 6 in 642487.

Going ahead to step 1:
When dividing 6 by 6, we get 1 with a remainder of 0.
Put 1 as the next digit of the answer. 
Result so far: 1.0
If we subtract 6 from 6, we get 0.
Grab the next digit (4) from the dividend, add it to 0, then carry on: 4 / 6

Going ahead to step 2:
When dividing 4 by 6, we get 0 with a remainder of 4.
Use 0 as the next digit of our solution. 
Result so far: 10.0
If we subtract 0 from 4, we get 4.
Fetch the next digit (2) from the dividend, attach it to 4 and continue: 42 / 6

Going ahead to step 3:
42 divided by 6 is 7 with a remainder of 0.
The next digit of our result is 7. 
Result so far: 107.0
Subtract 42 from 42 to get 0.
Bring next digit (4) of the dividend behind the 0 and repeat the process: 4 / 6

Moving on to step 4:
6 can be fit into 4 0 times, resulting in a remainder of 4.
Put 0 as the next digit of the answer. 
Result so far: 1070.0
If we subtract 0 from 4, we get 4.
Grab the next digit (8) from the dividend, add it to 4, then carry on: 48 / 6

Going ahead to step 5:
6 goes into 48 8 times with a remainder of 0.
Put 8 as the next digit of the answer. 
Result so far: 10708.0
The remainder is 0 after subtracting 48 from 48.
Append the next digit (7) from the dividend to 0 and continue with: 7 / 6

On to step 6:
When dividing 7 by 6, we get 1 with a remainder of 1.
Write down 1 as next digit of the result. 
Result so far: 107081.0
Subtracting 6 from 7 leaves us with 1.
Since there are no more digits in the dividend, we add a zero to the remainder making it 10, and continue the process.

Going ahead to step 7:
When dividing 10 by 6, we get 1 with a remainder of 4.
Put 1 as the next digit of the answer. 
Result so far: 107081.1
If we take 6 away from 10, 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.

Step 8:
When dividing 40 by 6, we get 6 with a remainder of 4.
Put 6 as the next digit of the answer. 
Result so far: 107081.16
Deduct 36 from 40 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.

Going ahead to step 9:
6 can be fit into 40 6 times, resulting in a remainder of 4.
Put 6 as the next digit of the answer. 
Result so far: 107081.166
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.

The final result is 107081.166 with a remainder of 0.0004.