There's lots of advice in this thread to "know what you're worth", but where is that signal coming from?
In addition to highest published umber + 20%, I would advise to carefully read any stated salaries on message boards like this when they come along and pay attention to the highest numbers. Then you will be aware of what is possible.
One way to boost your odds towards picking a winner is to join in the employee ~15-25 spots. Early enough that equity is on the table, but late enough that some traction has been proven already to dampen your risk.
Anchoring is merely a technique: the first half of my post boils down to "it's ok to throw out the first number".
I've had a negotiation where I found out that the company was only able to make $2.5k after paying me + overhead (contracting on predefined rates) after they led me on and gave me an offer that met my low number barely after bonuses with zero stock. I rejected multiple times and a VP even called me by the end. That should have been the sign to walk honestly. Evidently, some places have no negotiating power fundamentally because they have no intrinsically compelling work with substantially below market rates and with little means to negotiate up their value proposition to improve their circumstances.
Hypothetical situation time. I'm a job seeker and my minimum acceptable salary is $100k. You're a recruiter and your range is $80-$120k. Neither of us know the others' number.
If I make you say a number first, you would start at the bottom of your range. (Why not?) Now I'm "negotiating up" to my minimum.
Alternatively, I go first and anchor at $150k. Now it's much more difficult to lowball me at $80k, and we'll probably "negotiate down" to your maximum.
The key with this technique is setting a good anchor. Too high (e.g., $200k) and you'll just walk away. Too low (e.g., $120k) and you'll whittle me down because you know you can negotiate.
-----
Bottom line is knowing what you're worth and quickly testing whether you're in the ballpark. If you go into interviews without having a sense of whether the company will give you a competitive offer, you're wasting everyone's time. (And you have a bad HR department.)
Don't use ranges: the employer will hear the lower number. Just say, "The market rate for this kind of role is $150k base. I'd look for a competitive overall comp package, and we can talk about salary, bonus, and equity. Is that what you had in mind?"
You'll get one of three answers:
1. "Yes, that's in range." (And you can probably negotiate up.)
2. "No, that's too high. We were thinking $x." (Now you know where you stand, and how far apart you are. <20% is negotiation. Note that if they don't give you $x, don't give another number: you're just negotiating against yourself.)
3. "Ehh, it's on the higher end, but I think we can make this work." (Might actually be #1, but otherwise means you're in the sweet spot.)