Of course, eventually you’ll have to tell your boss that you’re looking for a new job. But deciding when to reveal that you’re making moves can be tricky. Should you keep it quiet until you have a job offer in hand—or tell your manager earlier in the process?

What to Consider Before Talking to Your Boss

The answer is that it depends. It depends on you, your boss, and what your workplace is like. It’s a decision not to be made lightly because it could put your current job in jeopardy. In most cases, your manager can fire you if they find out that you’re looking for another job. That’s because, like most U.S. workers, you are probably an employee at will. And, being employed at will means that your employer can terminate your job at any time, for almost any reason.

In short, it’s often safest to keep your job search to yourself until you’re ready to hand in your resignation letter. But everyone’s situation is different, and you should consider your own specific circumstances before deciding. Keep the following in mind:

1. Understand Your Motivation

If you are leaning toward sharing this potential career opportunity, ask yourself why and be honest. Are you compelled by a sense of loyalty to your staff, CEO, or company—or are you hoping the news might provide useful leverage at your current job? Your boss might offer you incentives to stay, such as increased salary or a promotion. But this is a risky game to play. Many companies have a policy of not making counteroffers to departing workers.

2. Think About the Worst-Case Scenario

How anxious you are to leave your current position—are you miserable in your role or just curious about the potential elsewhere? Disclosing that you are a candidate at another company may put your current job at risk. It is vital to keep in mind that if you aren’t selected for the new position, you might lose your job and face continuing your job search while unemployed.

3. Evaluate the Climate at Work

The decision to tell your boss about your job search depends greatly on the company culture. Circumstances are different in every company, with each boss, and even from day-to-day. Has anyone else in the company lost their job after being honest about their search? When an employee does leave, is the general mood one of celebration for a new opportunity or resentment about perceived disloyalty?

4. Consider Your Relationship With the Boss

Do you have a respectful, trusting relationship with your superior, or do you fear retribution? Some bosses truly support the growth of their employees and understand that it may sometimes require a job switch. You could receive encouragement and support, not to mention a terrific reference to share at your interview. Consider also whether the mood in your current office would change if you are not selected for the new position. Even the most supportive boss and colleagues might be concerned that your focus is directed toward leaving the company, rather than toward the work at hand.

5. Choose the Right Time

If you decide to be honest, particularly in the early stages of interviews, your potential employer might view this transparency as a red flag. Perhaps you are using your candidacy to leverage a better position at your current job. Timing is everything in this decision: If you are being seriously considered for the position, it may be the time to divulge the news, particularly if there’s a risk of it becoming public whether you like it or not. Again, the smartest approach is often to wait until you’ve accepted the new position and signed on the dotted line.