We divide 158895 by 40
The aim is to understand the frequency of 40 in 158895.

Going ahead to step 1:
1 divided by 40 is 0 with a remainder of 1.
Use 0 as the next digit of our solution. 
Result so far: 0.0
Subtract 0 from 1 to get 1.
Grab the next digit (5) from the dividend, add it to 1, then carry on: 15 / 40

Advancing to step 2:
40 can be fit into 15 0 times, resulting in a remainder of 15.
Write down 0 as next digit of the result. 
Result so far: 0.0
The remainder is 15 after subtracting 0 from 15.
Append the next digit (8) from the dividend to 15 and continue with: 158 / 40

Let's proceed to step 3:
158 divided by 40 is 3 with a remainder of 38.
Use 3 as the next digit of our solution. 
Result so far: 3.0
Deduct 120 from 158 and we're left with 38.
Take the next digit (8) from the dividend and append it to 38, then repeat: 388 / 40

Advancing to step 4:
If we divide 388 by 40, we get 9 and a remainder of 28.
Record the quotient 9 as the next digit in the result. 
Result so far: 39.0
Deduct 360 from 388 and we're left with 28.
Fetch the next digit (9) from the dividend, attach it to 28 and continue: 289 / 40

Step 5:
40 goes into 289 7 times with a remainder of 9.
Write down 7 as next digit of the result. 
Result so far: 397.0
If we subtract 280 from 289, we get 9.
Fetch the next digit (5) from the dividend, attach it to 9 and continue: 95 / 40

Advancing to step 6:
If we divide 95 by 40, we get 2 and a remainder of 15.
Record the quotient 2 as the next digit in the result. 
Result so far: 3972.0
The remainder is 15 after subtracting 80 from 95.
Since there are no more digits in the dividend, we add a zero to the remainder making it 150, and continue the process.

Step 7:
The number 40 fits into 150 3 times, leaving a remainder of 30.
The next digit of our result is 3. 
Result so far: 3972.3
Subtract 120 from 150 to get 30.
Since there are no more digits in the dividend, we add a zero to the remainder making it 300, and continue the process.

Step 8:
300 divided by 40 is 7 with a remainder of 20.
Use 7 as the next digit of our solution. 
Result so far: 3972.37
If we subtract 280 from 300, we get 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

Advancing to step 9:
When dividing 200 by 40, we get 5 with a remainder of 0.
Write down 5 as next digit of the result. 
Result so far: 3972.375
Deduct 200 from 200 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:
The number 40 fits into 0 0 times, leaving a remainder of 0.
Use 0 as the next digit of our solution. 
Result so far: 3972.375
If we subtract 0 from 0, we 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.

Going ahead to step 11:
The number 40 fits into 0 0 times, leaving a remainder of 0.
Put 0 as the next digit of the answer. 
Result so far: 3972.375
If we subtract 0 from 0, we 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.

Our division results in 3972.375 with a remaining 0.0.