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

On to step 1:
The number 40 fits into 7 0 times, leaving a remainder of 7.
Put 0 as the next digit of the answer. 
Result so far: 0.0
Subtract 0 from 7 to get 7.
Include the next digit (8) from the dividend after 7, then repeat: 78 / 40

Step 2:
If we divide 78 by 40, we get 1 and a remainder of 38.
Use 1 as the next digit of our solution. 
Result so far: 1.0
Subtracting 40 from 78 leaves us with 38.
Grab the next digit (6) from the dividend, add it to 38, then carry on: 386 / 40

Going ahead to step 3:
386 divided by 40 is 9 with a remainder of 26.
Use 9 as the next digit of our solution. 
Result so far: 19.0
Subtract 360 from 386 to get 26.
Include the next digit (9) from the dividend after 26, then repeat: 269 / 40

Step 4:
When dividing 269 by 40, we get 6 with a remainder of 29.
The next digit of our result is 6. 
Result so far: 196.0
If we take 240 away from 269, we end up with 29.
Grab the next digit (0) from the dividend, add it to 29, then carry on: 290 / 40

Let's proceed to step 5:
When dividing 290 by 40, we get 7 with a remainder of 10.
Put 7 as the next digit of the answer. 
Result so far: 1967.0
If we subtract 280 from 290, we get 10.
Bring next digit (2) of the dividend behind the 10 and repeat the process: 102 / 40

Going ahead to step 6:
40 goes into 102 2 times with a remainder of 22.
Write down 2 as next digit of the result. 
Result so far: 19672.0
Deduct 80 from 102 and we're left with 22.
Since there are no more digits in the dividend, we add a zero to the remainder making it 220, and continue the process.

Step 7:
220 divided by 40 is 5 with a remainder of 20.
Use 5 as the next digit of our solution. 
Result so far: 19672.5
Subtracting 200 from 220 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:
When dividing 200 by 40, we get 5 with a remainder of 0.
The number 5 becomes the next digit in our result. 
Result so far: 19672.55
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.

The final result is 19672.55 with a remainder of 0.0.