Check Your Shifts
Put in your shifts and your hourly rate. This calculator applies Nevada’s rolling 24-hour overtime rule — the window starts when your first shift starts, not at midnight — and shows you the table: hours worked, running total in the window, regular hours, overtime hours, and the premium you were short. It runs entirely on this page and stores nothing.
.nop-calc{–bg:#fbfaf7;–surface:#ffffff;–surface-2:#f2f0eb;–ink:#1d2420;–ink-soft:#4c5750;–line:#d8d3c8;–accent:#166534;–accent-ink:#ffffff;–accent-soft:#e3f0e7;–ot:#9a3412;–ot-soft:#fdeeda;–warn-bg:#fff7e0;–warn-ink:#7c4a03;–danger:#b91c1c;–radius:10px;–serif:”Iowan Old Style”,Palatino,”Palatino Linotype”,Georgia,serif;–sans:-apple-system,BlinkMacSystemFont,”Segoe UI”,Roboto,Helvetica,Arial,sans-serif;font-family:var(–sans);color:var(–ink);line-height:1.55;font-size:16px} .nop-calc *{box-sizing:border-box} .nop-calc h2{font-family:var(–serif);font-size:1.25rem;margin:0 0 10px} .nop-calc p{margin:0 0 12px} .nop-calc .card{background:var(–surface);border:1px solid var(–line);border-radius:var(–radius);padding:18px;margin:18px 0} .nop-calc .rule-note{background:var(–accent-soft);border:1px solid var(–line);border-radius:var(–radius);padding:12px 14px;font-size:.95rem;margin:14px 0} .nop-calc label{display:block;font-weight:600;font-size:.92rem;margin-bottom:4px} .nop-calc .hint{font-weight:400;color:var(–ink-soft);font-size:.85rem;display:block;margin-top:2px} .nop-calc input,.nop-calc select{font:inherit;color:var(–ink);background:var(–surface);border:1px solid var(–line);border-radius:8px;padding:9px 10px;min-height:2.5rem;width:100%} .nop-calc .rate-row{display:flex;flex-wrap:wrap;gap:14px;align-items:end} .nop-calc .rate-field{flex:1 1 180px;max-width:260px} .nop-calc .rate-readout{flex:2 1 260px;font-size:.95rem;color:var(–ink-soft)} .nop-calc .shift{border:1px solid var(–line);border-radius:var(–radius);padding:14px;margin:12px 0;background:var(–surface-2)} .nop-calc .shift-head{display:flex;justify-content:space-between;align-items:baseline;gap:10px;margin-bottom:10px} .nop-calc .shift-head h3{font-size:1rem;margin:0} .nop-calc .shift-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px} .nop-calc .remove-btn{background:none;border:none;color:var(–danger);font:inherit;font-size:.9rem;font-weight:600;cursor:pointer;padding:6px 8px;min-height:36px} .nop-calc .overnight-note{font-size:.85rem;color:var(–ink-soft);margin-top:6px} .nop-calc .actions{display:flex;flex-wrap:wrap;gap:10px;margin-top:14px} .nop-calc button{font:inherit;font-weight:600;cursor:pointer;border-radius:8px;padding:10px 16px;min-height:44px;border:1px solid var(–line);background:var(–surface);color:var(–ink)} .nop-calc button.primary{background:var(–accent);color:var(–accent-ink);border-color:transparent} .nop-calc .error-box,.nop-calc .warn-box{border-radius:var(–radius);padding:12px 14px;margin:14px 0;font-size:.95rem} .nop-calc .error-box{background:#fdecec;color:#7f1d1d;border:1px solid #f5c2c2} .nop-calc .warn-box{background:var(–warn-bg);color:var(–warn-ink);border:1px solid var(–line)} .nop-calc .stats{display:grid;grid-template-columns:repeat(auto-fit,minmax(150px,1fr));gap:12px;margin:6px 0 4px} .nop-calc .stat{border:1px solid var(–line);border-radius:var(–radius);padding:14px;background:var(–surface)} .nop-calc .stat .num{font-family:var(–serif);font-size:1.9rem;font-weight:700;line-height:1.1} .nop-calc .stat .lbl{font-size:.88rem;color:var(–ink-soft);margin-top:4px} .nop-calc .stat.ot .num{color:var(–ot)} .nop-calc .stat.ot{background:var(–ot-soft)} .nop-calc .money-line{font-size:1rem;margin-top:12px} .nop-calc table{width:100%;border-collapse:collapse;font-size:.95rem} .nop-calc th,.nop-calc td{text-align:left;padding:9px 8px;border-bottom:1px solid var(–line);vertical-align:top} .nop-calc th{font-size:.82rem;text-transform:uppercase;letter-spacing:.04em;color:var(–ink-soft)} .nop-calc td.num,.nop-calc th.num{text-align:right} .nop-calc td.ot-cell{color:var(–ot);font-weight:700} .nop-calc .win-label{font-size:.85rem;color:var(–ink-soft)} .nop-calc .howto ol{margin:0 0 4px;padding-left:22px} .nop-calc .howto li{margin-bottom:6px} .nop-calc footer{color:var(–ink-soft);font-size:.88rem;margin-top:28px} .nop-calc .empty{color:var(–ink-soft);font-style:italic} .nop-calc .hidden{display:none!important} @media (max-width:640px){.nop-calc table,.nop-calc tbody,.nop-calc tr,.nop-calc td{display:block;width:100%}.nop-calc thead{display:none}.nop-calc tbody tr{border:1px solid var(–line);border-radius:8px;margin-bottom:10px;padding:6px 10px;background:var(–surface)}.nop-calc td{border-bottom:none;padding:4px 0;display:flex;justify-content:space-between;gap:12px}.nop-calc td::before{content:attr(data-label);font-weight:600;color:var(–ink-soft);font-size:.85rem}}Your shifts
Hourly rate
Regular hourly rate ($)
Used only to work out the dollars short. Nothing is saved or sent anywhere.
How the rolling window works
- The window opens when your first shift starts. Clock in at 3:00 PM and the window runs 3:00 PM today to 3:00 PM tomorrow.
- Every hour inside that window counts toward the same 8. A 7-hour shift, then a next-morning shift, adds up inside the same window.
- Hours past 8 in the window are overtime — even if neither shift alone went over 8, and even with 10 hours off in between.
- When the window ends, a new one starts at the next shift’s start (or where a shift crosses the boundary), and the count starts over at zero.
The example, worked out: off at 10:00 PM after a 7-hour shift means you started at 3:00 PM. Back at 8:00 AM the next day, your 8th hour lands at 9:00 AM. Work until 4:00 PM and 6 of those hours are overtime — at $14/hr that’s $42 of half-time premium missing from the check.
Shift ‘ + n + ‘
‘ + ‘‘ +
‘
‘ +
‘‘;
div.querySelector(“.remove-btn”).addEventListener(“click”, function () { div.remove(); renumberShifts(); calculate(); });
div.querySelectorAll(“input”).forEach(function (inp) { inp.addEventListener(“change”, calculate); inp.addEventListener(“input”, calculate); });
shiftList.appendChild(div);
return div;
}
function renumberShifts() {
var rows = shiftList.querySelectorAll(“.shift”);
rows.forEach(function (row, i) { row.querySelector(“h3”).textContent = “Shift ” + (i + 1); row.querySelector(“.remove-btn”).setAttribute(“aria-label”, “Remove shift ” + (i + 1)); });
}
function parseShift(row) {
var dateStr = row.querySelector(“.f-date”).value;
var startStr = row.querySelector(“.f-start”).value;
var endStr = row.querySelector(“.f-end”).value;
var breakMin = parseInt(row.querySelector(“.f-break”).value, 10);
if (isNaN(breakMin) || breakMin < 0) breakMin = 0;
var note = row.querySelector(".overnight-note");
if (!dateStr || !startStr || !endStr) return { error: "Fill in the date, clock-in, and clock-out for every shift." };
var start = new Date(dateStr + "T" + startStr + ":00");
var end = new Date(dateStr + "T" + endStr + ":00");
var overnight = false;
if (end <= start) { end = addDays(end, 1); overnight = true; }
var totalMin = Math.round((end – start) / 60000);
var workedMin = totalMin – breakMin;
if (workedMin <= 0) return { error: "A shift has to be longer than its unpaid break. Check the times on " + fmtDate(start) + "." };
note.textContent = overnight ? "Clock-out is after midnight — this shift ends " + fmtDate(end) + " at " + fmtTime(end) + "." : "";
note.classList.toggle("hidden", !overnight);
return { start: start, end: end, breakMin: breakMin, workedMin: workedMin, overnight: overnight };
}
function mondayOf(d) {
var c = new Date(d.getFullYear(), d.getMonth(), d.getDate(), 0, 0, 0, 0);
var day = c.getDay();
var diff = (day + 6) % 7;
c.setDate(c.getDate() – diff);
return c;
}
function getRate() { var r = parseFloat(rateInput.value); return (isNaN(r) || r < 0) ? null : r; }
function updateRuleText() {
var rate = getRate();
if (rate === null) { ruleNote.innerHTML = "Enter your hourly rate to see which Nevada overtime rule applies to you.”; rateReadout.textContent = “”; return “daily”; }
if (rate < DAILY_THRESHOLD) {
ruleNote.innerHTML = "Daily overtime applies. At ” + fmtMoney(rate) + “/hr — under ” + fmtMoney(DAILY_THRESHOLD) + “/hr (1½× Nevada’s $12.00 minimum wage) — you earn overtime after 8 hours in any rolling 24-hour period, not just after 40 hours in a week.”;
rateReadout.innerHTML = “Rule in use: 8 hours in a rolling 24-hour period. A shift that starts before the last window ends keeps counting toward that window.”;
return “daily”;
}
ruleNote.innerHTML = “Weekly overtime applies. At ” + fmtMoney(rate) + “/hr — ” + fmtMoney(DAILY_THRESHOLD) + “/hr or more — Nevada’s daily 8-hour rule does not cover you. You earn overtime after 40 hours in a workweek (Monday–Sunday here).”;
rateReadout.innerHTML = “Rule in use: 40 hours in a workweek (Monday–Sunday).”;
return “weekly”;
}
function calculate() {
var mode = updateRuleText();
var rows = Array.prototype.slice.call(shiftList.querySelectorAll(“.shift”));
messages.innerHTML = “”;
results.classList.add(“hidden”);
if (rows.length === 0) { messages.innerHTML = ‘Date
‘ +
‘Clock in
‘ +
‘Clock out
‘ +
‘Unpaid break (minutes)Meal break you weren’t paid for.
‘ +
‘Add at least one shift to see the breakdown.
‘; return; } var shifts = []; for (var i = 0; i < rows.length; i++) { var p = parseShift(rows[i]); if (p.error) { messages.innerHTML = '‘ + esc(p.error) + “
“; return; }
shifts.push(p);
}
shifts.sort(function (a, b) { return a.start – b.start; });
var warns = [];
for (var j = 1; j < shifts.length; j++) {
if (shifts[j].start < shifts[j – 1].end) { warns.push("Two shifts overlap: " + fmtDate(shifts[j – 1].start) + " " + fmtTime(shifts[j – 1].start) + "–" + fmtTime(shifts[j – 1].end) + " and " + fmtDate(shifts[j].start) + " " + fmtTime(shifts[j].start) + "–" + fmtTime(shifts[j].end) + ". Overlapping hours are counted twice — check the times."); }
}
if (warns.length) { messages.innerHTML = '‘ + warns.join(“
“) + “
“; }
var limit = mode === “daily” ? DAILY_LIMIT_MIN : WEEKLY_LIMIT_MIN;
var segments = [];
var totalWorked = 0, totalRegular = 0, totalOt = 0;
if (mode === “daily”) {
var anchor = null, used = 0, winNo = 0;
shifts.forEach(function (sh) {
var cursor = new Date(sh.start);
var remaining = sh.workedMin;
while (remaining > 0) {
if (anchor === null || cursor >= new Date(anchor.getTime() + 24 * 60 * 60000)) { anchor = new Date(cursor); used = 0; winNo++; }
var winEnd = new Date(anchor.getTime() + 24 * 60 * 60000);
var segEnd = new Date(Math.min(cursor.getTime() + remaining * 60000, winEnd.getTime()));
var segMin = Math.round((segEnd – cursor) / 60000);
if (segMin 0) {
var wk = mondayOf(cursor);
if (weekStart === null || wk.getTime() !== weekStart.getTime()) { weekStart = wk; wUsed = 0; wNo++; }
var wkEnd = new Date(weekStart.getTime() + 7 * 24 * 60 * 60000);
var segEnd = new Date(Math.min(cursor.getTime() + remaining * 60000, wkEnd.getTime()));
var segMin = Math.round((segEnd – cursor) / 60000);
if (segMin 0) {
var premium = totalOt / 60 * rate * 0.5;
var paidStraight = totalWorked / 60 * rate;
var shouldBe = totalRegular / 60 * rate + totalOt / 60 * rate * 1.5;
document.getElementById(“nopStatShort”).textContent = fmtMoney(premium);
moneyLine.innerHTML = “If all ” + fmtHours(totalWorked) + ” hours were paid at straight time, that’s ” + fmtMoney(paidStraight) + “. With overtime at time-and-a-half it should have been ” + fmtMoney(shouldBe) + “ — a difference of ” + fmtMoney(premium) + “ on these shifts alone.”;
} else if (rate !== null) {
document.getElementById(“nopStatShort”).textContent = “$0.00”;
moneyLine.textContent = “No overtime in these shifts — every hour stayed inside the limit for its window.”;
} else {
document.getElementById(“nopStatShort”).textContent = “—”;
moneyLine.textContent = “Enter an hourly rate above to see the dollars short.”;
}
var tbody = document.getElementById(“nopBreakdownBody”);
tbody.innerHTML = “”;
segments.forEach(function (s) {
var tr = document.createElement(“tr”);
var winLabel = mode === “daily” ? “Window ” + s.winNo + ““) + “
” + fmtDate(s.winStart) + ” ” + fmtTime(s.winStart) + ” → ” + fmtDate(s.winEnd) + ” ” + fmtTime(s.winEnd) + “” : “Week of ” + fmtDate(s.winStart); var shiftLabel = fmtDate(s.shiftStart) + ” shift”; var timeLabel = fmtTime(s.segStart) + ” – ” + fmtTime(s.segEnd) + (s.segEnd.getDate() !== s.segStart.getDate() ? ” (” + fmtDate(s.segEnd) + “)” : “”); tr.innerHTML = ‘