# Create formulas for salary increases

This article includes suggestions and workarounds. Content may not be accurate for all use cases or represent best practices for the latest release.

Provides formula examples for pro-rated salary increases, individual merit increases and salary increases based on length of service.

## Question

If I want to give an employee a pro-rated raise in the first year, what would that formula look like? Also, How do I give an employee a merit increase that is separate from the normal annual increase? Is there a formula that would return an employee’s length of service, so I can use that value in connection with my increase calculations?

### Pro-Rated Increase First Year

if(versionmonth(this)-versionmonth(ROW.HireDate)>0 and versionmonth(this)-versionmonth(ROW.HireDate)<12,((versionmonth(this)-versionmonth(ROW.HireDate))/12)*ASSUM.Raise_Pct,0)

This formula translates to: If the version month is after the hire date and it is in the first year of employment, give a pro-rated increase, less zero. This calculated account can be used in connection with (multiplied by) the pay rate or salary account.

### Pay Rate Increase on Fixed Date for Merit

if(versionmonth(this) > 0 and ROW.Headcount>0 and (versionmonth(this) - versionmonth(ROW.StartDate) > 1) and versionmonth(this)>=versionmonth(ROW.RaiseDate) and fiscalmonth(this) = fiscalmonth(ROW.RaiseDate),ROW.PayRate[time=this-1]*ROW.RaisePCT, 0)

This formula translates to: If the version has started and the employee is hired and the employee has been hired for at least on month and the raise date has been reached, take the rate from last month and multiply by the raise percent, less zero.

You could also use the following formula for a one time amount:

if(versionmonth(this) > 0 and ROW.Headcount>0 and (versionmonth(this) - versionmonth(ROW.StartDate) > 1) and versionmonth(this)=versionmonth(ROW.RaiseDate),ROW.PayRate[time=this-1]+ROW.RaiseAMT, 0)