Try it live: run your own numbers through the free Paycheck Calculator — it applies the 2026 federal brackets, FICA and state tax to your gross pay, overtime included, so you can see what the extra hours actually land as take-home pay.

Forty hours at $25 an hour is $1,000 a week. Fifty hours is not $1,250 — it is $1,375. The ten extra hours pay time-and-a-half, and the moment your week crosses 40 hours, the maths changes. Model it wrong and your payroll code underpays people, or your budget overstates what overtime is really worth. The rules are simple enough to fit in a few functions, but the edge cases — split rates, daily overtime, salaried non-exempt staff — are where naive implementations break.

The weekly rule: 40 hours, then 1.5x

Under the US Fair Labor Standards Act (FLSA), non-exempt employees earn 1.5 times their regular rate for every hour over 40 in a workweek. The workweek is a fixed 7-day period — it does not have to be Monday to Sunday, but it cannot shift to dodge overtime.

function weeklyPay(hourlyRate, hoursWorked) { const REGULAR_HOURS = 40; const OVERTIME_MULTIPLIER = 1.5; const regularHours = Math.min(hoursWorked, REGULAR_HOURS); const overtimeHours = Math.max(hoursWorked - REGULAR_HOURS, 0); const regularPay = regularHours * hourlyRate; const overtimePay = overtimeHours * hourlyRate * OVERTIME_MULTIPLIER; return { regularPay, overtimePay, overtimeHours, total: regularPay + overtimePay }; } console.log(weeklyPay(25, 50)); // { regularPay: 1000, overtimePay: 375, overtimeHours: 10, total: 1375 } 

Ten overtime hours a week at $25 an hour adds $375 a week — $19,500 over a 52-week year. The base salary for that same 40-hour week annualises to $52,000; with steady overtime it becomes $71,500. That gap is why overtime is the first thing to model when a job offer quotes an hourly rate: the headline rate is only half the story.

The trap: the "regular rate" is not always the hourly rate

The 1.5x multiplier applies to the regular rate, which is total straight-time earnings divided by total hours worked. When someone works two roles at different rates in the same week, you cannot just multiply their headline rate by 1.5 — you need the weighted average.

function weightedOvertime(shifts) { // shifts: [{ rate, hours }] — e.g. [{ rate: 20, hours: 30 }, { rate: 30, hours: 20 }] let straightTime = 0; let totalHours = 0; for (const s of shifts) { straightTime += s.rate * s.hours; totalHours += s.hours; } const regularRate = straightTime / totalHours; const overtimeHours = Math.max(totalHours - 40, 0); const premium = 0.5 * regularRate * overtimeHours; return { regularRate, overtimeHours, total: straightTime + premium }; } console.log(weightedOvertime([{ rate: 20, hours: 30 }, { rate: 30, hours: 20 }])); // { regularRate: 24, overtimeHours: 10, total: 1320 } 

Thirty hours at $20 and twenty at $30 is $1,200 of straight-time pay over 50 hours, so the regular rate is $24 — not $20, not $30. The overtime premium is half that rate (the other half is already inside the straight-time pay) times the 10 overtime hours: $120. Total for the week: $1,320. Non-discretionary bonuses and shift differentials count in the straight-time total too, which is the detail most payroll code misses.

Daily overtime: California plays by different rules

Federal law is weekly, but several states add a daily threshold. California is the strictest: over 8 hours in a day pays 1.5x, over 12 hours pays 2x — regardless of the weekly total.

function californiaDayPay(hourlyRate, hours) { const straight = Math.min(hours, 8); const timeAndHalf = Math.min(Math.max(hours - 8, 0), 4); const doubleTime = Math.max(hours - 12, 0); return ( straight * hourlyRate + timeAndHalf * hourlyRate * 1.5 + doubleTime * hourlyRate * 2 ); } console.log(californiaDayPay(25, 12)); // 350 — 8 x $25 + 4 x $37.50 console.log(californiaDayPay(25, 13)); // 400 — plus 1 hour at $50 

A 12-hour shift at $25 an hour pays $350 in California, not $300. A 13-hour shift pays $400. If your code only checks the weekly 40-hour line, it underpays every long shift in California — and a handful of other states have their own daily rules, so the daily check belongs in the model before the weekly one runs.

Salaried, but not exempt

Salaried does not automatically mean overtime-exempt. Non-exempt salaried staff still earn overtime, and the hourly rate comes from the salary itself:

function salaryToHourlyRate(annualSalary) { return annualSalary / 52 / 40; } const hourly = salaryToHourlyRate(62400); // $30/hr console.log(hourly * 1.5); // $45 per overtime hour 

A $62,400 salary is $30 an hour on a 40-hour week, so each overtime hour pays $45. Note the assumption baked in: the salary is understood to cover 40 hours. If the employment agreement says the salary covers a different fixed schedule, the divisor changes — hard-code 40 only when the contract says so.

Edge cases that break naive models

The seventh consecutive day. In California, the first 8 hours on the seventh consecutive day in a workweek pay 1.5x and the rest pay 2x. Track consecutive days, not just hours.

Holidays and paid time off. FLSA overtime counts hours actually worked. A paid holiday is not hours worked, so a week with a holiday and 40 hours on the clock is 32 hours worked — no overtime. State daily rules can still trigger.

Rounding. The "7-minute rule" lets employers round clock times to the nearest quarter hour, but only if the rounding averages out fairly over time. Round consistently in one direction and it becomes wage theft. Model exact minutes; round only at the display layer.

Meal breaks. Unpaid meal breaks do not count as hours worked. A 9-hour shift with an unpaid hour for lunch is 8 hours worked — no daily overtime in California. Get the break flag wrong and the whole day's maths shifts.

What overtime is actually worth after tax

Overtime is taxed like ordinary wages, and that matters for the "is it worth it?" question. Take the $25-an-hour worker doing 10 overtime hours every week: $71,500 gross a year. As a single filer under the 2026 rules, taxable income is $71,500 minus the $16,100 standard deduction — $55,400 — taxed at 10% up to $12,400, 12% up to $50,400 and 22% above that, for $6,900 of federal tax. FICA adds 6.2% Social Security and 1.45% Medicare on the full amount: $5,469.75. Total tax before state tax is about $12,370, leaving roughly $59,130 take-home.

The key point is marginal: only the income inside each bracket pays that bracket's rate, so overtime never makes you poorer by pushing you into a higher bracket — a higher rate applies only to the dollars above the line. The free Paycheck Calculator runs this exact 2026 model, so you can test any hours-and-rate combination against your own state before deciding the extra shifts are worth it.

The takeaway

Overtime pay is three functions, not one: the weekly 40-hour rule, the weighted-average regular rate for split shifts, and the daily rule where the state demands one. Get the regular rate right, count only hours actually worked, and remember that double time exists on long days in states like California. Model those three pieces and your payroll code stops underpaying people — and your own budget finally shows what the extra hours are really worth.