Weighted Overtime Rate Calculation

.weighted-ot-calculator-container { font-family: inherit; max-width: 800px; margin: 20px auto; padding: 20px; border: 1px solid #eee; border-radius: 8px; background-color: #f9f9f9; } .ot-calc-form-group { margin-bottom: 15px; } .ot-calc-form-group label { display: block; margin-bottom: 5px; font-weight: 600; color: #333; } .ot-calc-form-control { width: 100%; padding: 10px; border: 1px solid #ccc; border-radius: 4px; box-sizing: border-box; /* Important for padding */ } .ot-calc-btn { display: block; width: 100%; padding: 12px; background-color: #0073aa; color: white; border: none; border-radius: 4px; font-size: 18px; font-weight: bold; cursor: pointer; transition: background-color 0.3s ease; } .ot-calc-btn:hover { background-color: #005177; } #ot-calc-result { margin-top: 25px; padding: 20px; background-color: #eef7fc; border-left: 5px solid #0073aa; border-radius: 4px; display: none; /* Hidden by default */ } .ot-result-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 16px; } .ot-result-row.final-total { font-weight: bold; font-size: 20px; border-top: 2px solid #ccc; padding-top: 10px; color: #0073aa; } .ot-calc-error { color: #d63638; font-weight: bold; margin-top: 10px; display: none; } .ot-section-title { font-size: 1.2em; margin-bottom: 10px; border-bottom: 1px solid #ddd; padding-bottom: 5px; color: #555; }

Weighted Average Overtime Rate Calculator

This calculator determines the correct overtime pay when an employee works at two different hourly rates within a single workweek, based on the weighted average (blended rate) method typically required by labor regulations like the FLSA.

Position / Job 1 Details
Position / Job 2 Details
Please enter valid, positive numbers for all rates and hours.
function calculateWeightedOvertime() { // 1. Get inputs using var var rate1Input = document.getElementById('ot_rate1').value; var hours1Input = document.getElementById('ot_hours1').value; var rate2Input = document.getElementById('ot_rate2').value; var hours2Input = document.getElementById('ot_hours2').value; var resultDiv = document.getElementById('ot-calc-result'); var errorDiv = document.getElementById('ot-calc-error-msg'); // Reset previous displays resultDiv.style.display = 'none'; resultDiv.innerHTML = "; errorDiv.style.display = 'none'; // 2. Parse inputs to floats var r1 = parseFloat(rate1Input); var h1 = parseFloat(hours1Input); var r2 = parseFloat(rate2Input); var h2 = parseFloat(hours2Input); // 3. Validate inputs (handle NaN and negatives) if (isNaN(r1) || r1 < 0) r1 = 0; if (isNaN(h1) || h1 < 0) h1 = 0; if (isNaN(r2) || r2 < 0) r2 = 0; if (isNaN(h2) || h2 < 0) h2 = 0; var totalHours = h1 + h2; // Basic validation: Need hours to calculate if (totalHours overtimeThreshold) { overtimeHours = totalHours – overtimeThreshold; } // Step D: Calculate Overtime Premium Pay // The employee has already been paid straight time for all hours. // They are owed the extra 0.5x the regular rate for OT hours. var overtimePremiumRate = weightedRegularRate * 0.5; var totalOvertimePremiumPay = overtimeHours * overtimePremiumRate; // Step E: Total Gross Pay var totalGrossPay = totalStraightTimeEarnings + totalOvertimePremiumPay; // 5. Output Results var outputHTML = '
Total Hours Worked:' + totalHours.toFixed(2) + ' hrs
'; outputHTML += '
Total Straight-Time Earnings:$' + totalStraightTimeEarnings.toFixed(2) + '
'; outputHTML += '
Weighted Average Regular Rate:$' + weightedRegularRate.toFixed(2) + ' /hr
'; outputHTML += '
Overtime Hours (over 40):' + overtimeHours.toFixed(2) + ' hrs
'; outputHTML += '
OT Premium Pay (' + overtimeHours.toFixed(2) + ' x $' + overtimePremiumRate.toFixed(2) + '):$' + totalOvertimePremiumPay.toFixed(2) + '
'; outputHTML += '
Total Weekly Gross Pay:$' + totalGrossPay.toFixed(2) + '
'; resultDiv.innerHTML = outputHTML; resultDiv.style.display = 'block'; }

Understanding Weighted Average Overtime

When an employee works at two or more different rates of pay in a single workweek, federal regulations (such as the FLSA in the United States) generally require that overtime pay be calculated using a "weighted average" of those rates. You cannot simply pay overtime based on the rate of the specific job performed during the overtime hours, nor can you arbitrarily choose the lower rate.

The weighted average regular rate is calculated by dividing total straight-time earnings for the week by the total hours worked.

The Calculation Steps Explained

  1. Calculate Straight-Time Earnings: Multiply the hours worked at each specific job by its corresponding hourly rate. Sum these amounts together to get total straight-time earnings.
  2. Calculate Total Hours: Add together all hours worked across all positions.
  3. Determine the Regular Rate: Divide Total Straight-Time Earnings by Total Hours Worked. This gives you the weighted average "Regular Rate."
  4. Calculate Overtime Premium: For any hours worked over 40, the employee is owed an additional "half-time" premium based on the Regular Rate calculated in Step 3. (Regular Rate x 0.5 x Overtime Hours).
  5. Total Pay: Add the Total Straight-Time Earnings plus the calculated Overtime Premium.

Realistic Example

Imagine an employee, Sarah, has two roles.

  • Role A: $20.00/hr. She works 30 hours.
  • Role B: $25.00/hr. She works 20 hours.
Total Hours worked: 50 hours (10 hours of overtime).

The wrong way: Paying time-and-a-half on $20/hr for the extra 10 hours.
The correct weighted way:

  1. Straight time: (30 hrs x $20) + (20 hrs x $25) = $600 + $500 = $1,100.
  2. Regular Rate: $1,100 / 50 total hours = $22.00/hr (Weighted Rate).
  3. OT Premium: The extra half-time is $22.00 x 0.5 = $11.00/hr. For 10 overtime hours, that is $110.
  4. Total Pay: $1,100 (straight time) + $110 (OT premium) = $1,210.00.

Leave a Comment