Sick Leave Pay Calculator

Employee Pay & Leave Details

(Needed for salary to hourly conversion and calculating pay from leave days.)

Sick Leave Policy & Balance

(Enter 100 for full pay, 50 for half pay, etc.)

(For tracking only. Tool does not enforce limits.)

(For display in results only.)

Calculation Results

Enter details in the tabs above and click Calculate.

Please enter valid numbers for Pay, Hours Per Day, Leave Duration, and Sick Pay Rate.

'; downloadPdfBtn.style.display = 'none'; resultsAreaDiv.dataset.inputs = ''; resultsAreaDiv.dataset.calculations = ''; return; } // Check for valid pay input based on type if ((payType === 'hourly' && hourlyRate <= 0) || (payType === 'salary' && annualSalary <= 0)) { resultsSummaryDiv.innerHTML = '

Calculation Results

Please enter a valid Hourly Rate or Annual Salary.

'; downloadPdfBtn.style.display = 'none'; resultsAreaDiv.dataset.inputs = ''; resultsAreaDiv.dataset.calculations = ''; return; } // --- Calculations --- // 1. Determine Effective Regular Hourly Rate let effectiveRegularHourlyRate = 0; if (payType === 'hourly') { effectiveRegularHourlyRate = hourlyRate; } else { // salary const standardWorkingDaysPerYear = 260; // 5 days/week * 52 weeks if (standardHoursPerDay > 0 && standardWorkingDaysPerYear > 0) { effectiveRegularHourlyRate = annualSalary / (standardHoursPerDay * standardWorkingDaysPerYear); } } // 2. Determine Total Sick Leave Hours Taken let totalSickLeaveHours = 0; if (leaveDurationType === 'hours') { totalSickLeaveHours = leaveDurationValue; } else { // days if (standardHoursPerDay > 0) { totalSickLeaveHours = leaveDurationValue * standardHoursPerDay; } } // 3. Calculate Sick Leave Hourly Pay Rate const sickPayRateMultiplier = sickPayRatePercent / 100; const sickLeaveHourlyPayRate = effectiveRegularHourlyRate * sickPayRateMultiplier; // 4. Calculate Total Sick Leave Pay const totalSickLeavePay = sickLeaveHourlyPayRate * totalSickLeaveHours; // 5. Calculate Remaining Sick Leave Balance (Optional) let remainingSickLeaveBalanceHours = null; // Use null if initial balance wasn't entered if (!isNaN(sickLeaveBalanceAvailableHoursInput)) { remainingSickLeaveBalanceHours = sickLeaveBalanceAvailableHoursInput - totalSickLeaveHours; } // --- Display Results --- let resultsHTML = '

Calculation Results

'; // Display Inputs Used resultsHTML += '

Inputs Used:

'; resultsHTML += `
Employee Pay Type: ${payType.charAt(0).toUpperCase() + payType.slice(1)}
`; if (payType === 'hourly') { resultsHTML += `
Regular Hourly Rate: ${formatCurrency(hourlyRate)}/hour
`; } else { resultsHTML += `
Regular Annual Salary: ${formatCurrency(annualSalary)}
`; } resultsHTML += `
Standard Work Hours Per Day: ${standardHoursPerDay.toFixed(2)} hours
`; resultsHTML += `
Sick Leave Duration Value: ${leaveDurationValue.toFixed(2)} ${leaveDurationType}
`; resultsHTML += `
Pay Rate For Sick Leave: ${sickPayRatePercent.toFixed(2)}%
`; if (!isNaN(sickLeaveBalanceAvailableHoursInput)) { resultsHTML += `
Sick Leave Balance Available (Before Leave): ${sickLeaveBalanceAvailableHoursInput.toFixed(2)} hours
`; } if (accrualRateInfo) { resultsHTML += `
Accrual Rate Info: ${accrualRateInfo}
`; } // Display Calculated Items resultsHTML += '

Calculated Items:

'; resultsHTML += `
Effective Regular Hourly Rate: ${formatCurrency(effectiveRegularHourlyRate)}/hour
`; resultsHTML += `
Total Sick Leave Hours Taken: ${totalSickLeaveHours.toFixed(2)} hours
`; resultsHTML += `
Sick Leave Hourly Pay Rate: ${formatCurrency(sickLeaveHourlyPayRate)}/hour
`; // Display Total Sick Leave Pay resultsHTML += `
Total Sick Leave Pay: ${formatCurrency(totalSickLeavePay)}
`; // Display Remaining Balance (Optional) if (remainingSickLeaveBalanceHours !== null) { resultsHTML += `

