Calculate Retirement Benefits by Years of Service in Excel
Question details
Calculate a retirement percentage or benefit using service-year ranges and a maximum value for employees with more than 25 years of service.

- Product
- Microsoft Excel
- Device & OS
- not provided
- Scenario
- A worksheet needs to assign a retirement rate or benefit based on each employee's years of service.
- Observed behavior
- Employees should receive the value for their service-year range, with the specified maximum applied where appropriate.
Confirm the actual rates or benefit values for each service-year range and whether the maximum is 10 or 10%. Enter years of service as nonnegative numbers in a worksheet column.
Use a nested IF formula for service-year ranges
Assign a value to each service-year range, including a maximum for more than 25 years.
The example rates below are placeholders, not an actual retirement policy. The formula assigns 5% for up to 15 years, 8% for more than 15 through 25 years, and 10% for more than 25 years.
Enter an employee's years of service as a number in cell A2.
Select cell B2 and enter =IF(A2<=15,5%,IF(A2<=25,8%,10%)). Replace the example rates with the values in your retirement policy.
Select B2, choose Home > Percentage, and drag the fill handle down to apply the formula to other employees.
Test A2 with 15, 25, and 26. With the example rates, B2 should show 5%, 8%, and 10%, respectively.

Cap a calculated retirement value with MIN
Use this method when a retirement rate or benefit is already calculated and must not exceed a maximum.
Calculate retirement rates in WPS Spreadsheet
Use a nested IF formula in WPS Spreadsheet to assign retirement rates by years of service, then format and copy the results for other employees.
- 1. Open the worksheet: Open WPS Spreadsheet and use Open to select your workbook, or create a new spreadsheet.
- 2. Enter service years: Enter each employee's years of service as a number in column A, starting in A2.
- 3. Add the formula: Select B2 and enter =IF(A2<=15,5%,IF(A2<=25,8%,10%)). Replace the example rates with your policy's actual rates.
- 4. Format and fill: Select B2, use the Percentage format on the Home tab, and drag the fill handle down to calculate the remaining rows.

Frequently Asked Questions
What rate does an employee with exactly 25 years receive?
In the example formula, 25 falls in the second range because the condition is A2<=25, so the result is 8%. Change the thresholds or rates to match your policy.
How do I cap a benefit at 10 instead of 10%?
If the calculated benefit is in B2, enter =MIN(B2,10) in another cell. Use =MIN(B2,10%) only when the maximum is a percentage rate.
Can I use IFS instead of nested IF?
Yes. In a version of Excel that supports IFS, enter =IFS(A2<=15,5%,A2<=25,8%,A2>25,10%) and replace the example rates with your actual values.
Does the percentage formula calculate the final benefit amount?
No. It assigns a rate. If your policy specifies that the rate applies to an amount in C2, you can enter =B2*C2 in another cell, provided B2 contains the assigned rate.




