We look at the division of 376402 by 40 
The aim is to understand the frequency of 40 in 376402.

Step 1:
If we divide 3 by 40, we get 0 and a remainder of 3.
Use 0 as the next digit of our solution. 
Result so far: 0.0
Deduct 0 from 3 and we're left with 3.
Grab the next digit (7) from the dividend, add it to 3, then carry on: 37 / 40

On to step 2:
The number 40 fits into 37 0 times, leaving a remainder of 37.
Put 0 as the next digit of the answer. 
Result so far: 0.0
Deduct 0 from 37 and we're left with 37.
Fetch the next digit (6) from the dividend, attach it to 37 and continue: 376 / 40

On to step 3:
376 divided by 40 is 9 with a remainder of 16.
Record the quotient 9 as the next digit in the result. 
Result so far: 9.0
Subtracting 360 from 376 leaves us with 16.
Include the next digit (4) from the dividend after 16, then repeat: 164 / 40

Step 4:
164 divided by 40 is 4 with a remainder of 4.
Write down 4 as next digit of the result. 
Result so far: 94.0
If we take 160 away from 164, we end up with 4.
Take the next digit (0) from the dividend and append it to 4, then repeat: 40 / 40

Going ahead to step 5:
40 divided by 40 is 1 with a remainder of 0.
Record the quotient 1 as the next digit in the result. 
Result so far: 941.0
If we subtract 40 from 40, we get 0.
Take the next digit (2) from the dividend and append it to 0, then repeat: 2 / 40

Going ahead to step 6:
When dividing 2 by 40, we get 0 with a remainder of 2.
Put 0 as the next digit of the answer. 
Result so far: 9410.0
Subtracting 0 from 2 leaves us with 2.
Since there are no more digits in the dividend, we add a zero to the remainder making it 20, and continue the process.

Going ahead to step 7:
40 can be fit into 20 0 times, resulting in a remainder of 20.
Use 0 as the next digit of our solution. 
Result so far: 9410.0
Subtracting 0 from 20 leaves us with 20.
Since there are no more digits in the dividend, we add a zero to the remainder making it 200, and continue the process.

On to step 8:
The number 40 fits into 200 5 times, leaving a remainder of 0.
Record the quotient 5 as the next digit in the result. 
Result so far: 9410.05
The remainder is 0 after subtracting 200 from 200.
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 9:
If we divide 0 by 40, we get 0 and a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 9410.05
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 10:
40 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: 9410.05
If we take 0 away from 0, we end up 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.

The final outcome is 9410.05, with a leftover of 0.0.