We're dividing 549551 by 40 
The aim is to understand the frequency of 40 in 549551.

Step 1:
If we divide 5 by 40, we get 0 and a remainder of 5.
Write down 0 as next digit of the result. 
Result so far: 0.0
If we subtract 0 from 5, we get 5.
Bring next digit (4) of the dividend behind the 5 and repeat the process: 54 / 40

Going ahead to step 2:
The number 40 fits into 54 1 times, leaving a remainder of 14.
The next digit of our result is 1. 
Result so far: 1.0
Subtract 40 from 54 to get 14.
Take the next digit (9) from the dividend and append it to 14, then repeat: 149 / 40

On to step 3:
If we divide 149 by 40, we get 3 and a remainder of 29.
Use 3 as the next digit of our solution. 
Result so far: 13.0
Subtracting 120 from 149 leaves us with 29.
Fetch the next digit (5) from the dividend, attach it to 29 and continue: 295 / 40

Going ahead to step 4:
295 divided by 40 is 7 with a remainder of 15.
The next digit of our result is 7. 
Result so far: 137.0
Subtracting 280 from 295 leaves us with 15.
Bring next digit (5) of the dividend behind the 15 and repeat the process: 155 / 40

Step 5:
155 divided by 40 is 3 with a remainder of 35.
Write down 3 as next digit of the result. 
Result so far: 1373.0
Subtracting 120 from 155 leaves us with 35.
Grab the next digit (1) from the dividend, add it to 35, then carry on: 351 / 40

Step 6:
40 goes into 351 8 times with a remainder of 31.
Put 8 as the next digit of the answer. 
Result so far: 13738.0
If we take 320 away from 351, we end up with 31.
Since there are no more digits in the dividend, we add a zero to the remainder making it 310, and continue the process.

Going ahead to step 7:
The number 40 fits into 310 7 times, leaving a remainder of 30.
The number 7 becomes the next digit in our result. 
Result so far: 13738.7
If we subtract 280 from 310, we 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: 13738.77
Deduct 280 from 300 and we're left 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.

Our division results in 13738.77 with a remaining 0.02.