.prh-calculator-container {
max-width: 800px;
margin: 0 auto;
font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
background: #f9f9f9;
padding: 30px;
border-radius: 12px;
box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}
.prh-header {
text-align: center;
margin-bottom: 30px;
}
.prh-header h2 {
color: #2c3e50;
margin-bottom: 10px;
font-size: 28px;
}
.prh-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: 20px;
}
@media (max-width: 600px) {
.prh-grid {
grid-template-columns: 1fr;
}
}
.prh-input-group {
margin-bottom: 15px;
}
.prh-input-group label {
display: block;
margin-bottom: 8px;
font-weight: 600;
color: #4a5568;
font-size: 14px;
}
.prh-input-group input, .prh-input-group select {
width: 100%;
padding: 12px;
border: 1px solid #cbd5e0;
border-radius: 8px;
font-size: 16px;
box-sizing: border-box;
transition: border-color 0.2s;
}
.prh-input-group input:focus {
border-color: #3182ce;
outline: none;
}
.prh-btn {
grid-column: 1 / -1;
background: #3182ce;
color: white;
border: none;
padding: 15px;
border-radius: 8px;
font-size: 18px;
font-weight: bold;
cursor: pointer;
width: 100%;
margin-top: 10px;
transition: background 0.2s;
}
.prh-btn:hover {
background: #2c5282;
}
.prh-result {
grid-column: 1 / -1;
background: #ffffff;
border: 1px solid #e2e8f0;
border-radius: 8px;
padding: 25px;
margin-top: 25px;
display: none;
}
.prh-result h3 {
margin-top: 0;
color: #2d3748;
border-bottom: 2px solid #edf2f7;
padding-bottom: 10px;
}
.prh-result-row {
display: flex;
justify-content: space-between;
margin-bottom: 15px;
font-size: 16px;
}
.prh-result-row.total {
font-weight: bold;
color: #2b6cb0;
font-size: 20px;
border-top: 1px solid #edf2f7;
padding-top: 15px;
}
.prh-content {
max-width: 800px;
margin: 40px auto;
line-height: 1.6;
color: #333;
}
.prh-content h2 {
color: #2c3e50;
font-size: 24px;
margin-top: 30px;
}
.prh-content p {
margin-bottom: 15px;
}
.prh-content ul {
margin-bottom: 20px;
padding-left: 20px;
}
.prh-content li {
margin-bottom: 8px;
}
.highlight-box {
background-color: #ebf8ff;
border-left: 4px solid #3182ce;
padding: 15px;
margin: 20px 0;
}
function calculateHolidayPay() {
// Get Input Values
var ftDays = parseFloat(document.getElementById('fullTimeDays').value);
var ftEntitlement = parseFloat(document.getElementById('fullEntitlement').value);
var ptDays = parseFloat(document.getElementById('partTimeDays').value);
var monthsWorked = parseFloat(document.getElementById('monthsWorked').value);
var dailyRate = parseFloat(document.getElementById('dailyRate').value);
// Validation
if (isNaN(ftDays) || isNaN(ftEntitlement) || isNaN(ptDays) || isNaN(monthsWorked)) {
alert("Please enter valid numbers for days and entitlement.");
return;
}
if (ftDays <= 0 || monthsWorked 12) {
alert("Please check your input values. Months must be 1-12 and days must be positive.");
return;
}
// Logic 1: Calculate the Ratio of Part-time to Full-time
var ratio = ptDays / ftDays;
// Logic 2: Calculate the Prorated Annual Entitlement based on ratio
var annualProRata = ftEntitlement * ratio;
// Logic 3: Adjust for Partial Year (if they didn't work 12 months)
var yearFactor = monthsWorked / 12;
var finalEntitlement = annualProRata * yearFactor;
// Formatting Results
var roundedEntitlement = Math.round(finalEntitlement * 10) / 10; // Round to 1 decimal
// Display Logic
document.getElementById('ratioResult').innerHTML = (ratio * 100).toFixed(1) + "% of Full Time";
document.getElementById('yearPortionResult').innerHTML = monthsWorked + " of 12 Months";
document.getElementById('daysResult').innerHTML = roundedEntitlement + " Days";
// Optional Monetary Value
var valueOutput = document.getElementById('valueResult');
var valueRow = document.getElementById('monetaryRow');
if (!isNaN(dailyRate) && dailyRate > 0) {
var totalValue = roundedEntitlement * dailyRate;
valueOutput.innerHTML = totalValue.toFixed(2);
valueRow.style.display = "flex";
} else {
valueRow.style.display = "none";
}
// Show Result Container
document.getElementById('resultOutput').style.display = "block";
}
How to Calculate Pro Rata Holiday Pay
Understanding holiday entitlement for part-time employees or those starting midway through a leave year can be confusing. "Pro rata" simply means "in proportion." This guide explains exactly how to calculate holiday entitlement to ensure fairness and compliance with labor laws.
The Pro Rata Formula
The calculation for pro rata holiday entitlement generally follows three simple steps based on the full-time equivalent (FTE) and the proportion of the week worked.
Basic Formula:
(Days Worked Per Week ÷ Full-Time Days) × Full Annual Entitlement = Your Entitlement
Step-by-Step Calculation Guide
1. Determine Full-Time Entitlement
First, identify the statutory or contractual holiday allowance for a full-time employee. In many regions (like the UK), the statutory minimum is 5.6 weeks, which equates to 28 days for someone working a 5-day week.
2. Calculate the Part-Time Ratio
Divide the number of days the employee works by the number of days in a standard full-time week.
Example: Sarah works 3 days a week. Full time is 5 days. Ratio = 3 ÷ 5 = 0.6.
3. Apply the Ratio
Multiply the full-time entitlement by this ratio.
Example: 28 days × 0.6 = 16.8 days of holiday per year.
Adjusting for Partial Leave Years
If an employee starts or leaves the job partway through the holiday year, you must further prorate the entitlement based on time employed. This is often done by calculating the monthly accrual.
- Formula: (Annual Entitlement ÷ 12) × Months Employed
- Example: If Sarah (entitled to 16.8 days annually) only works for 6 months, she gets: (16.8 ÷ 12) × 6 = 8.4 days.
Common Questions
Do bank holidays count?
Typically, yes. Statutory leave entitlement usually includes public holidays. If a part-time worker does not work on Mondays (when most bank holidays fall), they are still entitled to a pro-rated allowance to ensure they don't lose out compared to full-time colleagues.
Can I round down holiday days?
No. You cannot round down statutory holiday entitlement. It is best practice to round up to the nearest half or whole day to avoid underpayment disputes.