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

On to step 1:
40 goes into 6 0 times with a remainder of 6.
Put 0 as the next digit of the answer. 
Result so far: 0.0
Subtracting 0 from 6 leaves us with 6.
Append the next digit (6) from the dividend to 6 and continue with: 66 / 40

Going ahead to step 2:
40 can be fit into 66 1 times, resulting in a remainder of 26.
The number 1 becomes the next digit in our result. 
Result so far: 1.0
Deduct 40 from 66 and we're left with 26.
Bring next digit (1) of the dividend behind the 26 and repeat the process: 261 / 40

Advancing to step 3:
If we divide 261 by 40, we get 6 and a remainder of 21.
The number 6 becomes the next digit in our result. 
Result so far: 16.0
If we take 240 away from 261, we end up with 21.
Fetch the next digit (5) from the dividend, attach it to 21 and continue: 215 / 40

Moving on to step 4:
If we divide 215 by 40, we get 5 and a remainder of 15.
Record the quotient 5 as the next digit in the result. 
Result so far: 165.0
If we subtract 200 from 215, we get 15.
Append the next digit (7) from the dividend to 15 and continue with: 157 / 40

Step 5:
157 divided by 40 is 3 with a remainder of 37.
The next digit of our result is 3. 
Result so far: 1653.0
The remainder is 37 after subtracting 120 from 157.
Bring next digit (6) of the dividend behind the 37 and repeat the process: 376 / 40

On to step 6:
If we divide 376 by 40, we get 9 and a remainder of 16.
Write down 9 as next digit of the result. 
Result so far: 16539.0
Subtract 360 from 376 to get 16.
Since there are no more digits in the dividend, we add a zero to the remainder making it 160, and continue the process.

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

Advancing to step 8:
40 can be fit into 0 0 times, resulting in a remainder of 0.
Record the quotient 0 as the next digit in the result. 
Result so far: 16539.4
Deduct 0 from 0 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.

Going ahead to step 9:
40 goes into 0 0 times with a remainder of 0.
Write down 0 as next digit of the result. 
Result so far: 16539.4
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 outcome is 16539.4, with a leftover of 0.0.