It's probably the most feared interview or application question you will face. The answer can keep you in the hunt or take you out. It anchors the negotiation of your next contract. So, how do you answer it?
Before you get to the answer, you should be doing homework to understand the pay range for the role based upon the market and your experience. I subscribe to a payroll reporting agency and get a clear picture of most pay ranges. You can check out salary.com for data on thousands of roles in major US markets.
So, the answer? It always begins with "My salary expectations are commensurate with the role, the responsibilities, and my skills and experience. Salary is just one piece of total compensation and without knowing the benefits, allowances, bonus, and PTO, it's too early in the process to answer that question"
In many cases the interviewer will likely press you for a number. If you've done your homework, you know the range and should put yourself at or slightly above the median (depending on your experience). This also applies to the online application that won't let you move on without a hard number.
Important takeaway, salary is just one part of total comp and talking in terms of 'total comp package' will give you more room to negotiate later in the process.