We look at the division of 399387 by 18 
The aim is to understand the frequency of 18 in 399387.

Step 1:
18 goes into 3 0 times with a remainder of 3.
Write down 0 as next digit of the result. 
Result so far: 0.0
Deduct 0 from 3 and we're left with 3.
Bring next digit (9) of the dividend behind the 3 and repeat the process: 39 / 18

Advancing to step 2:
18 can be fit into 39 2 times, resulting in a remainder of 3.
The next digit of our result is 2. 
Result so far: 2.0
Subtracting 36 from 39 leaves us with 3.
Bring next digit (9) of the dividend behind the 3 and repeat the process: 39 / 18

Step 3:
39 divided by 18 is 2 with a remainder of 3.
The number 2 becomes the next digit in our result. 
Result so far: 22.0
If we subtract 36 from 39, we get 3.
Bring next digit (3) of the dividend behind the 3 and repeat the process: 33 / 18

Going ahead to step 4:
The number 18 fits into 33 1 times, leaving a remainder of 15.
Record the quotient 1 as the next digit in the result. 
Result so far: 221.0
Deduct 18 from 33 and we're left with 15.
Bring next digit (8) of the dividend behind the 15 and repeat the process: 158 / 18

Advancing to step 5:
158 divided by 18 is 8 with a remainder of 14.
Write down 8 as next digit of the result. 
Result so far: 2218.0
If we take 144 away from 158, we end up with 14.
Grab the next digit (7) from the dividend, add it to 14, then carry on: 147 / 18

Going ahead to step 6:
147 divided by 18 is 8 with a remainder of 3.
Write down 8 as next digit of the result. 
Result so far: 22188.0
Deduct 144 from 147 and we're left 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 7:
If we divide 30 by 18, we get 1 and a remainder of 12.
Put 1 as the next digit of the answer. 
Result so far: 22188.1
Subtracting 18 from 30 leaves us 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.

Advancing to step 8:
The number 18 fits into 120 6 times, leaving a remainder of 12.
Put 6 as the next digit of the answer. 
Result so far: 22188.16
Deduct 108 from 120 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.

Let's proceed to step 9:
18 can be fit into 120 6 times, resulting in a remainder of 12.
The next digit of our result is 6. 
Result so far: 22188.166
If we subtract 108 from 120, 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.

After the division, we end up with 22188.166 and a remainder of 0.0012.