Federal overtime law requires 1.5x pay after 40 hours per week. But some states add daily overtime some industries are exempt and salaried employees have different rules. The calculation is more complex than most payroll systems handle correctly.
Federal overtime rules (FLSA)
The Fair Labor Standards Act requires non-exempt employees to receive 1.5x their regular rate for hours worked beyond 40 in a workweek.
function calculateWeeklyPay(hourlyRate, hoursWorked) {
if (hoursWorked <= 40) {
return hourlyRate * hoursWorked;
}
const regularPay = hourlyRate * 40;
const overtimeHours = hoursWorked - 40;
const overtimePay = overtimeHours * hourlyRate * 1.5;
return regularPay + overtimePay;
}
// $25/hour, 50 hours worked
calculateWeeklyPay(25, 50);
// Regular: $1,000 + Overtime: $375 = $1,375
State variations
California adds daily overtime: 1.5x after 8 hours in a day, and 2x (double time) after 12 hours in a day. California also requires 2x pay on the seventh consecutive day of work.
function calculateCaliforniaDaily(hourlyRate, dailyHours) {
if (dailyHours <= 8) return hourlyRate * dailyHours;
if (dailyHours <= 12) {
return (hourlyRate * 8) + (hourlyRate * 1.5 * (dailyHours - 8));
}
return (hourlyRate * 8) + (hourlyRate * 1.5 * 4) +
(hourlyRate * 2 * (dailyHours - 12));
}
Colorado requires daily overtime after 12 hours. Alaska requires daily overtime after 8 hours. Most other states follow federal rules only.
The regular rate calculation
Overtime is calculated on the "regular rate," which includes base hourly pay plus non-discretionary bonuses, shift differentials, and piece-rate earnings. It does not include discretionary bonuses, gifts, vacation pay, or expense reimbursements.
If an employee earns $20/hour plus a $100 weekly production bonus:
Regular rate = ($20 * 40 + $100) / 40 = $22.50/hour
Overtime rate = $22.50 * 1.5 = $33.75/hour
The bonus increases the effective overtime rate. Many payroll systems get this wrong by calculating overtime on the base rate alone.
For calculating overtime with state-specific rules and bonus adjustments, I built a calculator at zovo.one/free-tools/overtime-calculator. It handles federal and state rules, daily and weekly overtime, and includes the regular rate calculation with bonuses.
I'm Michael Lip. I build free developer tools at zovo.one. 500+ tools, all private, all free.
Top comments (0)