{"id":1383,"date":"2026-08-08T17:51:19","date_gmt":"2026-08-08T21:51:19","guid":{"rendered":"https:\/\/roadtrades.com\/per-diem-bill-rate-calculator\/"},"modified":"2026-08-22T18:10:56","modified_gmt":"2026-08-22T22:10:56","slug":"rate-split-calculator","status":"publish","type":"page","link":"https:\/\/roadtrades.com\/es\/rate-split-calculator\/","title":{"rendered":"Calculadora de divisi\u00f3n de tarifas"},"content":{"rendered":"<style id=\"rt-brc-css\">\n.rt-brc{--b-ink:var(--rt-ink,#1E232A);--b-accent:var(--rt-accent,#FF6A1A);--b-steel:var(--rt-steel,#5C6770);--b-border:var(--rt-border,#e3e1dc);font-family:var(--rt-font,'Archivo',sans-serif);color:var(--b-ink);max-width:860px;margin:0 auto;padding:0 16px 56px;}\n.rt-brc *{box-sizing:border-box;}\n.rt-brc__hero{padding:34px 0 8px;max-width:720px;}\n.rt-brc__eyebrow{display:block;font-family:var(--rt-cond,'Barlow Condensed',sans-serif);text-transform:uppercase;letter-spacing:2px;font-size:12px;font-weight:700;color:var(--b-accent);}\n.rt-brc__hero h1{font-size:36px;font-weight:900;line-height:1.12;margin:6px 0 10px;letter-spacing:-0.5px;}\n.rt-brc__hero p{font-size:15.5px;line-height:1.6;color:var(--b-steel);margin:0;}\n.rt-brc__grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px;margin:22px 0 0;}\n@media(max-width:640px){.rt-brc__grid{grid-template-columns:repeat(2,1fr);}}\n.rt-brc__f label{display:block;font-family:var(--rt-cond,'Barlow Condensed',sans-serif);text-transform:uppercase;letter-spacing:.08em;font-size:11.5px;font-weight:700;color:var(--b-steel);margin:0 0 5px;}\n.rt-brc__f input{width:100%;border:1px solid var(--b-border);border-radius:10px;padding:11px 12px;font-size:17px;font-weight:700;font-family:var(--rt-font,'Archivo',sans-serif);color:var(--b-ink);background:#fff;font-variant-numeric:tabular-nums;}\n.rt-brc__f input:focus{outline:2px solid var(--b-accent);border-color:var(--b-accent);}\n.rt-brc__f input[readonly]{background:#f6f4ef;color:var(--b-steel);}\n.rt-brc__hold{float:right;font-size:10.5px;letter-spacing:.05em;color:var(--b-steel);display:inline-flex;align-items:center;gap:4px;text-transform:uppercase;font-weight:700;cursor:pointer;}\n.rt-brc__hold input{accent-color:var(--b-accent);width:13px;height:13px;margin:0;cursor:pointer;}\n.rt-brc__mk{margin:10px 0 0;font-size:13px;color:var(--b-steel);}\n.rt-brc__mk b{color:var(--b-ink);}\n.rt-brc__anchor{margin:8px 0 0;font-size:13px;color:var(--b-steel);}\n.rt-brc__anchor b{color:var(--b-ink);font-variant-numeric:tabular-nums;}\n.rt-brc__anchor a{color:var(--b-accent);font-weight:700;text-decoration:none;}\n.rt-brc__anchor a:hover{text-decoration:underline;}\n.rt-brc__hl{background:#fff;border:1px solid var(--b-border);border-left:4px solid var(--b-accent);border-radius:12px;padding:16px 18px;margin:20px 0 0;display:flex;align-items:baseline;gap:14px;flex-wrap:wrap;}\n.rt-brc__hl .amt{font-family:var(--rt-cond,'Barlow Condensed',sans-serif);font-weight:700;font-size:2.4rem;color:var(--b-accent);line-height:1;}\n.rt-brc__hl .lab{font-size:14px;color:var(--b-steel);max-width:52ch;}\n.rt-brc__two{display:grid;grid-template-columns:1fr 1fr;gap:14px;margin:14px 0 0;}\n@media(max-width:640px){.rt-brc__two{grid-template-columns:1fr;}}\n.rt-brc__card{background:#fff;border:1px solid var(--b-border);border-radius:12px;padding:18px;}\n.rt-brc__card h3{font-size:15.5px;font-weight:800;margin:0 0 8px;}\n.rt-brc__card .big{font-family:var(--rt-cond,'Barlow Condensed',sans-serif);font-weight:700;font-size:1.7rem;margin:0 0 6px;font-variant-numeric:tabular-nums;}\n.rt-brc__card p{font-size:13.5px;line-height:1.55;color:var(--b-steel);margin:0;}\n.rt-brc__mg{margin:14px 0 0;background:#fff;border:1px solid var(--b-border);border-radius:12px;}\n.rt-brc__mg summary{cursor:pointer;list-style:none;display:flex;align-items:center;padding:15px 18px;font-size:15.5px;font-weight:800;}\n.rt-brc__mg summary::-webkit-details-marker{display:none;}\n.rt-brc__mg summary::after{content:\"+\";margin-left:auto;font-family:var(--rt-cond,'Barlow Condensed',sans-serif);font-size:22px;line-height:1;color:var(--b-accent);font-weight:700;}\n.rt-brc__mg[open] summary::after{content:\"\\2212\";}\n.rt-brc__mgin{padding:2px 18px 18px;}\n.rt-brc__mgnote{font-size:13.5px;line-height:1.55;color:var(--b-steel);margin:0 0 12px;}\n.rt-brc__mgnote b{color:var(--b-ink);font-variant-numeric:tabular-nums;}\n.rt-brc__mgrid{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;}\n@media(max-width:640px){.rt-brc__mgrid{grid-template-columns:repeat(2,1fr);}}\n.rt-brc__mglev{display:flex;gap:16px;align-items:flex-start;margin:16px 0 0;flex-wrap:wrap;}\n.rt-brc__mglev .rt-brc__f{flex:0 0 200px;}\n.rt-brc__f--lever input{border-color:var(--b-accent);}\n.rt-brc__mgv{flex:1;min-width:250px;margin:24px 0 0;font-size:14px;line-height:1.55;color:var(--b-steel);border-left:3px solid var(--b-accent);padding:2px 0 2px 12px;}\n.rt-brc__mgv b{color:var(--b-ink);font-variant-numeric:tabular-nums;}\n.rt-brc__wk{margin:18px 0 0;border-top:1px solid var(--b-border);padding-top:12px;display:flex;gap:26px;flex-wrap:wrap;font-size:13.5px;color:var(--b-steel);}\n.rt-brc__wk b{color:var(--b-ink);font-variant-numeric:tabular-nums;}\n.rt-brc__note{margin:20px 0 0;font-size:12.5px;line-height:1.55;color:var(--b-steel);background:#f6f4ef;border:1px solid var(--b-border);border-radius:10px;padding:11px 14px;}\n.rt-brc__cta{margin:24px 0 0;}\n<\/style>\n<div class=\"rt-brc\" data-no-translation-scope>\n  <div class=\"rt-brc__hero\">\n    <span class=\"rt-brc__eyebrow\">Free recruiter tool<\/span>\n    <h1>Rate Split Calculator<\/h1>\n    <p>Pull per diem out of the rates you already have. One exchange rate does all the work: at your stated hours, every dollar of daily per diem equals a few cents of hourly rate &mdash; this tool moves money between the two, in both directions, and shows what each move does to the pay rate and the bill rate.<\/p>\n  <\/div>\n\n  <div class=\"rt-brc__grid\">\n    <div class=\"rt-brc__f\"><label>Pay rate \/ hr <span class=\"rt-brc__hold\"><input type=\"checkbox\" id=\"rtbr-payhold\"> hold<\/span><\/label><input id=\"rtbr-pay\" type=\"number\" step=\"0.25\" value=\"35\" inputmode=\"decimal\"><\/div>\n    <div class=\"rt-brc__f\"><label>Markup &times; <span class=\"rt-brc__hold\"><input type=\"checkbox\" id=\"rtbr-mkhold\"> hold<\/span><\/label><input id=\"rtbr-markup\" type=\"number\" step=\"0.01\" value=\"1.50\" inputmode=\"decimal\"><\/div>\n    <div class=\"rt-brc__f\"><label>Bill rate \/ hr <span class=\"rt-brc__hold\"><input type=\"checkbox\" id=\"rtbr-billhold\"> hold<\/span><\/label><input id=\"rtbr-bill\" type=\"number\" step=\"0.25\" value=\"52.50\" inputmode=\"decimal\"><\/div>\n    <div class=\"rt-brc__f\"><label>OT pay \/ hr (1.5&times;)<\/label><input id=\"rtbr-otpay\" type=\"number\" value=\"52.50\" readonly tabindex=\"-1\"><\/div>\n    <div class=\"rt-brc__f\"><label>OT markup &times;<\/label><input id=\"rtbr-otmk\" type=\"number\" step=\"0.005\" value=\"1.50\" inputmode=\"decimal\"><\/div>\n    <div class=\"rt-brc__f\"><label>OT bill \/ hr<\/label><input id=\"rtbr-otbill\" type=\"number\" step=\"0.25\" value=\"78.75\" inputmode=\"decimal\"><\/div>\n    <div class=\"rt-brc__f\"><label>Hours \/ day<\/label><input id=\"rtbr-hours\" type=\"number\" step=\"0.5\" value=\"8\" inputmode=\"decimal\"><\/div>\n    <div class=\"rt-brc__f\"><label>Hours \/ wk<\/label><input id=\"rtbr-hwk\" type=\"number\" step=\"1\" value=\"40\" inputmode=\"decimal\"><\/div>\n    <div class=\"rt-brc__f\"><label>Days worked \/ week<\/label><input id=\"rtbr-days\" type=\"number\" step=\"1\" value=\"5\" inputmode=\"numeric\"><\/div>\n    <div class=\"rt-brc__f\"><label>Per diem goal \/ day<\/label><input id=\"rtbr-need\" type=\"number\" step=\"5\" value=\"100\" inputmode=\"decimal\"><\/div>\n    <div class=\"rt-brc__f\"><label>Per diem provided \/ day<\/label><input id=\"rtbr-given\" type=\"number\" step=\"5\" value=\"0\" inputmode=\"decimal\"><\/div>\n    <div class=\"rt-brc__f\"><label>Per diem days \/ week<\/label><input id=\"rtbr-pddays\" type=\"number\" step=\"1\" value=\"5\" inputmode=\"numeric\"><\/div>\n  <\/div>\n  <p class=\"rt-brc__mk\">Bill = pay &times; markup, and overtime pays 1.5&times; the pay rate, billed at its own markup. Type your deal freely &mdash; then <b>check a hold to lock it in<\/b>: the held field is your non-negotiable, the other two trade the edit, and from that moment every rate move counts toward the per diem below. Un-check to reset and type fresh numbers. Hours per week = hours per day &times; days.<\/p>\n  <p class=\"rt-brc__anchor\" id=\"rtbr-dealseg\" style=\"display:none;\"><\/p>\n\n  <div class=\"rt-brc__hl\"><span class=\"amt\" id=\"rtbr-add\">$12.50<\/span><span class=\"lab\"><b>additional per hour needed<\/b> to cover the remaining <span id=\"rtbr-gap\">$100<\/span>\/day of per diem across <span id=\"rtbr-pdd2\">5<\/span> days, earned over <span id=\"rtbr-hrs2\">40<\/span> worked hours a week<span id=\"rtbr-mgline\"><\/span>.<\/span><\/div>\n\n  <div class=\"rt-brc__two\">\n    <div class=\"rt-brc__card\">\n      <h3>Fund it from the rate<\/h3>\n      <div class=\"big\" id=\"rtbr-a\">Pay $22.50 &middot; bill unchanged<\/div>\n      <p>Shift <span id=\"rtbr-add2\">$12.50<\/span>\/hr out of the pay rate and into per diem. The client&rsquo;s cost does not move &mdash; and because per diem is not taxed when the worker qualifies, the hand&rsquo;s after-tax week usually improves.<\/p>\n    <\/div>\n    <div class=\"rt-brc__card\">\n      <h3>Fund it from the client<\/h3>\n      <div class=\"big\" id=\"rtbr-b\">Bill $65 &middot; pay unchanged<\/div>\n      <p>Raise the bill and pass the difference (<span id=\"rtbr-add3\">$12.50<\/span>\/hr) straight through as per diem &mdash; it carries no burden, so a billed dollar delivers a whole dollar.<\/p>\n    <\/div>\n  <\/div>\n\n  <details class=\"rt-brc__mg\">\n    <summary>Or take it from the margin<\/summary>\n    <div class=\"rt-brc__mgin\">\n      <p class=\"rt-brc__mgnote\">Your margin right now: <b id=\"rtbr-mgnow\">$17.50<\/b>\/hr (bill minus pay). Burden is a fact &mdash; set it and profit shows what&rsquo;s left. Then give the per diem what you can spare: every dollar in <b>Toward per diem<\/b> comes out of profit, rides in the burden column, and shrinks the need above, dollar for dollar.<\/p>\n      <div class=\"rt-brc__mgrid\">\n        <div class=\"rt-brc__f\"><label>Burden %<\/label><input id=\"rtbr-bpct\" type=\"number\" step=\"1\" value=\"50\" inputmode=\"decimal\"><\/div>\n        <div class=\"rt-brc__f\"><label>Burden $ \/ hr<\/label><input id=\"rtbr-bdol\" type=\"number\" step=\"0.25\" value=\"8.75\" inputmode=\"decimal\"><\/div>\n        <div class=\"rt-brc__f\"><label>Gross profit %<\/label><input id=\"rtbr-ppct\" type=\"number\" step=\"1\" value=\"50\" inputmode=\"decimal\"><\/div>\n        <div class=\"rt-brc__f\"><label>Gross profit $ \/ hr<\/label><input id=\"rtbr-pdol\" type=\"number\" step=\"0.25\" value=\"8.75\" inputmode=\"decimal\"><\/div>\n      <\/div>\n      <div class=\"rt-brc__mglev\">\n        <div class=\"rt-brc__f rt-brc__f--lever\"><label>Toward per diem $ \/ hr<\/label><input id=\"rtbr-cdol\" type=\"number\" step=\"0.25\" value=\"0\" inputmode=\"decimal\"><\/div>\n        <p class=\"rt-brc__mgv\" id=\"rtbr-mgv\"><\/p>\n      <\/div>\n    <\/div>\n  <\/details>\n\n  <div class=\"rt-brc__wk\">\n    <span>Bill \/ week <b id=\"rtbr-bw\">$2,100<\/b><\/span>\n    <span>OT hours \/ wk <b id=\"rtbr-oth\">0<\/b><\/span>\n    <span>Per diem \/ week <b id=\"rtbr-pw\">$500<\/b><\/span>\n  <\/div>\n\n  <p class=\"rt-brc__note\">Estimates for pricing conversations &mdash; not tax or legal advice. OT figured at 1.5&times; past 40 hours a week; state rules can differ. Per diem rides untaxed only when the worker actually qualifies (a real tax home, working away from it); <a href=\"\/guide\/per-diem\/\">the per-diem guide<\/a> covers the rules in plain words. Confirm final rates and terms in writing.<\/p>\n\n  <div class=\"rt-brc__cta rt-btn-row\" style=\"justify-content:flex-start;\">\n    <a class=\"rt-btn-primary\" href=\"\/market-intelligence\/\">Check the going rate first<\/a>\n    <a class=\"rt-btn-dark\" href=\"\/why-post-here\/\">Why post jobs here<\/a>\n  <\/div>\n<\/div>\n<script>\n(function () {\n  var $ = function (id) { return document.getElementById(id); };\n  var pay = $('rtbr-pay'), bill = $('rtbr-bill'), mkIn = $('rtbr-markup'), otpay = $('rtbr-otpay'), otmk = $('rtbr-otmk'), otbill = $('rtbr-otbill'),\n      hours = $('rtbr-hours'), hwk = $('rtbr-hwk'), days = $('rtbr-days'),\n      need = $('rtbr-need'), given = $('rtbr-given'), pddays = $('rtbr-pddays'),\n      ppct = $('rtbr-ppct'), pdol = $('rtbr-pdol'), bpct = $('rtbr-bpct'), bdol = $('rtbr-bdol'), cdol = $('rtbr-cdol'),\n      mkHold = $('rtbr-mkhold'), payHold = $('rtbr-payhold'), billHold = $('rtbr-billhold');\n  if (!pay) return;\n  var M = 1.5, OTM = 1.5, bPct = 50, cDol = 0, lastAdd = 0, lastP = 35, lastB = 52.5,\n      P0 = 35, B0 = 52.5, lastRF = 0, lastBR = 0, armed = false;\n  var num = function (el, d) { var v = parseFloat(el.value); return isFinite(v) ? v : d; };\n  var r2 = function (v) { return Math.round(v * 100) \/ 100; };\n  var r3 = function (v) { return Math.round(v * 1000) \/ 1000; };\n  var money = function (v) { return '$' + (Math.round(v * 100) \/ 100).toLocaleString('en-US', { minimumFractionDigits: (v % 1 ? 2 : 0), maximumFractionDigits: 2 }); };\n  function recalc(src) {\n    var P = num(pay, 0), B = num(bill, 0), HW = Math.max(1, num(hwk, 40)), D = Math.max(1, num(days, 5)),\n        N = Math.max(0, num(need, 0)), G = Math.max(0, num(given, 0)),\n        PD = Math.max(1, num(pddays, 5));\n    var gap = Math.max(0, N - G);\n    \/* the per diem covers PD days of living; the rate only earns on the weekly\n       worked hours - so the exchange is weekly, not daily (Larry's catch:\n       5 worked days funding a 7-day per diem) *\/\n    lastAdd = (gap * PD) \/ HW;\n    lastP = P; lastB = B;\n    \/* the ledger, in Larry's own words: \"if we need to pull 10 bucks an hour\n       to pay someone's 100\/day per diem, we up our bill rate a couple bucks\n       and that 10 bucks we need reduces.\" Agency cash, armed by the lock:\n       pay DOWN frees money, bill UP brings money in - both fund the goal\n       dollar-for-dollar (per diem carries no burden). *\/\n    lastRF = armed ? P0 - P : 0;\n    lastBR = armed ? B - B0 : 0;\n    \/* OT: pays 1.5x the pay rate, bills at its own markup (Larry's worked\n       example: 35 -> 52.50 OT pay -> 74.81 at a 1.425 OT markup) *\/\n    var OTP = P * 1.5, OTB = OTP * OTM;\n    otpay.value = r2(OTP);\n    if (src !== otbill) otbill.value = r2(OTB);\n    if (src !== otmk) otmk.value = r3(OTM);\n    var otH = Math.max(0, HW - 40), stH = HW - otH;\n    $('rtbr-gap').textContent = money(gap);\n    $('rtbr-pdd2').textContent = PD;\n    $('rtbr-hrs2').textContent = (Math.round(HW * 10) \/ 10);\n    $('rtbr-bw').textContent = money(B * stH + OTB * otH);\n    $('rtbr-oth').textContent = (Math.round(otH * 10) \/ 10);\n    $('rtbr-pw').textContent = money(N * PD);\n    marginCalc(null);\n  }\n  \/* the margin is a LEVER, not a description (Larry's second catch: dialing\n     profit down should shrink the need). Identity: burden + profit +\n     toward-per-diem = margin. Burden is a FACT - editing it re-derives\n     profit, never the reverse; dollars given to the per diem come out of\n     profit and reduce the remaining need dollar-for-dollar. src = the field\n     being typed in; never rewrite it under the user's cursor. *\/\n  function marginCalc(src) {\n    var mg = lastB - lastP;\n    bPct = Math.min(100, Math.max(0, bPct));\n    var bDol = mg > 0 ? mg * bPct \/ 100 : 0;\n    var room = Math.max(0, mg - bDol);\n    var cReq = Math.max(0, cDol), cUse = Math.min(cReq, room);\n    var pDol = Math.max(0, room - cUse);\n    \/* the give rides IN the burden column (Larry: \"wouldn't this number add\n       to the burden?... that's what i was looking for\") - the burden fields\n       show and accept the ALL-IN load (base burden + the per diem you\n       absorb); bPct stays the BASE fact underneath. *\/\n    var allB = bDol + cUse;\n    $('rtbr-mgnow').textContent = money(Math.max(0, mg));\n    if (src !== bpct) bpct.value = r2(mg > 0 ? (allB \/ mg) * 100 : 0);\n    if (src !== bdol) bdol.value = r2(allB);\n    if (src !== ppct) ppct.value = r2(mg > 0 ? (pDol \/ mg) * 100 : 0);\n    if (src !== pdol) pdol.value = r2(pDol);\n    if (src !== cdol) cdol.value = r2(cUse);\n    var rem = Math.max(0, lastAdd - (mg > 0 ? cUse : 0) - lastRF - lastBR);\n    renderFunding(rem, mg > 0 ? cUse : 0);\n    var v = $('rtbr-mgv');\n    if (mg <= 0) { v.innerHTML = 'No margin to split \u2014 the bill is at or below the pay rate.'; return; }\n    var clampNote = (cReq > cUse + 0.005 && src === cdol) ? 'After burden the margin only has <b>' + money(room) + '<\/b>\/hr to give \u2014 using that. ' : '';\n    if (lastAdd <= 0 && cUse <= 0.005) { v.innerHTML = 'The per diem is covered \u2014 nothing extra to fund. Your split: burden <b>' + money(allB) + '<\/b>\/hr \u00b7 gross profit <b>' + money(pDol) + '<\/b>\/hr.'; return; }\n    if (cUse <= 0.005) {\n      v.innerHTML = pDol >= lastAdd\n        ? 'Type what you\u2019ll give and the need above drops with it, dollar for dollar \u2014 profit could carry the whole ' + money(lastAdd) + '\/hr and still keep <b>' + money(pDol - lastAdd) + '<\/b>\/hr.'\n        : 'Type what you\u2019ll give and the need above drops with it, dollar for dollar \u2014 profit tops out at <b>' + money(pDol) + '<\/b>\/hr of the ' + money(lastAdd) + '.';\n      return;\n    }\n    if (rem > 0.005) { v.innerHTML = clampNote + 'You\u2019re funding <b>' + money(cUse) + '<\/b>\/hr from the margin \u2014 it rides in the burden column, profit keeps ' + money(pDol) + '\/hr \u2014 <b>' + money(rem) + '<\/b>\/hr still to come from the rate or the bill above.'; return; }\n    var spare = cUse - lastAdd;\n    v.innerHTML = clampNote + 'The margin covers the whole gap' + (spare > 0.005 ? ' \u2014 with <b>' + money(spare) + '<\/b>\/hr to spare; put it back in profit' : '') + '. It rides in the burden column; profit keeps <b>' + money(pDol) + '<\/b>\/hr, pay and bill both hold.';\n  }\n  function renderFunding(rem, cUse) {\n    $('rtbr-add').textContent = money(rem);\n    var parts = [];\n    if (cUse > 0.005) parts.push('the <b>' + money(cUse) + '<\/b>\/hr from the margin');\n    if (lastRF > 0.005) parts.push('the <b>' + money(lastRF) + '<\/b>\/hr freed off the starting pay rate');\n    else if (lastRF < -0.005) parts.push('<b>' + money(-lastRF) + '<\/b>\/hr added to the pay rate');\n    if (lastBR > 0.005) parts.push('the <b>' + money(lastBR) + '<\/b>\/hr of extra billing');\n    else if (lastBR < -0.005) parts.push('<b>' + money(-lastBR) + '<\/b>\/hr given up off the starting bill');\n    $('rtbr-mgline').innerHTML = parts.length ? ', counting ' + parts.join(' and ') : '';\n    $('rtbr-add2').textContent = money(rem);\n    $('rtbr-add3').textContent = money(rem);\n    var payA = lastP - rem;\n    $('rtbr-a').innerHTML = payA > 0\n      ? 'Pay ' + money(payA) + ' \u00b7 bill unchanged'\n      : 'Gap bigger than the rate \u2014 split it';\n    $('rtbr-b').innerHTML = 'Bill ' + money(lastB + rem) + ' \u00b7 pay unchanged';\n  }\n  \/* the trio: pay x markup = bill. Before the lock nothing is coupled -\n     typing your deal just re-learns the markup as a gauge (the 555 lesson:\n     keystroke coupling plus a default anchor billed half-typed digits as an\n     $851 need). After the lock, ONE field can be held: it never moves, and\n     the other two trade the edit. Editing the held field itself falls back\n     to the gauge (markup re-learns; markup held -> bill follows). *\/\n  function holdName() { return payHold.checked ? 'pay' : mkHold.checked ? 'mk' : billHold.checked ? 'bill' : ''; }\n  function deriveFor(edited) {\n    var h = holdName();\n    if (edited === 'pay')  return h === 'bill' ? 'mk' : (h === 'mk' ? 'bill' : 'mk');\n    if (edited === 'bill') return h === 'pay' ? 'mk' : (h === 'mk' ? 'pay' : 'mk');\n    return h === 'bill' ? 'pay' : 'bill';\n  }\n  function applyTrio(edited) {\n    if (edited === 'mk') M = Math.max(1, num(mkIn, 1.5));\n    if (!armed && edited !== 'mk') {\n      var Pg = num(pay, 0);\n      if (Pg > 0) { M = num(bill, 0) \/ Pg; mkIn.value = r2(M); }\n      recalc(); return;\n    }\n    var d = !armed ? 'bill' : deriveFor(edited);\n    if (d === 'bill') bill.value = r2(num(pay, 0) * M);\n    else if (d === 'pay') pay.value = r2(num(bill, 0) \/ Math.max(0.01, M));\n    else { var P2 = num(pay, 0); if (P2 > 0) { M = num(bill, 0) \/ P2; mkIn.value = r2(M); } }\n    recalc();\n  }\n  pay.addEventListener('input', function () { applyTrio('pay'); });\n  bill.addEventListener('input', function () { applyTrio('bill'); });\n  mkIn.addEventListener('input', function () { applyTrio('mk'); });\n  \/* the checkbox IS the lock (Larry): checking a hold declares your\n     non-negotiable AND stamps the baseline; switching holds keeps it;\n     un-checking every hold disarms - that is the reset. *\/\n  [payHold, mkHold, billHold].forEach(function (cb) {\n    cb.addEventListener('change', function () {\n      if (cb.checked) {\n        [payHold, mkHold, billHold].forEach(function (o) { if (o !== cb) o.checked = false; });\n        if (!armed) {\n          armed = true;\n          P0 = num(pay, 0); B0 = num(bill, 0);\n          if (P0 > 0) { M = B0 \/ P0; mkIn.value = r2(M); }\n        }\n      } else if (holdName() === '') {\n        armed = false;\n      }\n      var st = $('rtbr-dealseg');\n      st.style.display = armed ? '' : 'none';\n      if (armed) st.innerHTML = 'Locked: splitting from pay <b>' + money(P0) + '<\/b> &middot; bill <b>' + money(B0) + '<\/b> &mdash; every rate move counts in the number below. Un-check the hold to reset the start.';\n      recalc();\n    });\n  });\n  otmk.addEventListener('input', function () { OTM = Math.max(1, num(otmk, 1.5)); recalc(otmk); });\n  otbill.addEventListener('input', function () { var OTP = num(pay, 0) * 1.5; if (OTP > 0) OTM = Math.max(1, num(otbill, 0) \/ OTP); recalc(otbill); });\n  hours.addEventListener('input', function () { hwk.value = r2(Math.max(0.5, num(hours, 8)) * Math.max(1, num(days, 5))); recalc(); });\n  days.addEventListener('input', function () { hwk.value = r2(Math.max(0.5, num(hours, 8)) * Math.max(1, num(days, 5))); recalc(); });\n  hwk.addEventListener('input', function () { hours.value = r2(Math.max(1, num(hwk, 40)) \/ Math.max(1, num(days, 5))); recalc(hwk); });\n  [need, given, pddays].forEach(function (el) { el.addEventListener('input', function () { recalc(); }); });\n  \/* burden fields carry the ALL-IN load - typing one means \"my total load\n     is X\": subtract the current give to recover the base fact. *\/\n  var giveNow = function () {\n    var mg = lastB - lastP, base = mg > 0 ? mg * Math.min(100, Math.max(0, bPct)) \/ 100 : 0;\n    return Math.min(Math.max(0, cDol), Math.max(0, mg - base));\n  };\n  bpct.addEventListener('input', function () { var mg = lastB - lastP; bPct = Math.max(0, num(bpct, 50) - (mg > 0 ? (giveNow() \/ mg) * 100 : 0)); marginCalc(bpct); });\n  bdol.addEventListener('input', function () { var mg = lastB - lastP; bPct = mg > 0 ? (Math.max(0, num(bdol, 0) - giveNow()) \/ mg) * 100 : 0; marginCalc(bdol); });\n  ppct.addEventListener('input', function () { var mg = lastB - lastP; var p = mg > 0 ? mg * Math.max(0, num(ppct, 0)) \/ 100 : 0; cDol = Math.max(0, mg - (mg * Math.min(100, Math.max(0, bPct)) \/ 100) - p); marginCalc(ppct); });\n  pdol.addEventListener('input', function () { var mg = lastB - lastP; cDol = Math.max(0, mg - (mg * Math.min(100, Math.max(0, bPct)) \/ 100) - Math.max(0, num(pdol, 0))); marginCalc(pdol); });\n  cdol.addEventListener('input', function () { cDol = Math.max(0, num(cdol, 0)); marginCalc(cdol); });\n  M = num(bill, 52.5) \/ Math.max(0.01, num(pay, 35));\n  mkIn.value = r2(M);\n  recalc();\n})();\n<\/script>\n    \n","protected":false},"excerpt":{"rendered":"","protected":false},"author":0,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_angie_page":false,"footnotes":""},"class_list":["post-1383","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/roadtrades.com\/es\/wp-json\/wp\/v2\/pages\/1383","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/roadtrades.com\/es\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/roadtrades.com\/es\/wp-json\/wp\/v2\/types\/page"}],"replies":[{"embeddable":true,"href":"https:\/\/roadtrades.com\/es\/wp-json\/wp\/v2\/comments?post=1383"}],"version-history":[{"count":1,"href":"https:\/\/roadtrades.com\/es\/wp-json\/wp\/v2\/pages\/1383\/revisions"}],"predecessor-version":[{"id":1384,"href":"https:\/\/roadtrades.com\/es\/wp-json\/wp\/v2\/pages\/1383\/revisions\/1384"}],"wp:attachment":[{"href":"https:\/\/roadtrades.com\/es\/wp-json\/wp\/v2\/media?parent=1383"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}