function calculateProRataBonus() {
var fullBonus = parseFloat(document.getElementById('fullBonus').value);
var startDateInput = document.getElementById('startDate').value;
var endDateInput = document.getElementById('endDate').value;
var fiscalDays = parseFloat(document.getElementById('fiscalDays').value);
var resultContainer = document.getElementById('prbResult');
var resultValue = document.getElementById('prbResultValue');
var resultDays = document.getElementById('prbDaysWorked');
var resultPercentage = document.getElementById('prbPercentage');
// Validation
if (isNaN(fullBonus) || !startDateInput || !endDateInput || isNaN(fiscalDays) || fiscalDays end) {
alert("Start date cannot be after end date.");
return;
}
// Calculate difference in time
var timeDiff = end.getTime() – start.getTime();
// Calculate difference in days (add 1 to include both start and end dates)
var daysWorked = Math.ceil(timeDiff / (1000 * 3600 * 24)) + 1;
if (daysWorked < 0) daysWorked = 0;
// Calculate percentage
var percentage = (daysWorked / fiscalDays);
// Calculate bonus
var proRataBonus = fullBonus * percentage;
// Formatting
var formatter = new Intl.NumberFormat('en-US', {
style: 'currency',
currency: 'USD',
});
resultValue.innerHTML = formatter.format(proRataBonus);
resultDays.innerHTML = "Based on " + daysWorked + " days worked out of " + fiscalDays + ".";
resultPercentage.innerHTML = "Payout Ratio: " + (percentage * 100).toFixed(2) + "%";
resultContainer.style.display = "block";
}
How to Calculate Pro Rata Bonus
Calculating a pro rata bonus is an essential task for HR professionals, payroll managers, and employees who have joined or left a company in the middle of a fiscal year. A "pro rata" (or pro-rated) bonus simply means calculating the portion of a full annual bonus that an employee is entitled to, based on the specific amount of time they were employed during the bonus period.
Unlike a flat bonus, which is paid regardless of tenure, a pro rata bonus ensures fairness by aligning compensation with the actual duration of service. This calculator helps you determine the exact amount due based on employment start and end dates.
The Pro Rata Bonus Formula
The calculation relies on determining the "payout ratio"—the percentage of the year the employee actually worked. The standard formula used by most organizations is as follows:
Pro Rata Bonus = (Total Days Employed / Total Days in Period) × Full Annual Bonus Amount
Here is the step-by-step breakdown:
Determine the Full Bonus: Identify the target bonus amount the employee would receive if they worked the full year.
Calculate Days Employed: Count the exact number of days between the start date and the end date (inclusive).
Identify Total Days in Period: Use 365 for a standard year or 366 for a leap year. Some companies may use a standard 260-day working year, excluding weekends.
Divide and Multiply: Divide days employed by total days to get the ratio, then multiply by the full bonus.
Calculation Example
Let's assume an employee, John, is hired on July 1st. The company fiscal year runs from January 1st to December 31st (365 days). His employment contract states he is eligible for a $10,000 annual bonus.
Full Bonus: $10,000
Days Employed: July 1 to Dec 31 = 184 days.
Total Days: 365
Ratio: 184 / 365 = 0.5041 (approx 50.41%)
Calculation: $10,000 × 0.5041 = $5,041.10
Factors Affecting the Calculation
While the math is straightforward, specific company policies can alter the inputs:
Active Employment Condition: Many bonuses require the employee to be "actively employed" on the payout date. If an employee resigns before this date, the pro rata amount might be forfeited entirely.
Unpaid Leave: If an employee took unpaid leave (e.g., sabbatical), those days are often subtracted from the "Days Employed" figure before calculating the ratio.
Performance Multipliers: The pro rata calculation usually yields a "base" amount, which may then be multiplied by a personal or company performance factor (e.g., 90% or 110%).
Frequently Asked Questions
Should I use working days or calendar days?
Most standard bonus calculations use calendar days (365/year) because the bonus covers the entire period of employment, including weekends and holidays. However, some payroll systems calculate based on "billable days" or working days (typically 260/year). Always check your employment contract for the specific definition.
What about leap years?
If the bonus period falls during a leap year, the denominator in your fraction should usually be 366. This results in a very slightly lower daily rate compared to a standard year.
Does a pro rata bonus apply if I resign?
It depends heavily on your contract. Often, voluntary resignation forfeits the bonus. However, in cases of redundancy or mutual separation agreements, a pro rata bonus is frequently negotiated as part of the severance package.