Maybe you’ve been at your job for a while, and your salary hasn’t kept pace with your city’s cost of living.

Or maybe they hired you at a below-market salary because you were new to the field.

Whatever the reason, it’s high time you earned an at-market salary.

But being a competent professional isn’t enough to get that raise you deserve. You’ll need leverage. And you’ll need to be prepared to use it.

Talking about your salary may feel awkward. Or greedy. Or disloyal. Jam those feelings down the nearest garbage disposal.

It’s OK to feel loyal to your boss. They hired you. They helped train you. They may even genuinely care about you.

But any loyalty you feel toward your employer — that legal entity that employs you and your boss — is probably misplaced.

This is, after all, the 21st century. If there ever was an era of lifetime employment and the “company man,” it has long since passed.

Any loyalty you may feel toward your employer will not be reciprocated. New employees will be hired above you, with fancier job titles and better pay. When investors demand layoffs, your years of dutiful service won’t save you from the chopping block.

Who profits when you decline a call from a recruiter out of loyalty to your employer? Investors.

Who profits when you accept a standard annual raise instead of negotiating for a larger one? Investors.

Who profits from a culture where employees keep their salaries to themselves instead of freely sharing this information with peers? Investors.

In an opaque, imperfect labor market, investors profit at employees’ expense. And that’s who ultimately owns the company you work for. Not your boss, or your boss’s boss — though they may own some of it. Investors have extra money lying around, which they can risk on a speculative investment in your employer. They are the people who are profiting from your loyalty.

Employers will use sketchy — even illegal — tricks to retain you.

Many industries have secret agreements not to poach one another’s employees. This is good for employers, who can keep their wages artificially low as a result.

The US Department of Justice recently reached settlements with tech companies who intentionally — and illegally — made it harder for employees to change jobs — companies like Adobe, Apple, Google, Intel, Intuit, and Pixar.

Employers will use a carrot: “golden handcuffs” such as signing bonuses that you have to pay back if you leave within a certain period. Or stock options that take several years to fully vest. Or stock options that are intentionally designed to be too expensive to exercise, forcing you to stay at the company indefinitely or walk away with nothing.

Other employers will use a stick: noncompete agreements, which prevent you taking a new job in the same field.

Even though noncompetes are increasingly unenforceable, employers won’t tell you this. They’ll leave it to you to seek out a lawyer.

The White House has condemned employers’ use of noncompetes as a perversion of their original purpose — which was to slow the spread of trade secrets. Instead, noncompetes have become just another tool for keeping you from leaving your current job for a better one.

Despite all this, smart people change jobs all the time.

It takes courage to leave a stable job in search of a better one. Especially when you have kids to feed, student loan debt to service, or a house to pay off. But people do this all the time.

The average length of time that software developers stay at a given company is surprisingly short:

The circled numbers are the median length of a developer’s tenure at the company. Read the full study here.

Which brings us to the most important rule for negotiating your raise.

Be prepared to walk away.

If you want to have any leverage at all in your salary negotiation, you need to be prepared — financially and psychologically — to actually to leave the company.

If your employer has succeeded in lulling you into a complacency where you dine on fancy meals and lease expensive cars instead of saving — if you are like 62% of Americans who are one pay check away from living on the street — you will have zero leverage in the negotiation. Because your employer can just say “no” and there’s nothing you can do about it.

So before you initiate any sort of salary negotiation, you need to establish a Best Alternative to a Negotiated Agreement (BATNA). Your BATNA is your recourse if negotiations fail.

Attempting to negotiate without a BATNA will waste your boss’s time, and weaken your position in future negotiations.

The best BATNA you can have is a job offer from a competitor.

Your BATNA could be that you’ll quit and work as a freelancer, or that you’ll go back to school and transition into a new career.

But employers hear these kinds of ultimatums all the time. Your boss will call your bluff, lecturing you on how these options are more risky — and less desirable — than continuing in your current job. You may start to doubt the soundness of your BATNA, and back away.

Luckily, there’s a much better BATNA out there — though it will take some work to secure.

You know those recruiters who email you, cold call you, and stalk you at events? Try talking to some of them.

