Calculate a prorated salary by working days when someone joins or leaves
When someone joins or leaves mid-month, count the working days by state and prorate the salary.
To prorate a salary by working days, divide the working days in the partial month by those in the full month. Example: someone starts in Hesse on January 15, 2027. Up to January 31, 2027, that makes 11 working days. The method is not set by law. The employment contract or collective agreement has to provide for it.
Pass the start or leaving date and the state of the place of work.
Fetch the working days in the partial month and in the full month with hr_arbeitstage.
Prorate the salary in proportion to the working days, if the contract or collective agreement provides for this method.
Three methods, and the contract decides
There are three common ways to calculate a partial month: by calendar days, by 30 days per month or by working days. The employment contract or collective agreement (Tarifvertrag) decides which one applies, not the law. The working days method is precise, but it needs the public holidays at the place of work.
That is exactly what the working days calculator counts: Monday to Friday, minus the state's public holidays, and regional ones too if you want.
How to calculate
- Query the working days from the start date to the end of the month, or for a leaver from the first of the month to the last working day.
- Query the working days of the full month.
- Monthly salary times working days in the partial month, divided by working days in the month.
The calculator only counts Saturdays if you pass samstag=true, for example for a six-day week.
What the call looks like
Example with the dataset Working days calculator. The response comes from the same code as the API.
Frequently asked questions
Which method does the law require?
None. The employment contract or collective agreement decides which method applies. The working days method is one of three common ones.
Do public holidays count as working days?
No. The calculator subtracts the state's public holidays that fall on Monday to Friday.