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

On to step 1:
The number 18 fits into 8 0 times, leaving a remainder of 8.
Write down 0 as next digit of the result. 
Result so far: 0.0
Subtract 0 from 8 to get 8.
Bring next digit (7) of the dividend behind the 8 and repeat the process: 87 / 18

Going ahead to step 2:
If we divide 87 by 18, we get 4 and a remainder of 15.
Use 4 as the next digit of our solution. 
Result so far: 4.0
If we take 72 away from 87, we end up with 15.
Fetch the next digit (6) from the dividend, attach it to 15 and continue: 156 / 18

Moving on to step 3:
When dividing 156 by 18, we get 8 with a remainder of 12.
Put 8 as the next digit of the answer. 
Result so far: 48.0
Subtracting 144 from 156 leaves us with 12.
Fetch the next digit (5) from the dividend, attach it to 12 and continue: 125 / 18

Advancing to step 4:
18 goes into 125 6 times with a remainder of 17.
Record the quotient 6 as the next digit in the result. 
Result so far: 486.0
Deduct 108 from 125 and we're left with 17.
Grab the next digit (2) from the dividend, add it to 17, then carry on: 172 / 18

Going ahead to step 5:
If we divide 172 by 18, we get 9 and a remainder of 10.
Write down 9 as next digit of the result. 
Result so far: 4869.0
Deduct 162 from 172 and we're left with 10.
Fetch the next digit (2) from the dividend, attach it to 10 and continue: 102 / 18

On to step 6:
If we divide 102 by 18, we get 5 and a remainder of 12.
The number 5 becomes the next digit in our result. 
Result so far: 48695.0
If we subtract 90 from 102, 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.

Moving on to step 7:
120 divided by 18 is 6 with a remainder of 12.
Record the quotient 6 as the next digit in the result. 
Result so far: 48695.6
Subtract 108 from 120 to 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.

Advancing to step 8:
18 goes into 120 6 times with a remainder of 12.
Put 6 as the next digit of the answer. 
Result so far: 48695.66
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.

The final outcome is 48695.66, with a leftover of 0.012.