Salary increase calculator
Recently I got a 11% salary increase in Germany which actually shall cover the inflation of 10% in Germany plus some extra increase. The 11% increase is actually based on the gross salary. Due to the progressive taxation, actually the higher my salary is the more tax I will pay.
In this study, I'll look at how much my gross salary should be increased such that my net salary covers the inflation rate.
Data scrapping
Salary calculator URL structure
To figure it out how much taxes and social contributions are deducted from the gross salary, I am going to scrap the data from this salary calculator for Germany. I choose this salary calculator because of the URL structure: https://lohntastik.de/gns/gross-net-salary-calculator/<Income_Period>/<Gross_salary>/<Tax_Class>/<Federal_State>
If you wan to know what the net salary would be for a monthly gross income of €3000 for a non-married person living in Baden-Württemberg, you just need to scrap the result of the following URL: https://lohntastik.de/gns/gross-net-salary-calculator/2/3000.0/1/0
Scrapping the data
I am going to use BeautifulSoup to extract the data from the webpage. First I just write a function which input is the gross salary and returns the net salary.
Next I write a for cycle to download the data from a gross salary of €1500 to €8000 with a resolution of €100.
Create a dataframe from the data and print it.
Making a 3rd order polynomial fit so it can be queried the gross salary based on the net
Getting the gross
Now that I have the data, I can get what the gross salary shall by to get x% of net salary increases:
5400 / 8000
11 / 30
Calculate the increase net salary:
Conclusion
So it looks like that my net salary actually increases more in relative term than 11%. So I am quiet satisfied with the salary increase I received.