Let's divide 401107 by 8
The aim is to understand the frequency of 8 in 401107.

Going ahead to step 1:
8 can be fit into 4 0 times, resulting in a remainder of 4.
Record the quotient 0 as the next digit in the result. 
Result so far: 0.0
Deduct 0 from 4 and we're left with 4.
Take the next digit (0) from the dividend and append it to 4, then repeat: 40 / 8

Going ahead to step 2:
The number 8 fits into 40 5 times, leaving a remainder of 0.
Write down 5 as next digit of the result. 
Result so far: 5.0
If we take 40 away from 40, we end up with 0.
Fetch the next digit (1) from the dividend, attach it to 0 and continue: 1 / 8

Step 3:
If we divide 1 by 8, we get 0 and a remainder of 1.
The number 0 becomes the next digit in our result. 
Result so far: 50.0
If we take 0 away from 1, we end up with 1.
Fetch the next digit (1) from the dividend, attach it to 1 and continue: 11 / 8

Let's proceed to step 4:
11 divided by 8 is 1 with a remainder of 3.
The number 1 becomes the next digit in our result. 
Result so far: 501.0
Subtracting 8 from 11 leaves us with 3.
Grab the next digit (0) from the dividend, add it to 3, then carry on: 30 / 8

Advancing to step 5:
8 can be fit into 30 3 times, resulting in a remainder of 6.
The next digit of our result is 3. 
Result so far: 5013.0
The remainder is 6 after subtracting 24 from 30.
Bring next digit (7) of the dividend behind the 6 and repeat the process: 67 / 8

Going ahead to step 6:
8 goes into 67 8 times with a remainder of 3.
Put 8 as the next digit of the answer. 
Result so far: 50138.0
Subtracting 64 from 67 leaves us 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:
8 goes into 30 3 times with a remainder of 6.
Put 3 as the next digit of the answer. 
Result so far: 50138.3
If we take 24 away from 30, we end up with 6.
Since there are no more digits in the dividend, we add a zero to the remainder making it 60, and continue the process.

Going ahead to step 8:
8 can be fit into 60 7 times, resulting in a remainder of 4.
Use 7 as the next digit of our solution. 
Result so far: 50138.37
Subtract 56 from 60 to get 4.
Since there are no more digits in the dividend, we add a zero to the remainder making it 40, and continue the process.

On to step 9:
If we divide 40 by 8, we get 5 and a remainder of 0.
Record the quotient 5 as the next digit in the result. 
Result so far: 50138.375
Deduct 40 from 40 and we're left with 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Step 10:
If we divide 0 by 8, we get 0 and a remainder of 0.
The number 0 becomes the next digit in our result. 
Result so far: 50138.375
Subtract 0 from 0 to get 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

Moving on to step 11:
8 can be fit into 0 0 times, resulting in a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 50138.375
Subtract 0 from 0 to get 0.
Since there are no more digits in the dividend, we add a zero to the remainder making it 0, and continue the process.

The final result is 50138.375 with a remainder of 0.0.