So your job interview is going well!

You've given some great answers and asked some engaging questions about the company to your potential employer that demonstrated your keen interest.

Then suddenly the hiring manager asks: "What was your most recent salary?"

Don't panic. This is a question that commonly pops up during a job interview - but one that you should be prepared for, because there’s almost always room for negotiation.

Here are four simple tips to keep in mind before you answer.

1. Chances are you’ll be asked "What was your most recent salary?"

One of the most important interview tips is to be prepared, and know that this is something that may come up. Employers will likely have a budget in mind, even before they start the hiring process, for the position they’re looking to staff. So you should be prepared to answer "What was your most recent salary?", even in the initial stages of the hiring process.

In theory, your previous or current salary shouldn’t significantly impact any offer you receive. That said, it pays to consider how you will respond to questions about your most recent pay package. Your response to salary queries can shape the flow of negotiations from that point.

For example, if your most recent salary was $80,000, and the hiring manager has budgeted for a salary of, say, $70,000, it makes sense for both parties to determine at an early stage if you are likely to reach a mutually acceptable middle ground – or if continued negotiations may prove fruitless.

2. Have a range in mind

To avoid a potential mismatch of salary expectations while still retaining a sense of professional privacy, you can respond to questions about your current salary by stating a range you would be comfortable with rather than providing a specific figure.

The Robert Half Salary Guide is a superior resource for determining current market salaries for a range of roles. Use the figures provided as a base level, then make allowances for your skills, knowledge and everything else you can bring to the table. Review the job description carefully to see how well you stack up against the minimum qualifications and experience.

It may be sensible to look for jobs in your preferred salary range, however it pays not to rule out possible positions on the basis of salary alone. There is likely to be room for negotiation at the hiring employer’s end especially as some companies may advertise salaries at the lower end of the spectrum in anticipation of some back and forth.

3. Hold steady

If you are asked "What was your most recent salary" during the job interview, try to gauge the range for the position you’re seeking so you don’t undersell yourself. If you’re asked about your salary requirements and you don't have a ready answer, make sure you don’t undersell yourself. Say something like, “Actually, I was wondering what this position pays. Do you have a range in mind?”

The best advice is to practice your responses before you go to the interview so you won’t be caught off guard. Rehearse in front of a mirror or with a friend.

If the interviewer continues to push, don’t allow yourself to become flustered. This is where your research comes in handy. Cite a range so you don’t lock yourself into a concrete figure. You want to leave some flexibility to negotiate if the employer’s offer is below your expectations.

4. Most important of all, be honest

If the hiring manager asks about your most recent salary, it’s always best to be honest. But make it clear if you believe you were underpaid in your previous role so that you have reason to justify a significant bump in compensation.

Robert Half's The Secrets of the Happiest Companies and Employees report reveals that a sense of fairness is crucial when it comes to remuneration for employees. If you are a candidate with the right combination of technical and soft skills and you feel you deserve a salary that is competitive with your level of expertise, then it's important to advocate and justify your reasons, using your recent salary as a foundational step.

If it is possible, aim to focus on your preferred new salary instead of your previous one. It’s all part of maintaining the emphasis where it should be: on your next job, not on your last.