Back to articles
Overtime Math Is Not Just Time and a Half

Overtime Math Is Not Just Time and a Half

via Dev.to BeginnersMichael Lip

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

Continue reading on Dev.to Beginners

Opens in a new tab

Read Full Article
5 views

Related Articles