My work requires me to talk about compensation history and expectations with thousands of technology professionals across a wide range of experience every year. We start with a discussion of job search criteria and what types of opportunities are most attractive, then talk about technical background and experience, and by the time the topic of money surfaces I'm usually in a decent position to guess their current salary and talk about their market rate.
The recent DZone Developer Happiness Survey concluded that over 40% of readers felt they were underpaid. 40% was well above what I expected, and from my personal experience I would put the number closer to 15-20%. That's still a significant number.
Market Rate is Tricky
I've never taken the time to try and develop some kind of elaborate mathematical formula for market rate, as I'm not qualified to do so and my expertise tends to fall into a couple specific markets. There is also nuance that needs to be considered on both the candidate and employer side.
A few examples:
Two candidates with identical technical experience might expect different salaries depending on the business model of the employer that hires them. The consulting company that expects to bill out the hire (say at an hourly rate where rate > salary/1000) probably offers a higher salary than an insurance company, because the employee's value to the consulting company is easier to accurately quantify. A software product company may fall in between.
Value of certain technical skill sets is also a factor, where someone showing production experience with a new language or framework may benefit from supply and demand inefficiencies much more than older and established language users.
Different employers will place a different value on past experience. Startups may value those with startup experience higher compared to those from larger companies, so three years of Python experience can be worth different amounts depending on where the experience was earned and what company is hiring. When we start to consider both new and old technologies at a variety of employer types, it's easy to see how confusing market rate might become.
Salary tends to plateau at certain experience levels, so a salary difference between 15 and 20 years of experience is often attributed to the types of work much more than the overall years.
This nuance is a potential issue with much of the publicly available salary data. For one, much of the data is self-reported and unverified, and those in the industry have little personal incentive to underreport earnings in anonymous salary surveys. If tech pros want to maintain high salaries, overreporting salary might be a better strategy, as the data may be used both by candidates negotiating offers as well as other employers trying to make sure their own offers are competitive.
How to Find Out
Agency recruiters (aka "headhunters") — If you feel that recruiters are useless bottom-feeders on the industry, this is your chance to use a service of theirs for free. Any experienced recruiter with knowledge of your market should be able and willing to give some insight into your earnings potential. The pushy ones will want to meet you face-to-face (a ten minute phone call is a reasonable request, as they will need some info to give an accurate estimate), and of course they will try to recruit you. Tell them that you are first interested in hearing their opinion on your market rate, and if you decide to explore opportunities you may consider their services based on how they handle this request.
Poll some friends — Asking others how much they earn has historically been considered a bit taboo (at least in the US), but industry insiders are exposed to data and their input can be useful in your quest. Instead of the "How much do you make?" question, one alternative would be to ask friends what they think your market rate should be based on your background (just like you asked the headhunter). And use extreme caution if you choose to speak to current co-workers about any compensation topics.
Research — You can spend hours on various sites that claim their data is more accurate than the others. The potential utility of that data has been discussed above.
Interview — This is the most accurate method to get your answer and also might help to keep interview skills sharp, but unfortunately it's also the most time-consuming. Some in the industry take issue with the act of interviewing in order to discover market rate, but as long as you are (A) at least slightly open to the possibility of accepting a great offer and (B) are honest in all discussions with interviewers I see no ethical issues.
Just because you feel underpaid doesn't mean it true, but it's worth exploring to find out. The problem can potentially be corrected without leaving (or even threatening to leave) your current job.