Remaining Sick Leave Balance: ${remainingSickLeaveBalanceHours.toFixed(2)} hours

`; } resultsSummaryDiv.innerHTML = resultsHTML + '
'; downloadPdfBtn.style.display = 'block'; // Show PDF button // Store data for PDF generation resultsAreaDiv.dataset.inputs = JSON.stringify({ payType: payType, hourlyRate: hourlyRate, annualSalary: annualSalary, standardHoursPerDay: standardHoursPerDay, leaveDurationType: leaveDurationType, leaveDurationValue: leaveDurationValue, sickPayRatePercent: sickPayRatePercent, sickLeaveBalanceAvailableHours: sickLeaveBalanceAvailableHoursInput, // Store raw input or NaN accrualRateInfo: accrualRateInfo }); resultsAreaDiv.dataset.calculations = JSON.stringify({ effectiveRegularHourlyRate: effectiveRegularHourlyRate, totalSickLeaveHours: totalSickLeaveHours, sickLeaveHourlyPayRate: sickLeaveHourlyPayRate, totalSickLeavePay: totalSickLeavePay, remainingSickLeaveBalanceHours: remainingSickLeaveBalanceHours // Store raw value or null }); } // Event listener for calculate button calculateBtn.addEventListener('click', calculateAndDisplay); // Trigger calculation when switching TO the results tab document.getElementById('results').addEventListener('transitionend', function() { if (this.classList.contains('active')) { calculateAndDisplay(); } }); // Initial state setup for pay type if (payTypeHourlyRadio.checked) { hourlyPayInputDiv.style.display = 'block'; salaryPayInputDiv.style.display = 'none'; } else { hourlyPayInputDiv.style.display = 'none'; salaryPayInputDiv.style.display = 'block'; } // Initial state setup for leave duration type if (leaveDurationHoursRadio.checked) { leaveDurationValueLabel.textContent = 'Sick Leave Duration Value (Hours):'; } else { leaveDurationValueLabel.textContent = 'Sick Leave Duration Value (Days):'; } // --- PDF Generation --- downloadPdfBtn.addEventListener('click', function() { const { jsPDF } = window.jspdf; const doc = new jsPDF(); const inputs = JSON.parse(resultsAreaDiv.dataset.inputs || '{}'); const calculations = JSON.parse(resultsAreaDiv.dataset.calculations || '{}'); if (!inputs || !calculations || calculations.totalSickLeavePay === undefined) { alert("No results to download. Please calculate first."); return; } // --- PDF Styling (Matching CSS color scheme) --- const primaryColor = getComputedStyle(document.documentElement).getPropertyValue('--primary-color').trim(); const textColor = getComputedStyle(document.documentElement).getPropertyValue('--text-color').trim(); const outputBackgroundColor = getComputedStyle(document.documentElement).getPropertyValue('--output-background').trim(); const white = '#ffffff'; const green = '#27ae60'; // Match green for total pay doc.setFontSize(18); doc.setTextColor(primaryColor); doc.text("Sick Leave Pay Calculation", 14, 22); doc.setFontSize(12); doc.setTextColor(textColor); let yPos = 35; // Inputs Section in PDF doc.text("Inputs Provided:", 14, yPos); yPos += 7; doc.setFontSize(10); const inputsTableBody = [ ['Employee Pay Type', inputs.payType.charAt(0).toUpperCase() + inputs.payType.slice(1)], ]; if (inputs.payType === 'hourly') { inputsTableBody.push(['Regular Hourly Rate', formatCurrency(inputs.hourlyRate) + '/hour']); } else { inputsTableBody.push(['Regular Annual Salary', formatCurrency(inputs.annualSalary)]); } inputsTableBody.push(['Standard Work Hours Per Day', inputs.standardHoursPerDay.toFixed(2) + ' hours']); inputsTableBody.push(['Sick Leave Duration', `${inputs.leaveDurationValue.toFixed(2)} ${inputs.leaveDurationType}`]); inputsTableBody.push(['', '']); // Separator inputsTableBody.push(['Pay Rate For Sick Leave', inputs.sickPayRatePercent.toFixed(2) + '%']); // Only add optional inputs if they were entered if (!isNaN(inputs.sickLeaveBalanceAvailableHours)) { inputsTableBody.push(['Sick Leave Balance Available (Before)', `${inputs.sickLeaveBalanceAvailableHours.toFixed(2)} hours`]); } if (inputs.accrualRateInfo) { inputsTableBody.push(['Accrual Rate Info', inputs.accrualRateInfo]); } doc.autoTable({ startY: yPos + 5, head: [['Description', 'Value']], body: inputsTableBody, theme: 'grid', styles: { textColor: textColor.substring(1), lineColor: '#cccccc', lineWidth: 0.1, cellPadding: 3 }, headStyles: { fillColor: primaryColor.substring(1), textColor: white.substring(1), fontStyle: 'bold' }, bodyStyles: { fillColor: outputBackgroundColor.substring(1), textColor: textColor.substring(1) }, alternateRowStyles: { fillColor: white.substring(1) }, margin: { top: yPos + 5 } }); const inputsTableFinalY = doc.autoTable.previous.finalY || yPos + 5; // Calculated Items Section in PDF yPos = inputsTableFinalY + 15; // Space after inputs table doc.setFontSize(12); doc.setTextColor(primaryColor); doc.text("Calculated Items:", 14, yPos); const calculationsTableBody = [ ['Effective Regular Hourly Rate', formatCurrency(calculations.effectiveRegularHourlyRate) + '/hour'], ['Total Sick Leave Hours Taken', calculations.totalSickLeaveHours.toFixed(2) + ' hours'], ['Sick Leave Hourly Pay Rate', formatCurrency(calculations.sickLeaveHourlyPayRate) + '/hour'], ]; doc.autoTable({ startY: yPos + 5, head: [['Calculation', 'Value']], body: calculationsTableBody, theme: 'grid', styles: { textColor: textColor.substring(1), lineColor: '#cccccc', lineWidth: 0.1, cellPadding: 3 }, headStyles: { fillColor: primaryColor.substring(1), textColor: white.substring(1), fontStyle: 'bold' }, bodyStyles: { fillColor: outputBackgroundColor.substring(1), textColor: textColor.substring(1) }, alternateRowStyles: { fillColor: white.substring(1) }, margin: { top: yPos + 5 } }); const calculationsTableFinalY = doc.autoTable.previous.finalY || yPos + 5; // Total Pay and Balance in PDF yPos = calculationsTableFinalY + 15; // Space after calculations table doc.setFontSize(14); doc.setTextColor(green); // Total pay in green doc.text(`Total Sick Leave Pay: ${formatCurrency(calculations.totalSickLeavePay)}`, 14, yPos); if (calculations.remainingSickLeaveBalanceHours !== null) { yPos += 10; // Space before balance doc.setFontSize(10); doc.setTextColor('#555'); doc.text(`Remaining Sick Leave Balance: ${calculations.remainingSickLeaveBalanceHours.toFixed(2)} hours`, 14, yPos); } doc.save('sick_leave_pay_calculation.pdf'); }); });

The Sick Leave Pay Calculator is a useful tool for employers and HR professionals to accurately calculate the amount of sick pay employees are entitled to receive. Sick leave policies vary across companies and regions, making precise calculations essential for compliance and fairness.

This calculator allows you to input details such as employee hourly wage or salary, sick leave hours taken, and company-specific sick leave policies to estimate the total sick pay due. It supports various accrual and payout methods, helping you tailor calculations to your organization’s rules.

Using the Sick Leave Pay Calculator helps streamline payroll processes, avoid disputes, and maintain transparent records of employee sick leave compensation. It ensures employees receive proper payment for their time off due to illness while helping employers manage payroll expenses effectively.

Whether you run a small business or oversee HR for a large company, this tool simplifies sick pay calculations and supports compliance with local labor laws and regulations.

Start using the Sick Leave Pay Calculator today to ensure accurate sick pay management and promote a fair workplace environment.

Scroll to Top