{"slug":"window-installation-estimate","lang":"en","category":"Window Replacement","subcategory":"windows costs","ui":{"inputs":[{"name":"item","label":"Project type","type":"select","required":true,"default_value":"double_hung","options":[{"value":"double_hung","label":"Double-hung"},{"value":"single_hung","label":"Single-hung"},{"value":"sliding","label":"Sliding"},{"value":"picture","label":"Picture (fixed)"},{"value":"casement","label":"Casement"},{"value":"awning","label":"Awning"},{"value":"bay","label":"Bay"},{"value":"bow","label":"Bow"}]},{"name":"quantity__double_hung","label":"Number of windows","type":"number","required":true,"default_value":10,"min":0.1,"max":1000,"unit":"units","help":"Enter the size in units.","show_if":{"item":["double_hung"]}},{"name":"quantity__single_hung","label":"Number of windows","type":"number","required":true,"default_value":10,"min":0.1,"max":1000,"unit":"units","help":"Enter the size in units.","show_if":{"item":["single_hung"]}},{"name":"quantity__sliding","label":"Number of windows","type":"number","required":true,"default_value":10,"min":0.1,"max":1000,"unit":"units","help":"Enter the size in units.","show_if":{"item":["sliding"]}},{"name":"quantity__picture","label":"Number of windows","type":"number","required":true,"default_value":10,"min":0.1,"max":1000,"unit":"units","help":"Enter the size in units.","show_if":{"item":["picture"]}},{"name":"quantity__casement","label":"Number of windows","type":"number","required":true,"default_value":10,"min":0.1,"max":1000,"unit":"units","help":"Enter the size in units.","show_if":{"item":["casement"]}},{"name":"quantity__awning","label":"Number of windows","type":"number","required":true,"default_value":10,"min":0.1,"max":1000,"unit":"units","help":"Enter the size in units.","show_if":{"item":["awning"]}},{"name":"quantity__bay","label":"Number of windows","type":"number","required":true,"default_value":10,"min":0.1,"max":1000,"unit":"units","help":"Enter the size in units.","show_if":{"item":["bay"]}},{"name":"quantity__bow","label":"Number of windows","type":"number","required":true,"default_value":1,"min":0.1,"max":1000,"unit":"units","help":"Enter the size in units.","show_if":{"item":["bow"]}},{"name":"frame_material","label":"Frame material","type":"select","required":true,"default_value":"vinyl","options":[{"value":"vinyl","label":"Vinyl"},{"value":"aluminum","label":"Aluminum"},{"value":"composite","label":"Composite"},{"value":"wood","label":"Wood"},{"value":"fiberglass","label":"Fiberglass"}],"show_if":{"item":["double_hung","single_hung","sliding","picture","casement","awning","bay","bow"]}},{"name":"glass","label":"Glass package","type":"select","required":true,"default_value":"double","options":[{"value":"double","label":"Double-pane"},{"value":"low_e","label":"Double-pane with Low-E coating"},{"value":"triple","label":"Triple-pane"}],"show_if":{"item":["double_hung","single_hung","sliding","picture","casement","awning","bay","bow"]}},{"name":"install_method","label":"Installation method","type":"select","required":true,"default_value":"insert","options":[{"value":"insert","label":"Insert (pocket): keeps the existing frame"},{"value":"full_frame","label":"Full-frame: old frame removed"}],"show_if":{"item":["double_hung","single_hung","sliding","picture","casement","awning","bay","bow"]}},{"name":"access","label":"Window location","type":"select","required":true,"default_value":"ground","options":[{"value":"ground","label":"Ground floor or easy access"},{"value":"second","label":"Second floor"},{"value":"third","label":"Third floor or hard to reach (lift or scaffolding)"}],"show_if":{"item":["double_hung","single_hung","sliding","picture","casement","awning","bay","bow"]}},{"name":"frame_repair","label":"Rotted frame or sill repair","type":"select","required":true,"default_value":"none","options":[{"value":"none","label":"Frames are sound"},{"value":"all","label":"Repair every opening"}],"show_if":{"item":["double_hung","single_hung","sliding","picture","casement","awning","bay","bow"]}},{"name":"permit","label":"Building permit","type":"select","required":true,"default_value":"none","options":[{"value":"none","label":"Not needed or already covered"},{"value":"yes","label":"Include a permit"}],"show_if":{"item":["double_hung","single_hung","sliding","picture","casement","awning","bay","bow"]}},{"name":"window_size","label":"Window size","type":"select","required":true,"default_value":"standard","options":[{"value":"standard","label":"Standard (about 3 ft x 5 ft)"},{"value":"large","label":"Large"},{"value":"custom","label":"Custom or oversized"}],"show_if":{"item":["double_hung","single_hung","sliding","picture","casement","awning","bay","bow"]}},{"name":"trim","label":"Trim and exterior capping","type":"select","required":true,"default_value":"none","options":[{"value":"none","label":"Keep existing trim"},{"value":"interior","label":"New interior trim"},{"value":"exterior","label":"Exterior capping (aluminum or vinyl wrap)"},{"value":"both","label":"Both"}],"show_if":{"item":["double_hung","single_hung","sliding","picture","casement","awning","bay","bow"]}},{"name":"quality","label":"Material / finish quality","type":"select","required":true,"default_value":"standard","options":[{"value":"basic","label":"Basic / budget"},{"value":"standard","label":"Standard"},{"value":"premium","label":"Premium / high-end"}]},{"name":"state","label":"Location (state or metro area)","type":"select","required":true,"default_value":"US","options":[{"value":"US","label":"National average"},{"value":"AL","label":"Alabama (AL)"},{"value":"AK","label":"Alaska (AK)"},{"value":"AZ","label":"Arizona (AZ)"},{"value":"AR","label":"Arkansas (AR)"},{"value":"CA","label":"California (CA)"},{"value":"CO","label":"Colorado (CO)"},{"value":"CT","label":"Connecticut (CT)"},{"value":"DE","label":"Delaware (DE)"},{"value":"FL","label":"Florida (FL)"},{"value":"GA","label":"Georgia (GA)"},{"value":"HI","label":"Hawaii (HI)"},{"value":"ID","label":"Idaho (ID)"},{"value":"IL","label":"Illinois (IL)"},{"value":"IN","label":"Indiana (IN)"},{"value":"IA","label":"Iowa (IA)"},{"value":"KS","label":"Kansas (KS)"},{"value":"KY","label":"Kentucky (KY)"},{"value":"LA","label":"Louisiana (LA)"},{"value":"ME","label":"Maine (ME)"},{"value":"MD","label":"Maryland (MD)"},{"value":"MA","label":"Massachusetts (MA)"},{"value":"MI","label":"Michigan (MI)"},{"value":"MN","label":"Minnesota (MN)"},{"value":"MS","label":"Mississippi (MS)"},{"value":"MO","label":"Missouri (MO)"},{"value":"MT","label":"Montana (MT)"},{"value":"NE","label":"Nebraska (NE)"},{"value":"NV","label":"Nevada (NV)"},{"value":"NH","label":"New Hampshire (NH)"},{"value":"NJ","label":"New Jersey (NJ)"},{"value":"NM","label":"New Mexico (NM)"},{"value":"NY","label":"New York (NY)"},{"value":"NC","label":"North Carolina (NC)"},{"value":"ND","label":"North Dakota (ND)"},{"value":"OH","label":"Ohio (OH)"},{"value":"OK","label":"Oklahoma (OK)"},{"value":"OR","label":"Oregon (OR)"},{"value":"PA","label":"Pennsylvania (PA)"},{"value":"RI","label":"Rhode Island (RI)"},{"value":"SC","label":"South Carolina (SC)"},{"value":"SD","label":"South Dakota (SD)"},{"value":"TN","label":"Tennessee (TN)"},{"value":"TX","label":"Texas (TX)"},{"value":"UT","label":"Utah (UT)"},{"value":"VT","label":"Vermont (VT)"},{"value":"VA","label":"Virginia (VA)"},{"value":"WA","label":"Washington (WA)"},{"value":"WV","label":"West Virginia (WV)"},{"value":"WI","label":"Wisconsin (WI)"},{"value":"WY","label":"Wyoming (WY)"},{"value":"DC","label":"District of Columbia (DC)"},{"value":"M10420","label":"Akron, OH (metro)"},{"value":"M10580","label":"Albany-Schenectady-Troy, NY (metro)"},{"value":"M10740","label":"Albuquerque, NM (metro)"},{"value":"M10900","label":"Allentown-Bethlehem-Easton, PA-NJ (metro)"},{"value":"M11260","label":"Anchorage, AK (metro)"},{"value":"M12060","label":"Atlanta-Sandy Springs-Alpharetta, GA (metro)"},{"value":"M12260","label":"Augusta-Richmond County, GA-SC (metro)"},{"value":"M12420","label":"Austin-Round Rock-San Marcos, TX (metro)"},{"value":"M12540","label":"Bakersfield-Delano, CA (metro)"},{"value":"M12580","label":"Baltimore-Columbia-Towson, MD (metro)"},{"value":"M12940","label":"Baton Rouge, LA (metro)"},{"value":"M13820","label":"Birmingham-Hoover, AL (metro)"},{"value":"M14260","label":"Boise City, ID (metro)"},{"value":"M14460","label":"Boston-Cambridge-Newton, MA-NH (metro)"},{"value":"M14860","label":"Bridgeport-Stamford-Norwalk, CT (metro)"},{"value":"M15380","label":"Buffalo-Cheektowaga, NY (metro)"},{"value":"M15980","label":"Cape Coral-Fort Myers, FL (metro)"},{"value":"M16700","label":"Charleston-North Charleston, SC (metro)"},{"value":"M16740","label":"Charlotte-Concord-Gastonia, NC-SC (metro)"},{"value":"M16860","label":"Chattanooga, TN-GA (metro)"},{"value":"M16980","label":"Chicago-Naperville-Elgin, IL-IN-WI (metro)"},{"value":"M17140","label":"Cincinnati, OH-KY-IN (metro)"},{"value":"M17410","label":"Cleveland, OH (metro)"},{"value":"M17820","label":"Colorado Springs, CO (metro)"},{"value":"M17900","label":"Columbia, SC (metro)"},{"value":"M18140","label":"Columbus, OH (metro)"},{"value":"M18580","label":"Corpus Christi, TX (metro)"},{"value":"M19100","label":"Dallas-Fort Worth-Arlington, TX (metro)"},{"value":"M19660","label":"Deltona-Daytona Beach-Ormond Beach, FL (metro)"},{"value":"M19740","label":"Denver-Aurora-Lakewood, CO (metro)"},{"value":"M19780","label":"Des Moines-West Des Moines, IA (metro)"},{"value":"M19820","label":"Detroit-Warren-Dearborn, MI (metro)"},{"value":"M20500","label":"Durham-Chapel Hill, NC (metro)"},{"value":"M21340","label":"El Paso, TX (metro)"},{"value":"M22020","label":"Fargo, ND-MN (metro)"},{"value":"M22180","label":"Fayetteville, NC (metro)"},{"value":"M23060","label":"Fort Wayne, IN (metro)"},{"value":"M23420","label":"Fresno, CA (metro)"},{"value":"M24340","label":"Grand Rapids-Wyoming-Kentwood, MI (metro)"},{"value":"M24660","label":"Greensboro-High Point, NC (metro)"},{"value":"M24860","label":"Greenville-Anderson-Greer, SC (metro)"},{"value":"M25060","label":"Gulfport-Biloxi, MS (metro)"},{"value":"M25420","label":"Harrisburg-Carlisle, PA (metro)"},{"value":"M25540","label":"Hartford-West Hartford-East Hartford, CT (metro)"},{"value":"M26420","label":"Houston-The Woodlands-Sugar Land, TX (metro)"},{"value":"M26620","label":"Huntsville, AL (metro)"},{"value":"M26900","label":"Indianapolis-Carmel-Anderson, IN (metro)"},{"value":"M27140","label":"Jackson, MS (metro)"},{"value":"M27260","label":"Jacksonville, FL (metro)"},{"value":"M28140","label":"Kansas City, MO-KS (metro)"},{"value":"M28940","label":"Knoxville, TN (metro)"},{"value":"M29460","label":"Lakeland-Winter Haven, FL (metro)"},{"value":"M29540","label":"Lancaster, PA (metro)"},{"value":"M29620","label":"Lansing-East Lansing, MI (metro)"},{"value":"M29740","label":"Las Cruces, NM (metro)"},{"value":"M29820","label":"Las Vegas-Henderson-Paradise, NV (metro)"},{"value":"M30460","label":"Lexington-Fayette, KY (metro)"},{"value":"M30780","label":"Little Rock-North Little Rock-Conway, AR (metro)"},{"value":"M31080","label":"Los Angeles-Long Beach-Anaheim, CA (metro)"},{"value":"M31140","label":"Louisville/Jefferson County, KY-IN (metro)"},{"value":"M31540","label":"Madison, WI (metro)"},{"value":"M31700","label":"Manchester-Nashua, NH (metro)"},{"value":"M32580","label":"McAllen-Edinburg-Mission, TX (metro)"},{"value":"M32820","label":"Memphis, TN-MS-AR (metro)"},{"value":"M33100","label":"Miami-Fort Lauderdale-West Palm Beach, FL (metro)"},{"value":"M33340","label":"Milwaukee-Waukesha, WI (metro)"},{"value":"M33460","label":"Minneapolis-St. Paul-Bloomington, MN-WI (metro)"},{"value":"M33660","label":"Mobile, AL (metro)"},{"value":"M33700","label":"Modesto, CA (metro)"},{"value":"M34980","label":"Nashville-Davidson-Murfreesboro-Franklin, TN (metro)"},{"value":"M35300","label":"New Haven, CT (metro)"},{"value":"M35380","label":"New Orleans-Metairie, LA (metro)"},{"value":"M35620","label":"New York-Newark-Jersey City, NY-NJ-PA (metro)"},{"value":"M35840","label":"North Port-Bradenton-Sarasota, FL (metro)"},{"value":"M36100","label":"Ocala, FL (metro)"},{"value":"M36420","label":"Oklahoma City, OK (metro)"},{"value":"M36540","label":"Omaha, NE-IA (metro)"},{"value":"M36740","label":"Orlando-Kissimmee-Sanford, FL (metro)"},{"value":"M37100","label":"Oxnard-Thousand Oaks-Ventura, CA (metro)"},{"value":"M37340","label":"Palm Bay-Melbourne-Titusville, FL (metro)"},{"value":"M37860","label":"Pensacola-Ferry Pass-Brent, FL (metro)"},{"value":"M37980","label":"Philadelphia-Camden-Wilmington, PA-NJ-DE-MD (metro)"},{"value":"M38060","label":"Phoenix-Mesa-Chandler, AZ (metro)"},{"value":"M38300","label":"Pittsburgh, PA (metro)"},{"value":"M38940","label":"Port St. Lucie, FL (metro)"},{"value":"M38860","label":"Portland-South Portland, ME (metro)"},{"value":"M38900","label":"Portland-Vancouver-Hillsboro, OR-WA (metro)"},{"value":"M39300","label":"Providence-Warwick, RI-MA (metro)"},{"value":"M39340","label":"Provo-Orem-Lehi, UT (metro)"},{"value":"M39580","label":"Raleigh-Cary, NC (metro)"},{"value":"M39900","label":"Reno, NV (metro)"},{"value":"M40060","label":"Richmond, VA (metro)"},{"value":"M40140","label":"Riverside-San Bernardino-Ontario, CA (metro)"},{"value":"M40380","label":"Rochester, NY (metro)"},{"value":"M40900","label":"Sacramento-Roseville-Folsom, CA (metro)"},{"value":"M41420","label":"Salem, OR (metro)"},{"value":"M41620","label":"Salt Lake City-Murray, UT (metro)"},{"value":"M41700","label":"San Antonio-New Braunfels, TX (metro)"},{"value":"M41740","label":"San Diego-Chula Vista-Carlsbad, CA (metro)"},{"value":"M41860","label":"San Francisco-Oakland-Berkeley, CA (metro)"},{"value":"M41940","label":"San Jose-Sunnyvale-Santa Clara, CA (metro)"},{"value":"M42220","label":"Santa Rosa-Petaluma, CA (metro)"},{"value":"M42340","label":"Savannah, GA (metro)"},{"value":"M42540","label":"Scranton--Wilkes-Barre, PA (metro)"},{"value":"M42660","label":"Seattle-Tacoma-Bellevue, WA (metro)"},{"value":"M43340","label":"Shreveport-Bossier City, LA (metro)"},{"value":"M43620","label":"Sioux Falls, SD (metro)"},{"value":"M44060","label":"Spokane-Spokane Valley, WA (metro)"},{"value":"M41180","label":"St. Louis, MO-IL (metro)"},{"value":"M44700","label":"Stockton, CA (metro)"},{"value":"M45060","label":"Syracuse, NY (metro)"},{"value":"M45300","label":"Tampa-St. Petersburg-Clearwater, FL (metro)"},{"value":"M45780","label":"Toledo, OH (metro)"},{"value":"M45940","label":"Trenton-Princeton, NJ (metro)"},{"value":"M46060","label":"Tucson, AZ (metro)"},{"value":"M46140","label":"Tulsa, OK (metro)"},{"value":"M46520","label":"Urban Honolulu, HI (metro)"},{"value":"M47260","label":"Virginia Beach-Norfolk-Newport News, VA-NC (metro)"},{"value":"M47900","label":"Washington-Arlington-Alexandria, DC-VA-MD-WV (metro)"},{"value":"M48620","label":"Wichita, KS (metro)"},{"value":"M49180","label":"Winston-Salem, NC (metro)"},{"value":"M49340","label":"Worcester, MA-CT (metro)"},{"value":"M49660","label":"Youngstown-Warren, OH (metro)"}],"help":"Labor costs vary by state and metro area (a metro area replaces the state figure); material costs are assumed nationwide."},{"name":"diy","label":"I will do the labor myself (DIY)","type":"checkbox","required":false,"default_value":false,"help":"Removes the labor portion of the estimate and shows the estimated savings."}]},"logic_script":"var QTY_MAX = {\"sq_ft\":100000,\"square\":1000,\"each\":1000,\"linear_ft\":10000,\"hour\":2000};\nvar QTY_MAX_LABEL = {\"sq_ft\":\"100,000\",\"square\":\"1,000\",\"each\":\"1,000\",\"linear_ft\":\"10,000\",\"hour\":\"2,000\"};\nvar UNIT_ONE = {\"sq_ft\":\"sq ft\",\"square\":\"roofing square (100 sq ft)\",\"each\":\"unit\",\"linear_ft\":\"linear ft\",\"hour\":\"hour\",\"project\":\"project\"};\nvar UNIT_MANY = {\"sq_ft\":\"sq ft\",\"square\":\"roofing squares\",\"each\":\"units\",\"linear_ft\":\"linear ft\",\"hour\":\"hours\",\"project\":\"projects\"};\nvar QUALITY_LABEL = {\"basic\":\"Basic / budget\",\"standard\":\"Standard\",\"premium\":\"Premium / high-end\"};\nvar QUALITY = {\"basic\":0.85,\"standard\":1,\"premium\":1.3};\nfunction selOpt(mod, value) {\n  for (var i = 0; i < mod.options.length; i++) { if (mod.options[i].value === value) return mod.options[i]; }\n  for (var i = 0; i < mod.options.length; i++) { if (mod.options[i].value === mod.default) return mod.options[i]; }\n  return null;\n}\nfunction applyMods(itemId, qty, steps) {\n  var matProd = 1, laborProd = 1, addM = [0, 0, 0], addL = [0, 0, 0];\n  var mods = data.modifiers || [];\n  for (var i = 0; i < mods.length; i++) {\n    var m = mods[i];\n    if (m.kind === 'qty_tier' && m.applies_to.indexOf(itemId) !== -1) {\n      var tier = null;\n      for (var ti = 0; ti < m.tiers.length; ti++) { if (qty >= m.tiers[ti].min_qty && (!tier || m.tiers[ti].min_qty > tier.min_qty)) tier = m.tiers[ti]; }\n      if (tier) {\n        var tl = tier.labor_mult !== undefined ? tier.labor_mult : 1;\n        var tm = tier.material_mult !== undefined ? tier.material_mult : 1;\n        laborProd *= tl; matProd *= tm;\n        var tparts = [];\n        if (tl !== 1) tparts.push('labor x' + tl);\n        if (tm !== 1) tparts.push('materials x' + tm);\n        steps.push(m.label + ': ' + tier.min_qty + ' or more qualifies (' + tparts.join(', ') + ')' + (tier.basis === 'reasoned' ? ' (estimate adjustment' + (tier.rationale ? ': ' + tier.rationale : '') + ')' : '') + '.');\n      }\n      continue;\n    }\n    if (m.kind !== 'select' || m.applies_to.indexOf(itemId) === -1) continue;\n    var val = inputs[m.id]; if (val === undefined || val === null || val === '') val = m.default;\n    var opt = selOpt(m, val);\n    if (!opt) continue;\n    var lm = opt.labor_mult !== undefined ? opt.labor_mult : 1;\n    var mm = opt.material_mult !== undefined ? opt.material_mult : 1;\n    laborProd *= lm; matProd *= mm;\n    if (opt.add) {\n      var per = opt.add.per === 'qty' ? qty : 1;\n      var lsA = opt.add.labor_share;\n      addM[0] += opt.add.low * (1 - lsA) * per; addM[1] += opt.add.mid * (1 - lsA) * per; addM[2] += opt.add.high * (1 - lsA) * per;\n      addL[0] += opt.add.low * lsA * per; addL[1] += opt.add.mid * lsA * per; addL[2] += opt.add.high * lsA * per;\n    }\n    if (opt.value !== m.default) {\n      steps.push(m.label + ': ' + opt.label + (opt.basis === 'reasoned' ? ' (estimate adjustment' + (opt.rationale ? ': ' + opt.rationale : '') + ')' : '') + '.');\n    }\n  }\n  return { matProd: matProd, laborProd: laborProd, addM: addM, addL: addL };\n}\n// Un paso de cantidad/info: acc <op> (by x scale). \"by\" numerico o id de un valor de \"vals\".\nfunction stepApply(acc, st, vals) {\n  var by = typeof st.by === 'number' ? st.by : vals[st.by];\n  if (st.scale !== undefined) by = by * st.scale;\n  if (st.op === 'mul') return acc * by;\n  if (st.op === 'div') return acc / by;\n  if (st.op === 'add') return acc + by;\n  return acc - by;\n}\n// Entrada compartida (data.shared_inputs) por id.\nfunction sharedById(id) {\n  var list = data.shared_inputs || [];\n  for (var i = 0; i < list.length; i++) { if (list[i].id === id) return list[i]; }\n  return null;\n}\n// Devuelve { found, qty, invalidField }: found=false = itemId no tiene DerivedQty (usar la\n// cantidad manual de siempre); found=true, qty=null = SI tiene, pero el resultado no es un numero\n// utilizable (entradas extremas -> overflow a Infinity, o <= 0): antes se dejaba pasar y\n// aparecia 'Infinity'/el guion largo en steps/footprint (el fuzzing de validateToolLogic lo\n// detecta como salida invalida sin marcar el campo culpable, CA bloqueante).\nfunction derivedFor(itemId, steps) {\n  var mods = data.modifiers || [];\n  for (var i = 0; i < mods.length; i++) {\n    var m = mods[i];\n    if (m.kind !== 'derived' || m.item !== itemId) continue;\n    var vals = {};\n    // Entradas: primero las compartidas (campo shared__<id>, una sola vez en la UI), luego las propias.\n    var specs = [];\n    var sh = m.shared || [];\n    for (var q = 0; q < sh.length; q++) { var si = sharedById(sh[q]); specs.push({ id: sh[q], field: 'shared__' + sh[q], def: si ? si.default : 1 }); }\n    for (var j = 0; j < m.inputs.length; j++) { specs.push({ id: m.inputs[j].id, field: m.id + '__' + m.inputs[j].id, def: m.inputs[j].default }); }\n    for (var j = 0; j < specs.length; j++) {\n      var raw = inputs[specs[j].field];\n      // Campo ausente (p. ej. un test_case que no lo nombra): valor por defecto. Presente pero no\n      // numérico o ≤ 0 (\"abc\", vacío): se señala en su campo; antes se sustituía en silencio por el\n      // valor por defecto y el usuario no veía el error (smoke-test de painting, 29/09).\n      if (raw === undefined || raw === null) { vals[specs[j].id] = specs[j].def; continue; }\n      var v = lib.numEn(raw);\n      if (!isFinite(v) || v <= 0) return { found: true, qty: null, invalidField: specs[j].field };\n      vals[specs[j].id] = v;\n    }\n    var acc = vals[specs[0].id];\n    for (var k = 0; k < m.steps.length; k++) acc = stepApply(acc, m.steps[k], vals);\n    if (m.round === 'ceil') acc = Math.ceil(acc);\n    if (!isFinite(acc) || acc <= 0) return { found: true, qty: null, invalidField: specs[0].field };\n    steps.push(m.label + ': ' + lib.round(acc, 2) + ' ' + m.unit + '.');\n    return { found: true, qty: acc, invalidField: null };\n  }\n  return { found: false, qty: null, invalidField: null };\n}\n// Salidas informativas (modifiers kind 'info') de la partida: parten de su cantidad final y no\n// cambian el coste. \"by\" numerico, id de un select con valores numericos o input (propio o\n// compartido) de su DerivedQty. Devuelve una lista { label, unit, value }.\nfunction infoValuesFor(itemId, qty) {\n  var out = [];\n  var mods = data.modifiers || [];\n  for (var i = 0; i < mods.length; i++) {\n    var m = mods[i];\n    if (m.kind !== 'info' || m.item !== itemId) continue;\n    var vals = {};\n    for (var j = 0; j < mods.length; j++) {\n      var d = mods[j];\n      if (d.kind === 'select') { var sv = inputs[d.id]; vals[d.id] = Number((sv === undefined || sv === null || sv === '') ? d.default : sv); }\n      else if (d.kind === 'derived' && d.item === itemId) {\n        var dsh = d.shared || [];\n        for (var k = 0; k < dsh.length; k++) {\n          var sv2 = inputs['shared__' + dsh[k]]; var sdef = sharedById(dsh[k]);\n          vals[dsh[k]] = (sv2 === undefined || sv2 === null) ? (sdef ? sdef.default : 1) : lib.numEn(sv2);\n        }\n        for (var k = 0; k < d.inputs.length; k++) {\n          var iv = inputs[d.id + '__' + d.inputs[k].id];\n          vals[d.inputs[k].id] = (iv === undefined || iv === null) ? d.inputs[k].default : lib.numEn(iv);\n        }\n      }\n    }\n    var acc = qty;\n    for (var s = 0; s < m.steps.length; s++) acc = stepApply(acc, m.steps[s], vals);\n    if (m.round === 'ceil') acc = Math.ceil(acc);\n    if (!isFinite(acc)) continue;\n    out.push({ label: m.label, unit: m.unit, value: acc });\n  }\n  return out;\n}\nfunction infoRowsFor(itemId, qty, result, steps) {\n  var rows = infoValuesFor(itemId, qty);\n  for (var r = 0; r < rows.length; r++) {\n    result[rows[r].label] = lib.round(rows[r].value, 2) + ' ' + rows[r].unit;\n    steps.push(rows[r].label + ': ' + lib.round(rows[r].value, 2) + ' ' + rows[r].unit + '.');\n  }\n}\n// Cobro minimo (data.minimum_charge): low/mid/high nunca bajan de esas cifras (no aplica si todo es\n// DIY). Lo que se sube se cuenta como mano de obra para que Materials + Labor cuadre con el total.\nfunction applyMin(t, allDiy, steps) {\n  var mc = data.minimum_charge;\n  if (!mc || allDiy) return t;\n  var low = Math.max(t.low, mc.low), mid = Math.max(t.mid, mc.mid), high = Math.max(t.high, mc.high);\n  if (mid !== t.mid) {\n    steps.push('Minimum charge: most contractors bill at least ' + lib.usd(mc.mid) + ' for a job like this, so the typical cost is raised from ' + lib.usd(t.mid) + ' to ' + lib.usd(mid) + '.');\n  } else if (low !== t.low || high !== t.high) {\n    steps.push('Minimum charge: the low and high estimates are raised to ' + lib.usd(low) + ' and ' + lib.usd(high) + '.');\n  }\n  return { low: low, mid: mid, high: high, matMid: t.matMid, labMid: t.labMid + (mid - t.mid), savedLabor: t.savedLabor };\n}\nfunction ratioFor(state) {\n  var ratio = 1, place = 'the U.S. (national average)';\n  if (table && table.rows) { for (var r = 0; r < table.rows.length; r++) { if (table.rows[r][0] === state) { ratio = Number(table.rows[r][2]); if (state !== 'US') place = String(table.rows[r][1]); break; } } }\n  if (!isFinite(ratio) || ratio <= 0) ratio = 1;\n  return { ratio: ratio, place: place };\n}\nfunction computeItem(item, qty, qMult, ratio, diyAllowed, diy, steps) {\n  var mods = applyMods(item.id, qty, steps);\n  var ls = item.labor_share;\n  var baseLow = qty * item.low * qMult, baseMid = qty * item.mid * qMult, baseHigh = qty * item.high * qMult;\n  var matLow = baseLow * (1 - ls) * mods.matProd + mods.addM[0];\n  var matMid = baseMid * (1 - ls) * mods.matProd + mods.addM[1];\n  var matHigh = baseHigh * (1 - ls) * mods.matProd + mods.addM[2];\n  var labLow = baseLow * ls * mods.laborProd * ratio + mods.addL[0] * ratio;\n  var labMid = baseMid * ls * mods.laborProd * ratio + mods.addL[1] * ratio;\n  var labHigh = baseHigh * ls * mods.laborProd * ratio + mods.addL[2] * ratio;\n  var doDiy = diyAllowed && diy;\n  return {\n    low: doDiy ? matLow : matLow + labLow, mid: doDiy ? matMid : matMid + labMid, high: doDiy ? matHigh : matHigh + labHigh,\n    matMid: matMid, labMid: doDiy ? 0 : labMid, savedLabor: labMid\n  };\n}\nvar item = null;\nfor (var i = 0; i < data.items.length; i++) { if (data.items[i].id === inputs.item) { item = data.items[i]; break; } }\nif (!item) return { result: 'Select a valid option.', footprint: 'No cost data available for that choice.', invalid: 'item' };\nvar derivedSteps = [];\nvar derived = derivedFor(item.id, derivedSteps);\nvar qty;\nif (derived.found) {\n  if (derived.qty === null) return { result: 'Enter valid measurements greater than 0.', footprint: 'Waiting for valid measurements.', invalid: derived.invalidField };\n  qty = derived.qty;\n} else {\n  var qtyField = 'quantity__' + item.id;\n  qty = item.unit === 'project' ? 1 : lib.numEn(inputs[qtyField]);\n  if (!isFinite(qty) || qty <= 0) return { result: 'Enter a project size greater than 0.', footprint: 'Waiting for a valid project size.', invalid: qtyField };\n  if (QTY_MAX[item.unit] && qty > QTY_MAX[item.unit]) return { result: 'Enter ' + QTY_MAX_LABEL[item.unit] + ' ' + UNIT_MANY[item.unit] + ' or less.', footprint: 'Waiting for a valid project size.', invalid: qtyField };\n}\nvar qMult = QUALITY[inputs.quality];\nif (!isFinite(qMult)) return { result: 'Select a valid quality level.', footprint: 'Waiting for a valid quality level.', invalid: 'quality' };\nvar rf = ratioFor(inputs.state);\nvar ratio = rf.ratio, place = rf.place;\nvar itemDiyOk = item.diy_allowed !== false;\nvar diy = itemDiyOk && (inputs.diy === true || inputs.diy === 'true');\nvar modSteps = [];\nvar comp = computeItem(item, qty, qMult, ratio, itemDiyOk, diy, modSteps);\nvar minSteps = [];\ncomp = applyMin(comp, diy, minSteps);\nvar result = {\n  'Typical cost': lib.usd(comp.mid),\n  'Low estimate': lib.usd(comp.low),\n  'High estimate': lib.usd(comp.high),\n  'Materials': lib.usd(comp.matMid),\n  'Labor': lib.usd(comp.labMid)\n};\nif (diy) result['DIY labor savings'] = lib.usd(comp.savedLabor);\nvar unitOne = item.unit_name || UNIT_ONE[item.unit] || item.unit;\nvar unitQty = qty === 1 ? unitOne : (item.unit_name ? item.unit_name + 's' : (UNIT_MANY[item.unit] || item.unit));\nif (qty > 1) { var pu = comp.mid / qty; result['Typical cost per ' + unitOne] = lib.usd(pu, pu < 100 ? 2 : 0); }\nvar infoSteps = [];\ninfoRowsFor(item.id, qty, result, infoSteps);\nvar qLabel = QUALITY_LABEL[inputs.quality] || inputs.quality;\nvar steps = [\n  'National typical price for ' + item.label + ': ' + lib.usd(item.mid, item.mid < 100 ? 2 : 0) + ' per ' + unitOne + '.'\n];\nsteps = steps.concat(derivedSteps);\nsteps.push(qty + ' ' + unitQty + ' x ' + lib.usd(item.mid, item.mid < 100 ? 2 : 0) + (qMult === 1 ? '' : ' x ' + qMult + ' (' + qLabel + ' quality)') + ' = ' + lib.usd(qty * item.mid * qMult) + '.');\nsteps = steps.concat(modSteps);\nsteps = steps.concat(infoSteps);\nsteps = steps.concat(minSteps);\nif (inputs.state && inputs.state !== 'US') {\n  var ls = item.labor_share;\n  var factor = ls * ratio + (1 - ls);\n  var pct = lib.round((ratio - 1) * 100, 1);\n  steps.push('Labor is ' + lib.round(ls * 100, 0) + '% of this job. Labor wages in ' + place + ' are ' + (pct === 0 ? 'the same as' : (Math.abs(pct) + '% ' + (pct > 0 ? 'above' : 'below'))) + ' the national average (BLS), so the total is adjusted x ' + lib.round(factor, 3) + '.');\n}\nsteps.push(diy ? ('DIY: labor removed, materials only = ' + lib.usd(comp.matMid) + '; estimated savings ' + lib.usd(comp.savedLabor) + '.') : ('Typical total: ' + lib.usd(comp.mid) + ' (range ' + lib.usd(comp.low) + ' to ' + lib.usd(comp.high) + ').'));\nvar footprint = item.label + ', ' + qty + ' ' + unitQty + ' in ' + place + ': typical cost ' + lib.usd(comp.mid) + (diy ? ' (DIY, labor removed)' : '') + '.';\nreturn { result: result, footprint: footprint, steps: steps };","reference_table":{"caption":"Regional labor cost adjustment (state or metro area wage vs. the national average, BLS OEWS)","headers":["Location","Name","Labor cost factor"],"rows":[["US","National average",1],["AL","Alabama",0.7541],["AK","Alaska",1.226],["AZ","Arizona",0.8987],["AR","Arkansas",0.7824],["CA","California",1.2008],["CO","Colorado",1.0085],["CT","Connecticut",1.0465],["DE","Delaware",0.9552],["FL","Florida",0.8009],["GA","Georgia",0.7663],["HI","Hawaii",1.3329],["ID","Idaho",0.8545],["IL","Illinois",1.2238],["IN","Indiana",0.9896],["IA","Iowa",0.8783],["KS","Kansas",0.906],["KY","Kentucky",0.8353],["LA","Louisiana",0.7862],["ME","Maine",0.9645],["MD","Maryland",1.052],["MA","Massachusetts",1.2141],["MI","Michigan",0.9468],["MN","Minnesota",1.0715],["MS","Mississippi",0.7509],["MO","Missouri",0.9904],["MT","Montana",0.9087],["NE","Nebraska",0.8374],["NV","Nevada",1.0552],["NH","New Hampshire",0.9767],["NJ","New Jersey",1.0969],["NM","New Mexico",0.8751],["NY","New York",1.1575],["NC","North Carolina",0.7696],["ND","North Dakota",0.8834],["OH","Ohio",0.9537],["OK","Oklahoma",0.7559],["OR","Oregon",1.08],["PA","Pennsylvania",0.9633],["RI","Rhode Island",0.98],["SC","South Carolina",0.8434],["SD","South Dakota",0.7821],["TN","Tennessee",0.8226],["TX","Texas",0.7769],["UT","Utah",0.8435],["VT","Vermont",0.9447],["VA","Virginia",0.844],["WA","Washington",1.2063],["WV","West Virginia",0.7701],["WI","Wisconsin",0.995],["WY","Wyoming",0.9043],["DC","District of Columbia",1.0055],["M10420","Akron, OH",0.9712],["M10580","Albany-Schenectady-Troy, NY",1.0136],["M10740","Albuquerque, NM",0.9037],["M10900","Allentown-Bethlehem-Easton, PA-NJ",0.9427],["M11260","Anchorage, AK",1.1982],["M12060","Atlanta-Sandy Springs-Alpharetta, GA",0.7864],["M12260","Augusta-Richmond County, GA-SC",0.8818],["M12420","Austin-Round Rock-San Marcos, TX",0.8205],["M12540","Bakersfield-Delano, CA",1.0879],["M12580","Baltimore-Columbia-Towson, MD",0.9837],["M12940","Baton Rouge, LA",0.8318],["M13820","Birmingham-Hoover, AL",0.7948],["M14260","Boise City, ID",0.8586],["M14460","Boston-Cambridge-Newton, MA-NH",1.2382],["M14860","Bridgeport-Stamford-Norwalk, CT",1.0192],["M15380","Buffalo-Cheektowaga, NY",0.9848],["M15980","Cape Coral-Fort Myers, FL",0.7957],["M16700","Charleston-North Charleston, SC",0.8342],["M16740","Charlotte-Concord-Gastonia, NC-SC",0.8144],["M16860","Chattanooga, TN-GA",0.8127],["M16980","Chicago-Naperville-Elgin, IL-IN-WI",1.2663],["M17140","Cincinnati, OH-KY-IN",0.9464],["M17410","Cleveland, OH",0.9936],["M17820","Colorado Springs, CO",0.933],["M17900","Columbia, SC",0.8115],["M18140","Columbus, OH",1.0308],["M18580","Corpus Christi, TX",0.7841],["M19100","Dallas-Fort Worth-Arlington, TX",0.7655],["M19660","Deltona-Daytona Beach-Ormond Beach, FL",0.7327],["M19740","Denver-Aurora-Lakewood, CO",1.0381],["M19780","Des Moines-West Des Moines, IA",0.9363],["M19820","Detroit-Warren-Dearborn, MI",1.0174],["M20500","Durham-Chapel Hill, NC",0.8022],["M21340","El Paso, TX",0.6762],["M22020","Fargo, ND-MN",0.901],["M22180","Fayetteville, NC",0.7501],["M23060","Fort Wayne, IN",0.9285],["M23420","Fresno, CA",1.0823],["M24340","Grand Rapids-Wyoming-Kentwood, MI",0.8877],["M24660","Greensboro-High Point, NC",0.7684],["M24860","Greenville-Anderson-Greer, SC",0.8415],["M25060","Gulfport-Biloxi, MS",0.7622],["M25420","Harrisburg-Carlisle, PA",0.9322],["M25540","Hartford-West Hartford-East Hartford, CT",1.0821],["M26420","Houston-The Woodlands-Sugar Land, TX",0.8076],["M26620","Huntsville, AL",0.7862],["M26900","Indianapolis-Carmel-Anderson, IN",1.0203],["M27140","Jackson, MS",0.7538],["M27260","Jacksonville, FL",0.8111],["M28140","Kansas City, MO-KS",1.0285],["M28940","Knoxville, TN",0.8155],["M29460","Lakeland-Winter Haven, FL",0.7225],["M29540","Lancaster, PA",0.8836],["M29620","Lansing-East Lansing, MI",0.9569],["M29740","Las Cruces, NM",0.8158],["M29820","Las Vegas-Henderson-Paradise, NV",1.0619],["M30460","Lexington-Fayette, KY",0.8476],["M30780","Little Rock-North Little Rock-Conway, AR",0.7652],["M31080","Los Angeles-Long Beach-Anaheim, CA",1.1976],["M31140","Louisville/Jefferson County, KY-IN",0.8758],["M31540","Madison, WI",1.0379],["M31700","Manchester-Nashua, NH",0.9755],["M32580","McAllen-Edinburg-Mission, TX",0.6325],["M32820","Memphis, TN-MS-AR",0.8132],["M33100","Miami-Fort Lauderdale-West Palm Beach, FL",0.8233],["M33340","Milwaukee-Waukesha, WI",1.0398],["M33460","Minneapolis-St. Paul-Bloomington, MN-WI",1.1362],["M33660","Mobile, AL",0.7657],["M33700","Modesto, CA",1.1373],["M34980","Nashville-Davidson-Murfreesboro-Franklin, TN",0.8644],["M35300","New Haven, CT",1.0792],["M35380","New Orleans-Metairie, LA",0.8123],["M35620","New York-Newark-Jersey City, NY-NJ-PA",1.2275],["M35840","North Port-Bradenton-Sarasota, FL",0.8298],["M36100","Ocala, FL",0.7353],["M36420","Oklahoma City, OK",0.8092],["M36540","Omaha, NE-IA",0.8623],["M36740","Orlando-Kissimmee-Sanford, FL",0.7833],["M37100","Oxnard-Thousand Oaks-Ventura, CA",1.1563],["M37340","Palm Bay-Melbourne-Titusville, FL",0.7626],["M37860","Pensacola-Ferry Pass-Brent, FL",0.7583],["M37980","Philadelphia-Camden-Wilmington, PA-NJ-DE-MD",1.0046],["M38060","Phoenix-Mesa-Chandler, AZ",0.92],["M38300","Pittsburgh, PA",1.0136],["M38940","Port St. Lucie, FL",0.7772],["M38860","Portland-South Portland, ME",1.0148],["M38900","Portland-Vancouver-Hillsboro, OR-WA",1.1876],["M39300","Providence-Warwick, RI-MA",1.0517],["M39340","Provo-Orem-Lehi, UT",0.8261],["M39580","Raleigh-Cary, NC",0.7841],["M39900","Reno, NV",1.025],["M40060","Richmond, VA",0.8155],["M40140","Riverside-San Bernardino-Ontario, CA",1.1202],["M40380","Rochester, NY",0.9557],["M40900","Sacramento-Roseville-Folsom, CA",1.1196],["M41420","Salem, OR",0.9608],["M41620","Salt Lake City-Murray, UT",0.874],["M41700","San Antonio-New Braunfels, TX",0.7538],["M41740","San Diego-Chula Vista-Carlsbad, CA",1.1769],["M41860","San Francisco-Oakland-Berkeley, CA",1.3657],["M41940","San Jose-Sunnyvale-Santa Clara, CA",1.3398],["M42220","Santa Rosa-Petaluma, CA",1.2712],["M42340","Savannah, GA",0.7055],["M42540","Scranton--Wilkes-Barre, PA",0.9448],["M42660","Seattle-Tacoma-Bellevue, WA",1.2808],["M43340","Shreveport-Bossier City, LA",0.7387],["M43620","Sioux Falls, SD",0.8066],["M44060","Spokane-Spokane Valley, WA",1.0286],["M41180","St. Louis, MO-IL",1.091],["M44700","Stockton, CA",1.1173],["M45060","Syracuse, NY",0.9948],["M45300","Tampa-St. Petersburg-Clearwater, FL",0.8269],["M45780","Toledo, OH",0.9535],["M45940","Trenton-Princeton, NJ",1.179],["M46060","Tucson, AZ",0.8223],["M46140","Tulsa, OK",0.7407],["M46520","Urban Honolulu, HI",1.3622],["M47260","Virginia Beach-Norfolk-Newport News, VA-NC",0.8281],["M47900","Washington-Arlington-Alexandria, DC-VA-MD-WV",1.0177],["M48620","Wichita, KS",0.8495],["M49180","Winston-Salem, NC",0.7786],["M49340","Worcester, MA-CT",1.1278],["M49660","Youngstown-Warren, OH",0.8938]]},"cost_data":{"trade":"windows","version":"v4","country":"us","currency":"USD","retrieved_at":"2026-09-29","labor_soc":"47-2031","diy_allowed":true,"mode":"single","items":[{"id":"double_hung","label":"Double-hung","unit":"each","low":300,"mid":650,"high":1350,"labor_share":0.3,"default_qty":10,"qty_label":"Number of windows","sources":[{"label":"Fixr - Window Replacement Cost","url":"https://www.fixr.com/costs/window-replacement","quote":"Double Hung $300 – $1,000","retrieved_at":"2026-09-29","low":300,"high":1000},{"label":"This Old House - Window Replacement Cost","url":"https://www.thisoldhouse.com/windows/window-replacement-cost","quote":"Double-hung ($551)","retrieved_at":"2026-09-29"},{"label":"Rooster Windows & Doors - Guide to Window Installation Costs","url":"https://www.roosterwindowsanddoors.com/blog/a-pane-in-the-glass-your-guide-to-window-installation-costs/","quote":"Double-Hung ($350 – $800)","retrieved_at":"2026-10-03","low":350,"high":800},{"label":"Clifton Exteriors - Cost of New Windows","url":"https://www.cliftonexteriors.com/cost-of-new-windows/","quote":"Double Hung: $650 - $1,350","retrieved_at":"2026-10-03","low":650,"high":1350}],"unit_name":"window"},{"id":"single_hung","label":"Single-hung","unit":"each","low":250,"mid":475,"high":940,"labor_share":0.3,"default_qty":10,"qty_label":"Number of windows","sources":[{"label":"Fixr - Window Replacement Cost","url":"https://www.fixr.com/costs/window-replacement","quote":"Single hung $250 – $700","retrieved_at":"2026-09-29","low":250,"high":700},{"label":"This Old House - Window Replacement Cost","url":"https://www.thisoldhouse.com/windows/window-replacement-cost","quote":"Single-hung ($474)","retrieved_at":"2026-09-29"},{"label":"Rooster Windows & Doors - Guide to Window Installation Costs","url":"https://www.roosterwindowsanddoors.com/blog/a-pane-in-the-glass-your-guide-to-window-installation-costs/","quote":"Single-Hung ($270 – $700)","retrieved_at":"2026-10-03","low":270,"high":700},{"label":"Clifton Exteriors - Cost of New Windows","url":"https://www.cliftonexteriors.com/cost-of-new-windows/","quote":"Single Hung: $300 - $940","retrieved_at":"2026-10-03","low":300,"high":940}],"unit_name":"window"},{"id":"sliding","label":"Sliding","unit":"each","low":325,"mid":950,"high":1750,"labor_share":0.3,"default_qty":10,"qty_label":"Number of windows","sources":[{"label":"Fixr - Window Replacement Cost","url":"https://www.fixr.com/costs/window-replacement","quote":"Sliding $700 – $1,500","retrieved_at":"2026-09-29","low":700,"high":1500},{"label":"This Old House - Window Replacement Cost","url":"https://www.thisoldhouse.com/windows/window-replacement-cost","quote":"Sliding ($531)","retrieved_at":"2026-09-29"},{"label":"Rooster Windows & Doors - Guide to Window Installation Costs","url":"https://www.roosterwindowsanddoors.com/blog/a-pane-in-the-glass-your-guide-to-window-installation-costs/","quote":"Sliding ($325 – $1,000)","retrieved_at":"2026-10-03","low":325,"high":1000},{"label":"Clifton Exteriors - Cost of New Windows","url":"https://www.cliftonexteriors.com/cost-of-new-windows/","quote":"Sliding: $850 - $1,750","retrieved_at":"2026-10-03","low":850,"high":1750}],"unit_name":"window"},{"id":"picture","label":"Picture (fixed)","unit":"each","low":300,"mid":950,"high":1600,"labor_share":0.3,"default_qty":10,"qty_label":"Number of windows","sources":[{"label":"Fixr - Window Replacement Cost","url":"https://www.fixr.com/costs/window-replacement","quote":"Picture $300 – $1,600","retrieved_at":"2026-09-29","low":300,"high":1600},{"label":"This Old House - Window Replacement Cost","url":"https://www.thisoldhouse.com/windows/window-replacement-cost","quote":"Picture ($540)","retrieved_at":"2026-09-29"},{"label":"Rooster Windows & Doors - Guide to Window Installation Costs","url":"https://www.roosterwindowsanddoors.com/blog/a-pane-in-the-glass-your-guide-to-window-installation-costs/","quote":"Picture ($300 – $1,000+)","retrieved_at":"2026-10-03","low":300,"high":1000},{"label":"Clifton Exteriors - Cost of New Windows","url":"https://www.cliftonexteriors.com/cost-of-new-windows/","quote":"Picture: $700 - $1,500","retrieved_at":"2026-10-03","low":700,"high":1500}],"unit_name":"window"},{"id":"casement","label":"Casement","unit":"each","low":400,"mid":900,"high":1750,"labor_share":0.3,"default_qty":10,"qty_label":"Number of windows","sources":[{"label":"Fixr - Window Replacement Cost","url":"https://www.fixr.com/costs/window-replacement","quote":"Casement $400 – $1,200","retrieved_at":"2026-09-29","low":400,"high":1200},{"label":"This Old House - Window Replacement Cost","url":"https://www.thisoldhouse.com/windows/window-replacement-cost","quote":"Casement ($529)","retrieved_at":"2026-09-29"},{"label":"Rooster Windows & Doors - Guide to Window Installation Costs","url":"https://www.roosterwindowsanddoors.com/blog/a-pane-in-the-glass-your-guide-to-window-installation-costs/","quote":"Casement ($500 – $1,200)","retrieved_at":"2026-10-03","low":500,"high":1200},{"label":"Clifton Exteriors - Cost of New Windows","url":"https://www.cliftonexteriors.com/cost-of-new-windows/","quote":"Casement: $850 - $1,750","retrieved_at":"2026-10-03","low":850,"high":1750}],"unit_name":"window"},{"id":"awning","label":"Awning","unit":"each","low":300,"mid":650,"high":1450,"labor_share":0.3,"default_qty":10,"qty_label":"Number of windows","sources":[{"label":"Fixr - Window Replacement Cost","url":"https://www.fixr.com/costs/window-replacement","quote":"Awning $300 – $800","retrieved_at":"2026-09-29","low":300,"high":800},{"label":"This Old House - Window Replacement Cost","url":"https://www.thisoldhouse.com/windows/window-replacement-cost","quote":"Awning ($545)","retrieved_at":"2026-09-29"},{"label":"Clifton Exteriors - Cost of New Windows","url":"https://www.cliftonexteriors.com/cost-of-new-windows/","quote":"Awning: $750 - $1,450","retrieved_at":"2026-10-03","low":750,"high":1450}],"unit_name":"window"},{"id":"bay","label":"Bay","unit":"each","low":1800,"mid":3500,"high":6000,"labor_share":0.3,"default_qty":10,"qty_label":"Number of windows","sources":[{"label":"Fixr - Window Replacement Cost","url":"https://www.fixr.com/costs/window-replacement","quote":"Bay $900 – $4,500","retrieved_at":"2026-09-29","low":900,"high":4500},{"label":"Windows by Toll - How Much Is a Bay Window","url":"https://windowsbytoll.com/how-much-is-a-bay-window/","quote":"Bay window replacement typically costs between $1,800 and $6,000","retrieved_at":"2026-10-03","low":1800,"high":6000},{"label":"American Quality Remodeling - How Much Do Bay Windows Cost","url":"https://americanqualityremodeling.com/blog/how-much-do-bay-windows-cost/","quote":"The national average for a bay window project sits around $3,500 per window installed","retrieved_at":"2026-10-03","low":3500,"high":3500},{"label":"Rooster Windows & Doors - Guide to Window Installation Costs","url":"https://www.roosterwindowsanddoors.com/blog/a-pane-in-the-glass-your-guide-to-window-installation-costs/","quote":"Bay and Bow ($1,500 – $7,000)","retrieved_at":"2026-10-03","low":1500,"high":7000}],"unit_name":"window"},{"id":"bow","label":"Bow","unit":"each","low":1500,"mid":3900,"high":8000,"labor_share":0.3,"default_qty":1,"qty_label":"Number of windows","sources":[{"label":"Fixr - Window Replacement Cost","url":"https://www.fixr.com/costs/window-replacement","quote":"Bow $1,500–$8,000","retrieved_at":"2026-09-29","low":1500,"high":8000},{"label":"This Old House - Bow Window Prices","url":"https://www.thisoldhouse.com/windows/bow-window-prices","quote":"Bow windows cost homeowners an average of $3,900 but typically range from $1,500–$15,000 per window.","retrieved_at":"2026-09-29","low":1500,"high":15000},{"label":"Rooster Windows & Doors - Bow Window Prices","url":"https://www.roosterwindowsanddoors.com/blog/bow-window-prices-and-installation-costs-explained/","quote":"Most homeowners pay somewhere between $1,810 and $3,859 for a standard bow window replacement","retrieved_at":"2026-10-03","low":1810,"high":3859}],"unit_name":"window"}],"modifiers":[{"kind":"select","id":"frame_material","label":"Frame material","applies_to":["double_hung","single_hung","sliding","picture","casement","awning","bay","bow"],"default":"vinyl","options":[{"value":"vinyl","label":"Vinyl","basis":"sourced","labor_mult":1,"material_mult":1,"sources":[{"label":"This Old House - Window Replacement Cost","url":"https://www.thisoldhouse.com/windows/window-replacement-cost","quote":"Vinyl $472","retrieved_at":"2026-09-29"}]},{"value":"aluminum","label":"Aluminum","basis":"sourced_ratio","labor_mult":1,"material_mult":0.96,"rationale":"Average installed aluminum window ($453) divided by vinyl ($472), This Old House.","sources":[{"label":"This Old House - Window Replacement Cost","url":"https://www.thisoldhouse.com/windows/window-replacement-cost","quote":"Aluminum $453","retrieved_at":"2026-09-29"}]},{"value":"composite","label":"Composite","basis":"sourced_ratio","labor_mult":1,"material_mult":1.087,"rationale":"Average installed composite window ($513) divided by vinyl ($472), This Old House.","sources":[{"label":"This Old House - Window Replacement Cost","url":"https://www.thisoldhouse.com/windows/window-replacement-cost","quote":"Composite $513","retrieved_at":"2026-09-29"}]},{"value":"wood","label":"Wood","basis":"sourced_ratio","labor_mult":1,"material_mult":1.153,"rationale":"Average installed wood window ($544) divided by vinyl ($472), This Old House.","sources":[{"label":"This Old House - Window Replacement Cost","url":"https://www.thisoldhouse.com/windows/window-replacement-cost","quote":"Wood $544","retrieved_at":"2026-09-29"}]},{"value":"fiberglass","label":"Fiberglass","basis":"sourced_ratio","labor_mult":1,"material_mult":1.195,"rationale":"Average installed fiberglass window ($564) divided by vinyl ($472), This Old House.","sources":[{"label":"This Old House - Window Replacement Cost","url":"https://www.thisoldhouse.com/windows/window-replacement-cost","quote":"Fiberglass $564","retrieved_at":"2026-09-29"}]}]},{"kind":"select","id":"glass","label":"Glass package","applies_to":["double_hung","single_hung","sliding","picture","casement","awning","bay","bow"],"default":"double","options":[{"value":"double","label":"Double-pane","basis":"sourced","labor_mult":1,"material_mult":1,"sources":[{"label":"This Old House - Window Replacement Cost","url":"https://www.thisoldhouse.com/windows/window-replacement-cost","quote":"Double-pane $529","retrieved_at":"2026-09-29"}]},{"value":"low_e","label":"Double-pane with Low-E coating","basis":"sourced","labor_mult":1,"material_mult":1.125,"rationale":"Midpoint of the 10–15% added over standard double pane.","sources":[{"label":"Five Seasons Windows - Double Pane vs Low-E Glass","url":"https://www.fiveseasonswindows.com/double-pane-vs-low-e-glass-energy-efficiency-performance-comparison","quote":"adding Low-E coatings increases costs by an additional 10-15% over standard double pane","retrieved_at":"2026-09-29"}]},{"value":"triple","label":"Triple-pane","basis":"sourced_ratio","labor_mult":1,"material_mult":1.151,"rationale":"Average triple-pane window ($609) divided by double-pane ($529), This Old House.","sources":[{"label":"This Old House - Window Replacement Cost","url":"https://www.thisoldhouse.com/windows/window-replacement-cost","quote":"Triple-pane $609","retrieved_at":"2026-09-29"}]}]},{"kind":"select","id":"install_method","label":"Installation method","applies_to":["double_hung","single_hung","sliding","picture","casement","awning","bay","bow"],"default":"insert","options":[{"value":"insert","label":"Insert (pocket): keeps the existing frame","basis":"sourced","labor_mult":1,"material_mult":1,"sources":[{"label":"This Old House - Full-Frame vs. Insert Replacement","url":"https://www.thisoldhouse.com/windows/full-frame-vs-insert-window-replacement","quote":"Insert or pocket replacement windows tend to cost between $100 and $400 each.","retrieved_at":"2026-09-29"}]},{"value":"full_frame","label":"Full-frame: old frame removed","basis":"sourced_ratio","add":{"low":80,"mid":590,"high":1100,"labor_share":0.8,"per":"qty"},"rationale":"Full-frame ($180–$1,500) minus insert ($100–$400) per window, This Old House: +$80 / +$590 (midpoints) / +$1,100.","sources":[{"label":"This Old House - Full-Frame vs. Insert Replacement","url":"https://www.thisoldhouse.com/windows/full-frame-vs-insert-window-replacement","quote":"Full-frame window replacement can cost anywhere from $180–$1,500 per window depending on the window’s size, type, and frame material.","retrieved_at":"2026-09-29"},{"label":"Constructly - Window Replacement Cost Calculator","url":"https://constructlytools.com/cost-estimators/window-replacement-cost-calculator/","quote":"Costs $150–$300 more per window but allows insulation upgrades and complete weatherproofing.","retrieved_at":"2026-09-29"}]}]},{"kind":"select","id":"access","label":"Window location","applies_to":["double_hung","single_hung","sliding","picture","casement","awning","bay","bow"],"default":"ground","options":[{"value":"ground","label":"Ground floor or easy access","basis":"sourced","labor_mult":1,"material_mult":1,"sources":[{"label":"Cobex - Window Replacement Cost","url":"https://cobexcg.com/how-much-does-it-cost-to-replace-windows/","quote":"Second-story or hard-to-reach windows: Can add $50 to $200 per window due to added equipment and safety precautions","retrieved_at":"2026-09-29"}]},{"value":"second","label":"Second floor","basis":"sourced","add":{"low":50,"mid":125,"high":200,"labor_share":1,"per":"qty"},"sources":[{"label":"Cobex - Window Replacement Cost","url":"https://cobexcg.com/how-much-does-it-cost-to-replace-windows/","quote":"Second-story or hard-to-reach windows: Can add $50 to $200 per window due to added equipment and safety precautions","retrieved_at":"2026-09-29"}]},{"value":"third","label":"Third floor or hard to reach (lift or scaffolding)","basis":"sourced","labor_mult":1.5,"material_mult":1,"rationale":"Upper end of the 25-50% extra labor per window for work above the first floor.","sources":[{"label":"Smith Rock - Cost to Replace Windows","url":"https://smithrock-roofing.com/cost-to-replace-windows/","quote":"Working on second stories or higher is more complex and requires extra safety equipment like scaffolding or lifts, adding 25-50% to the labor cost per window.","retrieved_at":"2026-09-29"}]}]},{"kind":"select","id":"frame_repair","label":"Rotted frame or sill repair","applies_to":["double_hung","single_hung","sliding","picture","casement","awning","bay","bow"],"default":"none","options":[{"value":"none","label":"Frames are sound","basis":"sourced","labor_mult":1,"material_mult":1,"sources":[{"label":"Cobex - Window Replacement Cost","url":"https://cobexcg.com/how-much-does-it-cost-to-replace-windows/","quote":"Wood rot repair or framing damage: May add $300 to $800 per opening","retrieved_at":"2026-09-29"}]},{"value":"all","label":"Repair every opening","basis":"sourced","add":{"low":300,"mid":550,"high":800,"labor_share":0.8,"per":"qty"},"sources":[{"label":"Cobex - Window Replacement Cost","url":"https://cobexcg.com/how-much-does-it-cost-to-replace-windows/","quote":"Wood rot repair or framing damage: May add $300 to $800 per opening","retrieved_at":"2026-09-29"},{"label":"Smith Rock - Cost to Replace Windows","url":"https://smithrock-roofing.com/cost-to-replace-windows/","quote":"Repairing this damage requires carpentry work and can cost $300 to $1,100 per opening.","retrieved_at":"2026-09-29"}]}]},{"kind":"select","id":"permit","label":"Building permit","applies_to":["double_hung","single_hung","sliding","picture","casement","awning","bay","bow"],"default":"none","options":[{"value":"none","label":"Not needed or already covered","basis":"sourced","labor_mult":1,"material_mult":1,"sources":[{"label":"Smith Rock - Cost to Replace Windows","url":"https://smithrock-roofing.com/cost-to-replace-windows/","quote":"These typically cost $50 to $300.","retrieved_at":"2026-09-29"}]},{"value":"yes","label":"Include a permit","basis":"sourced","add":{"low":50,"mid":175,"high":300,"labor_share":0,"per":"project"},"sources":[{"label":"Smith Rock - Cost to Replace Windows","url":"https://smithrock-roofing.com/cost-to-replace-windows/","quote":"These typically cost $50 to $300.","retrieved_at":"2026-09-29"},{"label":"Cobex - Window Replacement Cost","url":"https://cobexcg.com/how-much-does-it-cost-to-replace-windows/","quote":"Permits: Required in many California cities, costing $100 to $400","retrieved_at":"2026-09-29"}]}]},{"kind":"select","id":"window_size","label":"Window size","applies_to":["double_hung","single_hung","sliding","picture","casement","awning","bay","bow"],"default":"standard","options":[{"value":"standard","label":"Standard (about 3 ft x 5 ft)","basis":"sourced","labor_mult":1,"material_mult":1,"sources":[{"label":"Constructly - Window Replacement Cost Calculator","url":"https://constructlytools.com/cost-estimators/window-replacement-cost-calculator/","quote":"Double-Hung Standard $150–$400 $300–$700 $450–$1,000","retrieved_at":"2026-09-29"}]},{"value":"large","label":"Large","basis":"sourced_ratio","labor_mult":1.5,"material_mult":1.5,"rationale":"Insert install for a large double-hung ($500–$1,000, midpoint $750) divided by a standard one ($300–$700, midpoint $500), Constructly.","sources":[{"label":"Constructly - Window Replacement Cost Calculator","url":"https://constructlytools.com/cost-estimators/window-replacement-cost-calculator/","quote":"Double-Hung Large $250–$600 $500–$1,000 $700–$1,400","retrieved_at":"2026-09-29"}]},{"value":"custom","label":"Custom or oversized","basis":"sourced_ratio","labor_mult":2.5,"material_mult":2.5,"rationale":"Midpoint of \"2-3 times more\" for custom windows; consistent with $1,300–$1,500 custom vs $477 standard (about 2.9x).","sources":[{"label":"Louisville Window Company - Window Prices by Size","url":"https://louisvillewindowcompany.com/blog/window-prices-by-size/","quote":"custom windows can cost 2-3 times more due to special manufacturing","retrieved_at":"2026-09-29"},{"label":"ViewLux Windows - Custom vs Standard Windows","url":"https://viewluxwindows.com/custom-vs-standard-windows-real-cost-differences-in-2026/","quote":"standard replacement windows average $477 per unit, while custom replacements average $1,300–$1,500 per window","retrieved_at":"2026-09-29"}]}]},{"kind":"select","id":"trim","label":"Trim and exterior capping","applies_to":["double_hung","single_hung","sliding","picture","casement","awning","bay","bow"],"default":"none","options":[{"value":"none","label":"Keep existing trim","basis":"sourced","labor_mult":1,"material_mult":1,"sources":[{"label":"RealCostIQ - Window Replacement Calculator","url":"https://realcostiq.com/window-replacement-calculator/","quote":"Interior trim $75–$200 per window.","retrieved_at":"2026-09-29"}]},{"value":"interior","label":"New interior trim","basis":"sourced","add":{"low":75,"mid":138,"high":200,"labor_share":0.7,"per":"qty"},"sources":[{"label":"RealCostIQ - Window Replacement Calculator","url":"https://realcostiq.com/window-replacement-calculator/","quote":"Interior trim $75–$200 per window.","retrieved_at":"2026-09-29"}]},{"value":"exterior","label":"Exterior capping (aluminum or vinyl wrap)","basis":"sourced","add":{"low":50,"mid":100,"high":150,"labor_share":0.7,"per":"qty"},"sources":[{"label":"RealCostIQ - Window Replacement Calculator","url":"https://realcostiq.com/window-replacement-calculator/","quote":"Exterior capping $50–$150 per window.","retrieved_at":"2026-09-29"}]},{"value":"both","label":"Both","basis":"sourced","add":{"low":125,"mid":238,"high":350,"labor_share":0.7,"per":"qty"},"rationale":"Sum of interior trim ($75–$200) and exterior capping ($50–$150) per window, RealCostIQ.","sources":[{"label":"RealCostIQ - Window Replacement Calculator","url":"https://realcostiq.com/window-replacement-calculator/","quote":"Interior trim $75–$200 per window.","retrieved_at":"2026-09-29"},{"label":"RealCostIQ - Window Replacement Calculator","url":"https://realcostiq.com/window-replacement-calculator/","quote":"Exterior capping $50–$150 per window.","retrieved_at":"2026-09-29"}]}]},{"kind":"qty_tier","id":"volume_discount","label":"Multi-window discount","applies_to":["double_hung","single_hung","sliding","picture","casement","awning","bay","bow"],"tiers":[{"min_qty":3,"labor_mult":0.87,"material_mult":1,"basis":"sourced","rationale":"Midpoint of the 8–18% labor discount for 3 or more windows.","sources":[{"label":"RealCostIQ - Window Replacement Calculator","url":"https://realcostiq.com/window-replacement-calculator/","quote":"Replacing 3+ windows earns a labor discount of 8–18%.","retrieved_at":"2026-09-29"}]},{"min_qty":8,"labor_mult":0.8,"material_mult":0.8,"basis":"sourced","rationale":"Midpoint of the 15–25% discount on projects of 8 or more windows.","sources":[{"label":"Constructly - Window Replacement Cost Calculator","url":"https://constructlytools.com/cost-estimators/window-replacement-cost-calculator/","quote":"Multi-window discounts of 15–25% apply to projects of 8+ windows.","retrieved_at":"2026-09-29"}]}]}]},"cost_data_ref":{"trade":"windows","version":"v4"},"price_date":"2026-09","figures":[{"src":"/assets/img/tools/window-styles.svg","alt":"Silhouettes of the 8 window styles: double-hung, single-hung, sliding, picture, casement, awning, bay and bow","caption":"The eight window styles the estimator prices. Bay and bow windows project outward and cost the most to install.","width":720,"height":360},{"src":"/assets/img/tools/window-insert-vs-full-frame.svg","alt":"Schematic wall cut comparing insert window replacement, which keeps the old frame, with full-frame replacement","caption":"Insert replacement keeps the existing frame. Full-frame replacement removes it, so it costs more but lets the installer fix rot and redo flashing.","width":720,"height":360}],"title":"Window Installation Cost Estimator","description":"Calculate the estimated cost to replace or install new windows based on style, frame material, installation method, and your local area.","seo_title":"Window Installation Cost Estimate Calculator","seo_description":"Get a detailed window installation cost estimate. Calculate prices for double-hung, casement, and more based on materials, labor, and your local area.","seo_footprint":{"text_intro":"Planning a home improvement project requires a reliable window installation cost estimate. The total price depends heavily on the project type, whether you choose standard double-hung units or complex bay and bow windows. Other critical factors include the frame material—such as vinyl, wood, or fiberglass—the glass package, and the installation method. This tool helps you break down the expected expenses into materials and labor, adjusted for your specific state or metropolitan area.","faq":[{"question":"How much should I pay to have a window installed?","answer":"On average, a standard double-hung window costs about $650 fully installed. A typical project replacing 10 standard double-hung windows averages $5,200, with a normal range between $2,400 and $8,000 depending on the material quality and your location."},{"question":"How much do big box stores like Lowe's or Home Depot charge to install a window?","answer":"Large retailers typically act as project managers and hire local subcontractors to perform the actual labor. While the off-the-shelf price of the window unit might be clearly advertised, the final installation cost usually aligns with standard local labor rates once you factor in trim, capping, and potential frame repairs. This estimator provides a neutral baseline to compare against their quotes."},{"question":"How much does a large or custom window cost?","answer":"Upgrading from a standard size (about 3 ft x 5 ft) to a large or custom window significantly increases the price. For instance, replacing 10 standard double-hung windows typically costs $5,200, but opting for large sizes pushes the typical cost to $7,800."},{"question":"How much can I save by doing the labor myself (DIY)?","answer":"If you have the skills to perform the installation yourself, you can remove the labor portion of the estimate. For a standard 10-window double-hung project, DIY installation reduces the typical cost from $5,200 to $3,640, saving you approximately $1,560 in labor charges."},{"question":"Does full-frame replacement cost more than an insert installation?","answer":"Yes, significantly more. An insert (or pocket) installation keeps the existing frame intact, which is faster and cheaper. A full-frame replacement requires removing the old frame down to the rough opening. For 10 double-hung windows, switching from an insert to a full-frame installation increases the typical total cost from $5,200 to $11,100."}],"how_to_use_steps":["Select the window style, such as double-hung, casement, or sliding.","Enter the number of windows you plan to install.","Choose the frame material, glass package, and installation method.","Specify your location to adjust the labor rates to your local market.","Review the instant breakdown of typical costs, materials, and labor."]},"content_sections":[{"heading":"Understanding Your Window Installation Cost Estimate","paragraphs":["When budgeting for new windows, the final price is a combination of the physical unit (materials) and the work required to put it in place (labor). The style of the window is the primary starting point. Standard double-hung or single-hung windows are generally the most affordable, while large projecting styles like bay or bow windows require structural support and cost considerably more.","The frame material also plays a major role. Vinyl is the most common and budget-friendly option, whereas wood, composite, and fiberglass carry a premium. Additionally, upgrading the glass package to include Low-E coatings or triple-pane glass will increase the material costs but can improve the energy efficiency of the home."]},{"heading":"Insert vs. Full-Frame Installation","paragraphs":["The installation method you choose drastically affects the labor cost. An insert installation, also known as a pocket replacement, involves sliding the new window into the existing frame. This method is cost-effective and less invasive, provided the original frame is structurally sound and free of rot.","A full-frame installation requires the complete removal of the old window, including the frame and trim, exposing the rough opening. This method is necessary if you are changing the size of the window or if the existing wood is damaged. Because it requires more time, exterior capping, and new interior trim, the labor costs are substantially higher."]},{"heading":"Worked Example: 10 Double-Hung Windows","paragraphs":["To understand how the costs break down, consider a typical project replacing 10 standard-sized double-hung windows using an insert installation method. Assuming standard quality materials, vinyl frames, and a double-pane glass package in an average U.S. market, the typical cost per window is $520.","For the entire 10-window project, the typical total cost is $5,200. This total is split into $3,640 for materials and $1,560 for labor. Depending on the specific contractor and minor site variations, the low estimate for this project would be around $2,400, while a high estimate could reach $8,000."]},{"heading":"Additional Cost Factors and Common Mistakes","paragraphs":["Several site-specific factors can increase your estimate. If the windows are located on a second or third floor, installers may need scaffolding or special equipment, which increases labor time. Similarly, if the existing frames or sills are rotted, repairing every opening before installation will add significant labor and material costs.","A common mistake homeowners make is ignoring local labor rates. The cost of living and prevailing wages in your specific state or metropolitan area can shift the labor portion of the bill up or down. Always ensure your estimate reflects your local market rather than just a national average."]}],"sources":[{"label":"U.S. Bureau of Labor Statistics (BLS), Occupational Employment and Wage Statistics","url":"https://www.bls.gov/oes/"},{"label":"Fixr - Window Replacement Cost","url":"https://www.fixr.com/costs/window-replacement"},{"label":"This Old House - Window Replacement Cost","url":"https://www.thisoldhouse.com/windows/window-replacement-cost"},{"label":"Rooster Windows & Doors - Guide to Window Installation Costs","url":"https://www.roosterwindowsanddoors.com/blog/a-pane-in-the-glass-your-guide-to-window-installation-costs/"}],"default_output":{"result":{"Typical cost":"$5,200","Low estimate":"$2,400","High estimate":"$10,800","Materials":"$3,640","Labor":"$1,560","Typical cost per window":"$520"},"footprint":"Double-hung, 10 windows in the U.S. (national average): typical cost $5,200.","steps":["National typical price for Double-hung: $650 per window.","10 windows x $650 = $6,500.","Multi-window discount: 8 or more qualifies (labor x0.8, materials x0.8).","Typical total: $5,200 (range $2,400 to $10,800)."]},"status":"published","reviewed_at":"2026-10-05","verification_note":"datos de coste 03/10: fuentes primarias (rebuild determinista, sin forja)"}