To find the percentage difference between two numbers, we first need to find the absolute difference between them. In this case, the absolute difference between 40 and 165 is 125 (165 - 40 = 125).

Next, we need to find what percentage this absolute difference is of the original number. To do this, we divide the absolute difference by the average of the two numbers and then multiply by 100. The average of 40 and 165 is (40 + 165) / 2 = 102.5.

So, the percentage difference between 40 and 165 is:

(125 / 102.5) x 100 = 122.44%

Therefore, the percentage difference between 40 and 165 is 122.44%. This means that the difference between 40 and 165 is 122.44% of the average of the two numbers.