Today we launched the 2018 update to the Stack Overflow Salary Calculator, a tool that allows developers and employers to find typical salaries for the software industry based on experience level, location, education, and specific technologies. The methodology we used is similar to last year, but this year we've added support for eight new countries and refined which technologies contribute to our salary predictions. Our salary calculator is based on the comprehensive data from the Stack Overflow Developer Survey, and the unprecedented number of responses we had this year has allowed us to build a more accurate model that applies to more developers across the world. The inputs to our salary calculator, that we find most predictive of a developer's salary, are your
- years of professional coding experience,
- what kind of developer you are, and
- the technologies you use professionally.
One of the biggest factors in how much developers are paid is where they live and work. Let's look at salaries for the same five countries that we supported in last year's version of the salary calculator.
Have salaries changed from last year? According to our survey, developers are earning more overall, in all countries, with median salaries that are on average 25% higher than last year in locations such as London and San Francisco. Some of this increase is because we changed how we handled trimming the highest salaries from our dataset; we decided we were overzealous in trimming high salaries last year. While we are not saying that developers all over the world saw raises that big this past year, we do see evidence that developer salaries are increasing in all locations compared to last year. In addition to these five countries, the comprehensive responses to this year's survey have allowed us to build models that cover eight additional new countries:
Even within any given country, developer salaries can vary from city to city. In the UK, for example, our survey results indicate that developers in London earn over 20% more than developers in the rest of the UK. That being said, our dataset is not able to distinguish between cities that have around the average salary for any given country, to give individual predictions for all cities. To illustrate this, let's look at the United States.
This plot shows the distribution of salaries in USD for the top 10 metro areas in the US by number of respondents. (Notice that the y-axis is on a log scale.) The cities are ordered from the lowest median salary (Minneapolis) to the highest median salary (the San Francisco area). Take a look at this graph and see how close together the median salaries for cities like Chicago, Dallas, Denver, Portland, Boston, and even Austin are. In our modeling, the data we have only supports a statistically different salary for the cities shown in orange. San Francisco, Seattle, and New York have developer salaries that are high enough compared to typical US norms and enough developers working there that we can confidently predict a different salary for a developer living in one of these cities than the US in general. For developers living in cities like Chicago or Boston, salaries are just about the same as what is typical for the US overall, so we can't build a confident, separate prediction for each of these cities. You might look at this plot and wonder about cities with salaries that appear slightly lower like Minneapolis, but there we had fewer respondents, so again we can't build a confident, separate prediction. In the US, we have individual city-level predictions for San Francisco, Seattle, and New York, and then a country-level prediction that covers the rest of the US. This same pattern holds true in other countries including France, Germany, and Canada, for the same reasons. On our survey this year, we asked respondents what city they lived in via a free text field. We used standard text mining and data cleaning approaches to deal with this data, and included suburbs within larger metro areas. For example, the San Francisco Bay Area here includes respondents who said they live in San Jose, Mountain View, Sunnyvale, Oakland, etc., while Potsdam respondents are included in Berlin, and so forth. Last year, we asked users to help us improve our salary calculator by confidentially sharing salary information with us in the calculator itself. This salary survey was 100% private and never appeared on any profile on our site or was shared with employers. We tried using this dataset to refine the salary calculator and build a better salary model, but it turned out that data collected in this way was less useful than our annual Developer Survey. The two main reasons were the geographical coverage we had and the number of responses. We want to send our thanks to every user who shared their data with us through the salary calculator; we appreciate your interest and trust. Since we won't be using that data, we will stop collecting salary data through our salary calculator and we will delete the data we already have, according to our data policies.
Which types of developers make more money?
Another important factor that affects how much a developer is paid is what kind of work they do.
Building a model
We again this year used multiple linear regression to predict salary from the model inputs, with regularization to help with variable selection, (i.e. which of the many technologies and developer roles we asked about on the survey are important predictors for salary). The salaries are modeled on a log scale, because the salary distributions are log-normal (as such distributions often are) with a long tail of very high salaries. In this salary calculator, we report a predicted salary for the location, education, experience, and other information you enter. We also report a 50% prediction interval. The specific statistical meaning of this interval is that we expect 50% of people with the same characteristics as you to have salaries within that range; it spans the 25th to 75th percentiles. The interval is just as important as the prediction itself (the 50th percentile), because it gives you an understanding of what the range of expected salaries could be. This year, we built two models, one for countries with higher incomes and one for countries with lower incomes. We were able to achieve better salary predictions for developers in all countries with this approach, in terms of how well the models fit the data, compared to either building one model for all countries, building separate models for each country, or other approaches. One way we can evaluate how well a model fits data is to look at residuals, the differences between the predicted salaries and the known salaries for the dataset we used for modeling. Let’s look at the residuals for the countries and individual cities supported in the 2018 update to our salary calculator.
The residuals look pretty good overall, although there are a couple of things to notice and keep in mind. First of all, notice that the residuals are much higher for countries with lower incomes like India than countries with higher incomes like Sweden. We cannot predict incomes as accurately in countries with lower incomes. Second, notice the shape of the residuals for some countries such as the United States; there is less variation in the residuals at high salary than at low salary. Another way to say this is that the variance of the residuals isn’t constant, and this is called heteroscedasticity. It means that our dataset doesn’t quite meet the underlying assumptions of our model. In real life, developer salaries depend on both the characteristics we have taken into account in our model and other complex factors, some of which involve mild violations of the assumptions of our modeling. These are some of the limitations of our results, but the salaries and prediction intervals that we are reporting in our calculator this year offer reliable insight for developer salaries around the world. This plot shows residuals and fitted salaries on a log scale, but salaries in the calculator itself are reported in natural units and the appropriate local currency for each user.
Try it out
Check out the Stack Overflow Salary Calculator and learn more about what developers are earning! As a developer, you can explore the range of potential salaries for your own background and technical skills, and find specific recommended jobs relevant for you. As an employer, you can learn more about the competitive marketplace for developers’ skills. Questions? Comments? Head over to Meta now and use the salary-calculator tag.