Create an Excel Formula to Deduct $30 for Each Hour Below 160
Question details
The user needs an Excel formula to dynamically calculate a monthly bonus by subtracting a $30 penalty for every hour an employee falls short of a 160-hour monthly target.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Calculating monthly payroll bonuses and applying specific deductions based on unfulfilled target work hours.
- Observed behavior
- Needs an accurate and scalable formula to evaluate hours worked, apply the threshold rule, and output the correct final bonus amount.
Ensure your spreadsheet has dedicated columns with numerical values for the employee's base bonus and their actual hours worked, containing no text characters like 'hrs'.
Use the MAX Function to Calculate the Deduction
The most efficient way to deduct a specific amount for hours below a threshold without affecting employees who worked over the threshold.
By utilizing the MAX function, you can ensure that the calculation only applies a penalty if the hours worked are less than 160. If the employee works over 160 hours, the deduction multiplier becomes zero.
Click on the cell where you want the final bonus amount to be displayed (e.g., cell C2).
Assuming cell A2 contains the Base Bonus and cell B2 contains the Hours Worked, type the following formula: =A2-(MAX(0,160-B2)*30)
Press Enter to calculate the final bonus. Drag the fill handle (the small square at the bottom-right of the cell) down to apply the formula to the rest of the column.

Use the IF Function for Clearer Logic
An alternative approach using the IF function which explicitly separates the logic for those who met the threshold and those who did not.
Calculate Complex Bonuses Easily with WPS Office
WPS Office provides a highly compatible Spreadsheet application that supports all major Excel formulas, including IF and MAX, allowing you to seamlessly calculate payroll, deductions, and bonuses.
- 1. Open your data: Launch WPS Spreadsheets and open your payroll or bonus tracking file.
- 2. Input the deduction formula: Select the empty bonus cell and input your preferred formula, such as =A2-(MAX(0,160-B2)*30).
- 3. Use Smart Fill: Hover over the bottom-right corner of the cell and double-click to instantly calculate the deductions for your entire roster.

Frequently Asked Questions
What if the deduction makes the total bonus negative?
If you want to ensure the final bonus never drops below zero, wrap the entire formula in an outer MAX function. For example: =MAX(0, A2-(MAX(0,160-B2)*30)).
How can I adjust this formula if the threshold hours or penalty amount changes frequently?
Instead of typing 160 and 30 directly into the formula (hardcoding), type those numbers into separate reference cells (e.g., F1 for the 160 threshold, F2 for the $30 penalty). Update your formula to use absolute references like this: =A2-(MAX(0,$F$1-B2)*$F$2).
Why am I getting a #VALUE! error when entering this formula?
A #VALUE! error usually happens if the cell containing the hours worked or base bonus includes text strings instead of raw numbers (e.g., typing '150 hrs' instead of just '150'). Ensure your data cells are strictly numerical.