You’re already productively employed at ABC Co. You could be productively employed at XYZ Co, and they will probably offer more money to entice you away.

So you take the recruiter’s advice and duck out for a few long lunches (interviews) at the conglomerate next door. Solve some problems on a whiteboard. Once XYZ Co extends you an offer, your BATNA is secured.

But wait — how strong this job offer? Just because a job offer is higher than your current salary doesn’t mean it’s a strong offer. In reality, you could be grossly underpaid in your current job, and this new offer may not be as strong as you think.

Before you can counter-offer and ratchet up the value of your BATNA, you need to understand the at-market salary for a professional of your talents.

Analyze data. Ask around. Do your research.

The main factors that determine salary are company, city, and job title. You should conduct a two-prong investigation:

Talk to your peers within your company. Figure out how much money they make. One trick for getting a ballpark figure in an indirect way is to ask them how much they think your mutual employer would pay a new recruit with their skills and experience. Study the salaries that employers in your city are in are paying to people in positions comparable to yours.

The US government publicly shares salary data for all employees who enter the US on an H1-B work visas. All these data are available in one big database of more than 1.6 million salaries. You can search by company, city, and job title. It’s free, and even has charts and filtering options. If you’re a US national, your salary should be at least as high as the salaries you find here.

You may want to look into other forms of compensation, too: insurance providers and their premiums, paid time off, stock options, even perks like free lunch and parking spaces.

At the end of the day, salary is king. For better or worse, salary is the objective measure that professionals use to compare themselves to one another. And most perks indirectly come out of your salary, anyway (as Netflix CEO Reed Hastings makes clear in the most widely viewed PowerPoint of all time).

Knowing the at-market salary for a person of your talents will help you negotiate with confidence.

Market Research + BATNA = Leverage

So you know the at-market rate for professionals in your city with your job title. You also know what peers within your own company are getting paid. And you have solid BATNA. Now you’re ready to suit up and march into your boss’s office.

Don’t wait until performance review time to negotiate a raise. Find out when your company plans their annual budget for salary increases. Be sure to negotiate your raise before that date — otherwise your boss will use the budget as an excuse to give you less.

The best time to negotiate is when you’ve just delivered a project or hit a major milestone. Then you’ll have a good answer to the “what have you done lately that’s worthy of a raise?” question.

Don’t flinch if your boss fires back at you with some policy about salary ranges or salary caps for your job title. They just gave you a great opening to negotiate for a promotion as well.

Be fearless. But also be mindful of what’s happening on the other side of the negotiation table.

Most employees fail to prepare for their raise discussion. They’ll argue for a raise based on things like their seniority, their recent performance, or rising housing costs. These are terrible negotiating positions with no leverage. Is it any surprise that bosses become accustom to handing out small token raises to these people?

Imagine your boss’s surprise when you come along with real leverage. You’ve done your homework. You have a serious BATNA.

Your boss may be caught off-guard by such a well-equipped adversary at the negotiation table. This can quickly become a terrifying conversation for them. If they lose one of their employees to a competitor, it will reflect poorly on them as a manager. And they will have to spend months — and tens of thousands of dollars — finding a replacement for you.

So be polite throughout the process. If they agree to pay you what you’re worth, you will still have to work with this person. And you don’t want your boss to resent having to grovel before their bosses to approve an abnormally large raise for you. You want to come across as savvy and serious—not mercenary.

Be sure to follow up all of your salary discussions with an email describing what you talked about. This will not only document your conversation — it will give your boss a script for arguing your case to all the other managers who will need to sign off on your raise.

Remember — you don’t need to be a “rockstar” to get a raise. If you could be earning a higher wage somewhere else doing the same job that you’re doing now, your employer probably should have been paying you more all along.

And don’t feel obligated to work any harder after they give you your raise. They didn’t give you a raise so you’d work harder. They gave you a raise so you’d continue working for them in your current capacity. It is they who shortchanged you, by not proactively — and frequently — raising your salary to at-market levels.

It takes a lot of guts to tell your boss that you deserve a higher salary, which is why most of your peers will continue to be underpaid. But not you. You’re the smart one. The tough one. And if they don’t pay you an at-market salary, someone else will.

If you liked this, click the? below so other people will see this here on Medium.