1import{E as l,y as e,L as N,T as ie}from"./main-Bjb98eut.js";import{A as Le,N as ze,F as Ue}from"./AuthModal-Dx6o0t1M.js";import{T as _e}from"./trash-2-PY-N2HSn.js";import{P as We}from"./plus-C6DaJwYm.js";import{C as _}from"./check-Dn_42aUH.js";import{X as Ke}from"./x-NnW6lX6p.js";import{e as ce,C as de}from"./generateCategoricalChart-BFTgNJoB.js";import{a as me,P as xe}from"./PieChart-Bead2mMf.js";import{C as W}from"./dialog-BStR_UPn.js";import{R as Qe}from"./rotate-ccw-BDg45y5B.js";import{M as Ge}from"./message-circle-BZZCPSnK.js";import"./proxy-DwJj4rnL.js";import"./user-eHUC5lj8.js";import"./menu-DPjrxLwz.js";import"./github-BagTx_v-.js";import"./zap-WN28C2E8.js";import"./index-Di5inxxt.js";const K=[{name:"Kitchen",color:"#1e293b",items:[{key:"kitchenMinor",label:"Minor Remodel",low:1e4,mid:18e3,high:25e3},{key:"kitchenMajor",label:"Full Gut Remodel",low:25e3,mid:45e3,high:75e3},{key:"countertops",label:"Countertops",low:2e3,mid:4500,high:8e3},{key:"cabinets",label:"Cabinets",low:3e3,mid:8e3,high:15e3},{key:"appliances",label:"Appliances (Full Set)",low:2e3,mid:4e3,high:8e3}]},{name:"Bathroom",color:"#3b82f6",items:[{key:"bathMinor",label:"Minor Remodel",low:3e3,mid:6500,high:1e4},{key:"bathMajor",label:"Full Remodel",low:1e4,mid:22e3,high:35e3},{key:"bathAdd",label:"Add New Bathroom",low:15e3,mid:3e4,high:5e4}]},{name:"Flooring",color:"#7c3aed",items:[{key:"flooringLaminate",label:"Laminate / Vinyl (whole house)",low:3e3,mid:7500,high:12e3},{key:"flooringHardwood",label:"Hardwood (whole house)",low:9e3,mid:15e3,high:22500},{key:"flooringTile",label:"Tile (kitchen & bath)",low:2e3,mid:5e3,high:9e3},{key:"flooringCarpet",label:"Carpet (bedrooms)",low:1500,mid:4500,high:9e3}]},{name:"Exterior & Curb Appeal",color:"#16a34a",items:[{key:"exteriorPaint",label:"Exterior Paint",low:2e3,mid:4500,high:8e3},{key:"siding",label:"Siding Replacement",low:5e3,mid:12e3,high:25e3},{key:"landscaping",label:"Landscaping",low:1500,mid:5e3,high:15e3},{key:"frontDoor",label:"Front Door",low:500,mid:1500,high:3500},{key:"driveway",label:"Driveway",low:1500,mid:4e3,high:8e3}]},{name:"Structural & Systems",color:"#ef4444",items:[{key:"roof",label:"Roof Replacement",low:5e3,mid:1e4,high:2e4},{key:"hvac",label:"HVAC System",low:4e3,mid:8e3,high:15e3},{key:"electrical",label:"Electrical Rewire",low:5e3,mid:1e4,high:2e4},{key:"plumbing",label:"Plumbing (Repipe)",low:4e3,mid:8e3,high:15e3},{key:"foundation",label:"Foundation Repair",low:3e3,mid:1e4,high:3e4},{key:"windows",label:"Window Replacement (10)",low:3e3,mid:6500,high:12e3}]},{name:"Interior Cosmetic",color:"#f59e0b",items:[{key:"interiorPaint",label:"Interior Paint (whole house)",low:2e3,mid:4500,high:8e3},{key:"drywall",label:"Drywall Repair",low:500,mid:1500,high:3e3},{key:"lightFixtures",label:"Light Fixtures & Hardware",low:500,mid:2e3,high:5e3},{key:"interiorDoors",label:"Interior Doors (8)",low:1200,mid:2800,high:4800}]},{name:"Other",color:"#94a3b8",items:[{key:"garageDoor",label:"Garage Door",low:800,mid:1800,high:3500},{key:"deckPatio",label:"Deck / Patio",low:2e3,mid:7e3,high:15e3},{key:"permits",label:"Permits & Inspections",low:500,mid:2e3,high:5e3},{key:"dumpster",label:"Dumpster & Cleanup",low:500,mid:1500,high:3e3}]}],Je=` 2.arv-slider { 3 -webkit-appearance: none; 4 appearance: none; 5 height: 6px; 6 border-radius: 3px; 7 outline: none; 8 cursor: pointer; 9} 10.arv-slider::-webkit-slider-thumb { 11 -webkit-appearance: none; 12 appearance: none; 13 width: 22px; 14 height: 22px; 15 border-radius: 50%; 16 background: #000; 17 cursor: pointer; 18 border: 3px solid white; 19 box-shadow: 0 2px 8px rgba(0,0,0,0.18); 20} 21.arv-slider::-moz-range-thumb { 22 width: 22px; 23 height: 22px; 24 border-radius: 50%; 25 background: #000; 26 cursor: pointer; 27 border: 3px solid white; 28 box-shadow: 0 2px 8px rgba(0,0,0,0.18); 29} 30.arv-slider::-moz-range-track { 31 height: 6px; 32 border-radius: 3px; 33} 34`,he=[{q:"What is After Repair Value (ARV)?",a:"ARV is the estimated market value of a property after all planned renovations and repairs are completed. Real estate investors use ARV to determine if a fix-and-flip or BRRRR deal is profitable before they buy. It's calculated by anal
34yzing comparable recently-sold properties in the same area that are already in the condition you plan to achieve."},{q:"How does the 70% rule work?",a:"The 70% rule is a quick formula investors use to set a maximum purchase price: multiply the ARV by 70%, then subtract your estimated rehab costs. The remaining 30% acts as a cushion for closing costs (buy and sell side), holding costs, and your profit margin. For example, if the ARV is $300,000 and rehab is $50,000, your maximum offer should be ($300,000 x 0.70) - $50,000 = $160,000."},{q:"Should I always use 70% for the investor rule?",a:"Not necessarily. The 70% rule is a starting point. In competitive, hot markets where properties sell fast and holding costs are low, experienced investors may go up to 75-80%. In slower markets or rural areas where properties sit longer, a more conservative 65% might be safer. Adjust the percentage slider above to match your local market conditions and risk tolerance."},{q:"How do I find good comps for my ARV estimate?",a:"Look for properties that sold within the last 3 to 6 months, within half a mile to one mile of your subject property. They should be similar in size (within 20% of square footage), same property type, similar bed/bath count, and in the renovated condition you're targeting. The more similar the comps, the more reliable your ARV estimate. Use at least 3 comps for a solid average."},{q:"What rehab costs should I include?",a:"Include every cost needed to bring the property to the condition of your comps. This covers cosmetic updates (paint, flooring, fixtures), kitchen and bathroom remodels, structural repairs (roof, HVAC, electrical, plumbing), exterior and curb appeal work, permits, and cleanup. Always add a 10-15% contingency buffer for unexpected issues â they're almost guaranteed in rehab projects."},{q:"What are holding costs and why do they matter?",a:"Holding costs are the monthly expenses you pay while you own and rehab the property â mortgage or hard money loan payments, property taxes, insurance, utilities, and any HOA fees. On a 6-month project, holding costs can easily add $10,000-$20,000 to your total project cost. Underestimating holding time is one of the most common mistakes new flippers make."}];function r(o,i=0){return new Intl.NumberFormat("en-US",{style:"currency",currency:"USD",minimumFractionDigits:i,maximumFractionDigits:i}).format(o)}function g(o){return new Intl.NumberFormat("en-US").format(Math.round(o))}function h(o){return parseFloat(o.replace(/[^0-9.]/g,""))||0}function I(o){const i=Math.min(100,Math.max(0,o));return{background:`linear-gradient(to right, #000 ${i}%, #e2e8f0 ${i}%)`}}let Ye=4;function Xe(){const[o,i]=l.useState("manual"),[m,Q]=l.useState(3e5),[n,F]=l.useState([{id:"1",salePrice:31e4,sqft:1800},{id:"2",salePrice:295e3,sqft:1650},{id:"3",salePrice:305e3,sqft:1750}]),[u,ue]=l.useState(1700),[d,G]=l.useState(18e4),[C,J]=l.useState("mid"),[E,Y]=l.useState({interiorPaint:!0,flooringLaminate:!0,kitchenMinor:!0,bathMinor:!0,lightFixtures:!0,landscaping:!0}),[y,T]=l.useState({}),[j,X]=l.useState(10),[p,pe]=l.useState(70),[Z,be]=l.useState(2),[V,fe]=l.useState(2),[O,ge]=l.useState(5),[v,ye]=l.useState(6),[ee,je]=l.useState(1800),[R,ve]=l.useState(!1),[H,te]=l.useState(!1),[B,ke]=l.useState(null),[se,we]=l.useState({}),D=l.useMemo(()=>{const t=n.filter(a=>a.salePrice>0&&a.sqft>0);if(t.length===0||u<=0)return 0;const s=t.reduce((a,x)=>a+x.salePrice/x.sqft,0)/t.length;return Math.round(s*u)},[n,u]),c=o==="comps"?D:m,Ne=l.useMemo(()=>{const t=n.filter(s=>s.salePrice>0&&s.sqft>0);return t.length===0?0:t.reduce((s,a)=>s+a.salePrice/a.sqft,0)/t.length},[n]),k=l.useMemo(()=>{const t={};for(const s of K)for(const a of s.items)E[a.key]&&(t[a.key]=a.key in y?y[a.key]:a[C]);return t},[E,y,C]),ae=l.useMemo(()=>Object.values(k).reduce((t,s)=>t+s,0),[k]),A=Math.round(ae*(j/100)),b=ae+A,M=l.useMemo(()=>K.map(t=>({name:t.name,color:t.color,value:t.items.reduce((s,a)=>s+(k[a.key]||0),0)})).filter(t=>t.value>0),[k]),L=Math.round(d*(Z/100)),z=ee*v,le=Math.round(c*((V+O)/100)),S=d+b+L+z,re=S+le,P=c-re,oe=S>0?P/S*100:0,Ce=v>0?oe*(12/v):0,f=c>0?P/c*100:0,w=Math.round(c*(p/100)-b),Re=c-d-b,Ae=re,Me=u>0?b/u:0,q=f>
34=15?{label:"Strong Deal",color:"#16a34a",bg:"#f0fdf4",border:"#bbf7d0"}:f>=8?{label:"Marginal Deal",color:"#f59e0b",bg:"#fffbeb",border:"#fde68a"}:{label:"Risky Deal",color:"#ef4444",bg:"#fef2f2",border:"#fecaca"},U=d<=w,$=[{name:"Purchase Price",value:d,color:"#1e293b"},{name:"Rehab Costs",value:b,color:"#7c3aed"},{name:"Closing (Buy)",value:L,color:"#3b82f6"},{name:"Holding Costs",value:z,color:"#f59e0b"},{name:"Selling Costs",value:le,color:"#16a34a"}].filter(t=>t.value>0),Se=()=>{n.length>=6||F([...n,{id:String(Ye++),salePrice:0,sqft:0}])},Pe=t=>{n.length<=1||F(n.filter(s=>s.id!==t))},ne=(t,s,a)=>{F(n.map(x=>x.id===t?{...x,[s]:a}:x))},qe=t=>{Y(s=>({...s,[t]:!s[t]}))},$e=(t,s)=>{T(a=>({...a,[t]:s}))},Ie=()=>{T({}),Y({interiorPaint:!0,flooringLaminate:!0,kitchenMinor:!0,bathMinor:!0,lightFixtures:!0,landscaping:!0}),J("mid"),X(10)},Fe=t=>{we(s=>({...s,[t]:!s[t]}))},Ee=Object.keys(y).length>0,Te=(d-5e4)/145e4*100,Ve=(m-5e4)/195e4*100,Oe=(p-50)/40*100,He={"@context":"https://schema.org","@type":"WebApplication",name:"ARV Calculator",url:"https://www.realtyapi.io/tools/arv-calculator",applicationCategory:"FinanceApplication",operatingSystem:"Any",offers:{"@type":"Offer",price:"0",priceCurrency:"USD"},description:"Free ARV (After Repair Value) calculator for real estate investors. Estimate property value after renovations, analyze rehab costs, and evaluate deal profitability with the 70% rule."},Be={"@context":"https://schema.org","@type":"FAQPage",mainEntity:he.map(t=>({"@type":"Question",name:t.q,acceptedAnswer:{"@type":"Answer",text:t.a}}))};return e.jsxs("div",{className:"max-w-[1200px] mx-auto px-4 md:px-8",children:[e.jsx("style",{dangerouslySetInnerHTML:{__html:Je}}),e.jsxs("div",{className:"flex items-center gap-2 text-sm text-slate-400 mb-4",children:[e.jsx(N,{to:"/tools",className:"hover:text-black transition-colors font-medium",children:"Tools"}),e.jsx("span",{children:"/"}),e.jsx("span",{className:"text-slate-700 font-semibold",children:"ARV Calculator"})]}),e.jsxs("div",{className:"mb-8 md:mb-10",children:[e.jsx("h1",{className:"text-3xl md:text-4xl lg:text-5xl font-black tracking-tighter text-black",children:"ARV Calculator"}),e.jsxs("p",{className:"mt-3 text-slate-500 text-sm md:text-base font-medium max-w-2xl",children:["Estimate the After Repair Value of an investment property and analyze whether the deal is worth pursuing."," ",e.jsx("button",{onClick:()=>te(!H),className:"text-slate-400 hover:text-black transition-colors inline",children:H?"":"...more"}),H&&e.jsxs("span",{children:[" ","Enter comparable sales or set your ARV manually, build an itemized rehab budget with preset cost ranges, and see your maximum allowable offer, estimated profit, and ROI instantly. Everything updates in real time as you adjust the numbers."," ",e.jsx("button",{onClick:()=>te(!1),className:"text-slate-400 hover:text-black transition-colors",children:"show less"})]})]})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-5 gap-6 lg:gap-8 mb-6",children:[e.jsxs("div",{className:"lg:col-span-3 space-y-6",children:[e.jsxs("div",{className:"bg-white rounded-2xl border border-slate-100 shadow-lg shadow-slate-200/30 p-5 md:p-8",children:[e.jsx("h2",{className:"text-lg font-black tracking-tight text-black mb-4",children:"After Repair Value"}),e.jsxs("div",{className:"flex gap-2 mb-5",children:[e.jsx("button",{onClick:()=>i("manual"),className:`px-4 py-2 rounded-lg text-sm font-bold transition-all ${o==="manual"?"bg-black text-white":"bg-slate-100 text-slate-500 hover:bg-slate-200"}`,children:"Enter ARV"}),e.jsx("button",{onClick:()=>i("comps"),className:`px-4 py-2 rounded-lg text-sm font-bold transition-all ${o==="comps"?"bg-black text-white":"bg-slate-100 text-slate-500 hover:bg-slate-200"}`,children:"Calculate from Comps"})]}),o==="manual"?e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-bold text-slate-700 mb-2",children:"Estimated ARV"}),e.jsxs("div",{className:"relative",children:[e.jsx("span",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-slate-400 font-bold text-sm",children:"$"}),e.jsx("input",{type:"text",inputMode:"numeric",value:g(m),onChange:t=>Q(Math.max(0,h(t.target.value))),className:"w-full pl-8 pr-4 py-3 bg-slate-50 border border-slate-200 rounded-xl text-lg font-bold text-black focus:outline-none focus:ring-2 focus:ring-yellow-400 focus:border-transparent transition-all"})]}),e.jsx("input",{type:"range",min:5e4,max:2e6,step:5e3,value:m,onChange:t=>Q(Number(t.target.value)),className:"w-full mt-3 arv-slider",style:I(Ve)}),e.jsxs("div",{className:"flex justify-between text-[10px] text-slate-400 font-bold mt-1",children:[e.jsx("span",{children:"$50K"}),e.jsx("span",{children:"$2M"})]})]}):e.jsxs("div",{className:"space-y-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-sm font-bold text-slate-700 mb-2",children:"Your Property's Square Footage"}),e.jsx("input",{type:"text",inputMode:"numeric",value:g(u),onChange:t=>ue(Math.max(0,h(t.target.value))),className:"w-full px-4 py-3 bg-slate-50 border border-slate-200 rounded-xl text-lg font-bold text-black focus:outline-none focus:ring-2 focus:ring-yellow-400 focus:border-transparent transition-all",placeholder:"e.g. 1,700"})]}),e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center justify-between mb-2",children:[e.jsx("label",{className:"text-sm font-bold text-slate-700",children:"Comparable Sales"}),e.jsxs("span",{className:"text-xs font-bold text-slate-400",children:[n.filter(t=>t.salePrice>0).length," comp",n.filter(t=>t.salePrice>0).length!==1?"s":""]})]}),e.jsx("div",{className:"space-y-2",children:n.map((t,s)=>e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("span",{className:"text-xs font-bold text-slate-400 w-
345 shrink-0",children:["#",s+1]}),e.jsxs("div",{className:"relative flex-1",children:[e.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-400 font-bold text-xs",children:"$"}),e.jsx("input",{type:"text",inputMode:"numeric",value:t.salePrice>0?g(t.salePrice):"",onChange:a=>ne(t.id,"salePrice",h(a.target.value)),placeholder:"Sale price",className:"w-full pl-7 pr-3 py-2.5 bg-slate-50 border border-slate-200 rounded-lg text-sm font-bold text-black focus:outline-none focus:ring-2 focus:ring-yellow-400 focus:border-transparent"})]}),e.jsxs("div",{className:"relative w-28 shrink-0",children:[e.jsx("input",{type:"text",inputMode:"numeric",value:t.sqft>0?g(t.sqft):"",onChange:a=>ne(t.id,"sqft",h(a.target.value)),placeholder:"Sq ft",className:"w-full pl-3 pr-8 py-2.5 bg-slate-50 border border-slate-200 rounded-lg text-sm font-bold text-black focus:outline-none focus:ring-2 focus:ring-yellow-400 focus:border-transparent"}),e.jsx("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-slate-400 text-[10px] font-bold",children:"sqft"})]}),e.jsx("button",{onClick:()=>Pe(t.id),className:"p-1.5 text-slate-300 hover:text-red-500 transition-colors shrink-0",disabled:n.length<=1,children:e.jsx(_e,{className:"w-3.5 h-3.5"})})]},t.id))}),n.length<6&&e.jsxs("button",{onClick:Se,className:"flex items-center gap-1.5 mt-2 text-xs font-bold text-slate-400 hover:text-black transition-colors",children:[e.jsx(We,{className:"w-3.5 h-3.5"}),"Add comp"]}),D>0&&e.jsxs("div",{className:"mt-3 bg-slate-50 border border-slate-100 rounded-xl p-3",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsx("span",{className:"text-xs font-bold text-slate-500",children:"Avg. price per sqft"}),e.jsxs("span",{className:"text-sm font-black text-black",children:[r(Ne,0),"/sqft"]})]}),e.jsxs("div",{className:"flex items-center justify-between mt-1",children:[e.jsx("span",{className:"text-xs font-bold text-slate-500",children:"Estimated ARV"}),e.jsx("span",{className:"text-sm font-black text-black",children:r(D)})]})]})]})]})]}),e.jsxs("div",{className:"bg-white rounded-2xl border border-slate-100 shadow-lg shadow-slate-200/30 p-5 md:p-8",children:[e.jsx("h2",{className:"text-lg font-black tracking-tight text-black mb-4",children:"Purchase Price"}),e.jsxs("div",{className:"relative",children:[e.jsx("span",{className:"absolute left-4 top-1/2 -translate-y-1/2 text-slate-400 font-bold text-sm",children:"$"}),e.jsx("input",{type:"text",inputMode:"numeric",value:g(d),onChange:t=>G(Math.max(0,h(t.target.value))),className:"w-full pl-8 pr-4 py-3 bg-slate-50 border border-slate-200 rounded-xl text-lg font-bold text-black focus:outline-none focus:ring-2 focus:ring-yellow-400 focus:border-transparent transition-all"})]}),e.jsx("input",{type:"range",min:5e4,max:15e5,step:5e3,value:d,onChange:t=>G(Number(t.target.value)),className:"w-full mt-3 arv-slider",style:I(Te)}),e.jsxs("div",{className:"flex justify-between text-[10px] text-slate-400 font-bold mt-1",children:[e.jsx("span",{children:"$50K"}),e.jsx("span",{children:"$1.5M"})]}),c>0&&e.jsxs("div",{className:`mt-4 flex items-center gap-2 px-3 py-2 rounded-lg text-xs font-bold ${U?"bg-green-50 text-green-700 border border-green-200":"bg-amber-50 text-amber-700 border border-amber-200"}`,children:[U?e.jsx(_,{className:"w-3.5 h-3.5 shrink-0"}):e.jsx(ie,{className:"w-3.5 h-3.5 shrink-0"}),e.jsx("span",{children:U?`Below your max allowable offer of ${r(w)}`:`Above your max allowable offer of ${r(w)} by ${r(d-w)}`})]})]}),e.jsxs("div",{className:"bg-white rounded-2xl border border-slate-100 shadow-lg shadow-slate-200/30 p-5 md:p-8",children:[e.jsx("h2",{className:"text-lg font-black tracking-tight text-black mb-4",children:"Deal Costs"}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 gap-4",children:[e.jsxs("div",{className:"sm:col-span-2",children:[e.jsx("label",{className:"block text-sm font-bold text-slate-700 mb-2",children:"Investor Rule"}),e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("input",{type:"range",min:50,max:90,step:1,value:p,onChange:t=>
34pe(Number(t.target.value)),className:"flex-1 arv-slider",style:I(Oe)}),e.jsxs("span",{className:"text-lg font-black text-black w-14 text-right",children:[p,"%"]})]}),e.jsx("p",{className:"text-[10px] text-slate-400 font-medium mt-1",children:p<=65?"Conservative â more cushion for slower markets or wholesale deals":p<=72?"Standard â the classic 70% rule used by most investors":p<=80?"Aggressive â tighter margins, best for hot markets with fast sales":"Very aggressive â minimal cushion, high risk if anything goes wrong"})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"Closing Costs (Buy)"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:"text",inputMode:"decimal",value:Z,onChange:t=>{const s=t.target.value;(s===""||/^\d*\.?\d*$/.test(s))&&be(parseFloat(s)||0)},className:"w-full pr-8 pl-4 py-2.5 bg-slate-50 border border-slate-200 rounded-lg text-sm font-bold text-black focus:outline-none focus:ring-2 focus:ring-yellow-400 focus:border-transparent"}),e.jsx("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-slate-400 font-bold text-xs",children:"%"})]}),e.jsx("p",{className:"text-[10px] text-slate-400 mt-1",children:r(L)})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"Closing Costs (Sell)"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:"text",inputMode:"decimal",value:V,onChange:t=>{const s=t.target.value;(s===""||/^\d*\.?\d*$/.test(s))&&fe(parseFloat(s)||0)},className:"w-full pr-8 pl-4 py-2.5 bg-slate-50 border border-slate-200 rounded-lg text-sm font-bold text-black focus:outline-none focus:ring-2 focus:ring-yellow-400 focus:border-transparent"}),e.jsx("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-slate-400 font-bold text-xs",children:"%"})]}),e.jsx("p",{className:"text-[10px] text-slate-400 mt-1",children:r(Math.round(c*(V/100)))})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"Agent Commission"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:"text",inputMode:"decimal",value:O,onChange:t=>{const s=t.target.value;(s===""||/^\d*\.?\d*$/.test(s))&&ge(parseFloat(s)||0)},className:"w-full pr-8 pl-4 py-2.5 bg-slate-50 border border-slate-200 rounded-lg text-sm font-bold text-black focus:outline-none focus:ring-2 focus:ring-yellow-400 focus:border-transparent"}),e.jsx("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-slate-400 font-bold text-xs",children:"%"})]}),e.jsx("p",{className:"text-[10px] text-slate-400 mt-1",children:r(Math.round(c*(O/100)))})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"Holding Period"}),e.jsxs("div",{className:"relative",children:[e.jsx("input",{type:"text",inputMode:"numeric",value:v,onChange:t=>ye(Math.max(1,Math.min(36,h(t.target.value)))),className:"w-full pr-16 pl-4 py-2.5 bg-slate-50 border border-slate-200 rounded-lg text-sm font-bold text-black focus:outline-none focus:ring-2 focus:ring-yellow-400 focus:border-transparent"}),e.jsx("span",{className:"absolute right-3 top-1/2 -translate-y-1/2 text-slate-400 font-bold text-xs",children:"months"})]})]}),e.jsxs("div",{className:"sm:col-span-2",children:[e.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1",children:"Monthly Holding Cost"}),e.jsxs("div",{className:"relative",children:[e.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-400 font-bold text-xs",children:"$"}),e.jsx("input",{type:"text",inputMode:"numeric",value:g(ee),onChange:t=>je(Math.max(0,h(t.target.value))),className:"w-full pl-7 pr-4 py-2.5 bg-slate-50 border border-slate-200 rounded-lg text-sm font-bold text-black focus:outline-none focus:ring-2 focus:ring-yellow-400 focus:border-transparent"})]}),e.jsxs("p",{className:"text-[10px] text-slate-400 mt-1",children:["Mortgage/loan, taxes, insurance, utilities, HOA. Total: ",r(z)," over ",v," months."]})]})]})]})]}),e.jsx("div",{className:"lg:col-span-2",children:e.jsxs("div",{className:"bg-white rounded-2xl border border-slate-100 shadow-lg shadow-slate-200/30 p-5 md:p-8 lg:sticky lg:top-24 space-y-5",children:[e.jsxs("div",{className:"flex items-center justify-center gap-2 px-4 py-2 rounded-xl text-sm font-black",style:{backgroundColor:q.bg,color:q.color,border:`1px solid ${q.border}`},children:[f>=15?e.jsx(_,{className:"w-4 h-4"}):f>=8?e.jsx(ie,{className:"w-4 h-4"}):e.jsx(Ke,{className:"w-4 h-4"}),q.label]}),e.jsxs("div",{className:"text-center",children:[e.jsx("div",{className:"text-[10px] font-black uppercase tracking-[0.2em] text-slate-400 mb-1",children:"Estimated Profit"}),e.jsx("div",{className:`text-3xl md:text-4xl font-black tracking-tight ${P>=0?"text-black":"text-red-500"}`,children:r(P)}),e.jsxs("div",{className:"text-sm text-slate-400 font-medium mt
34-1",children:[e.jsxs("span",{className:`font-bold ${f>=15?"text-green-600":f>=8?"text-amber-600":"text-red-500"}`,children:[f.toFixed(1),"%"]})," ","profit margin"]})]}),e.jsxs("div",{className:"space-y-2.5",children:[e.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-slate-50",children:[e.jsx("span",{className:"text-xs font-bold text-slate-500",children:"ARV"}),e.jsx("span",{className:"text-sm font-black text-black",children:r(c)})]}),e.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-slate-50",children:[e.jsx("span",{className:"text-xs font-bold text-slate-500",children:"Max Allowable Offer"}),e.jsx("span",{className:"text-sm font-black text-black",children:r(w)})]}),e.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-slate-50",children:[e.jsx("span",{className:"text-xs font-bold text-slate-500",children:"Total Rehab Cost"}),e.jsx("span",{className:"text-sm font-black text-black",children:r(b)})]}),e.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-slate-50",children:[e.jsx("span",{className:"text-xs font-bold text-slate-500",children:"Total Project Cost"}),e.jsx("span",{className:"text-sm font-black text-black",children:r(S)})]}),e.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-slate-50",children:[e.jsx("span",{className:"text-xs font-bold text-slate-500",children:"ROI"}),e.jsxs("span",{className:"text-sm font-black text-black",children:[oe.toFixed(1),"%"]})]}),e.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-slate-50",children:[e.jsx("span",{className:"text-xs font-bold text-slate-500",children:"Annualized ROI"}),e.jsxs("span",{className:"text-sm font-black text-black",children:[Ce.toFixed(1),"%"]})]}),e.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-slate-50",children:[e.jsx("span",{className:"text-xs font-bold text-slate-500",children:"Equity Captured"}),e.jsx("span",{className:"text-sm font-black text-black",children:r(Re)})]}),e.jsxs("div",{className:"flex items-center justify-between py-2 border-b border-slate-50",children:[e.jsx("span",{className:"text-xs font-bold text-slate-500",children:"Break-Even Sale Price"}),e.jsx("span",{className:"text-sm font-black text-black",children:r(Ae)})]}),u>0&&e.jsxs("div",{className:"flex items-center justify-between py-2",children:[e.jsx("span",{className:"text-xs font-bold text-slate-500",children:"Rehab Cost / sqft"}),e.jsxs("span",{className:"text-sm font-black text-black",children:[r(Me,2),"/sqft"]})]})]}),$.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] font-black uppercase tracking-[0.2em] text-slate-400 mb-2 text-center",children:"Cost Breakdown"}),e.jsx(ce,{width:"100%",height:180,children:e.jsx(me,{children:e.jsx(xe,{data:$,cx:"50%",cy:"50%",innerRadius:50,outerRadius:78,dataKey:"value",strokeWidth:2,stroke:"#fff",children:$.map((t,s)=>e.jsx(de,{fill:t.color},s))})})}),e.jsx("div",{className:"space-y-1.5 mt-1",children:$.map(t=>e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-2.5 h-2.5 rounded-full shrink-0",style:{backgroundColor:t.color}}),e.jsx("span",{className:"text-xs font-medium text-slate-500",children:t.name})]}),e.jsx("span",{className:"text-xs font-bold text-black",children:r(t.value)})]},t.name))})]}),e.jsx("div",{className:"bg-slate-50 border border-slate-100 rounded-xl p-3",children:e.jsx("p",{className:"text-xs text-slate-500 font-medium",children:"Estimates based on national averages. Actual rehab costs and property values vary by location, contractor, and market conditions. Always get local contractor bids and recent comps before making an offer."})})]})})]}),e.jsxs("div",{className:"bg-white rounded-2xl border border-slate-100 shadow-lg shadow-slate-200/30 p-5 md:p-8 mb-6",children:[e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("button",{onClick:()=>ve(!R),className:"flex items-center gap-2",children:[e.jsx("h2",{className:"text-xl font-black tracking-tight text-black",children:"Rehab Budget"}),e.jsx(W,{className:`w-5 h-5 text-slate-400 transition-transform duration-200 ${R?"rotate-180":""}`})]}),e.jsxs("div",{className:"flex items-center gap-3",children:[Ee&&R&&e.jsxs("button",{onClick:Ie,className:"flex items-center gap-1 text-xs text-slate-400 hover:text-black transition-colors font-medium",children:[e.jsx(Qe,{className:"w-3 h-3"}),"Reset"]}),e.jsx("span",{className:"text-sm font-black text-black",children:r(b)})]})]}),R&&e.jsxs("div",{className:"mt-6 space-y-6",children:[e.jsxs("div",{className:"flex flex-wrap items-center gap-4",children:[e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1.5",children:"Quality Level"}),e.jsx("div",{className:"flex gap-1.5",children:["low","mid","high"].map(t=>e.jsx("button",{onClick:()=>{J(t),T({})},className:`px-3 py-1.5 rounded-lg text-xs font-bold transition-all ${C===t?"bg-black text-white":"bg-slate-100 text-slate-500 hover:bg-slate-200"}`,children:t==="low"?"Budget":t==="mid"?"Mid-Range":"High-End"},t))})]}),e.jsxs("div",{children:[e.jsx("label",{className:"block text-xs font-bold text-slate-500 mb-1.5",children:"Contingency Buffer"}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("input",{type:"range",min:0,max:25,step:1,value:j,onChange:t=>X(Number(t.target.value)),className:"w-28 arv-slider",style:I(j/25*100)}),e.jsxs("span",{className:"text-sm font-black text-black w-10 text-right",children:[j,"%"]})]}),e.jsxs("p",{className:"text-[10px] text-slate-400 mt-0.5",children:[r(A)," added for unexpected costs"]})]})]}),M.length>0&&e.jsxs("div",{className:"flex flex-col sm:flex-row items-center gap-4",children:[e.jsx(ce,{width:"100%",height:160,className:"max-w-[200px]",children:e.jsx(me,{children:e.jsx(xe,{data:M,cx:"50%",cy:"50%",innerRadius:40,outerRadius:65,dataKey:"value",strokeWidth:2,stroke:"#fff",children:M.map((t,s)=>e.jsx(de,{fill:t.color},s))})})}),e.jsxs("div",{className:"flex-1 space-y-1.5",children:[M.map(t=>e.jsxs("div",{className:"flex items-center justify-between",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-2.5 h-2.5 rounded-full shrink-0",style:{backgroundColor:t.color}}),e.jsx("span",{className:"text-xs font-medium text-slate-500",children:t.name})]}),e.jsx("span",{className:"text-xs font-bold text-black",children:r(t.value)})]},t.name)),A>0&&e.jsxs("div",{className:"flex items-center justify-between pt-1 border-t border-slate-100",children:[e.jsxs("span",{className:"text-xs font-medium text-slate-500",children:["Contingency (",j,"%)"]}),e.jsx("span",{className:"text-xs font-bold text-black",children:r(A)})]})]})]}),e.jsx("div",{className:"space-y-3",children:K.map(t=>e.jsxs("div",{className:"border border-slate-100 rounded-xl overflow-hidden",children:[e.jsxs("button",{onClick:()=>Fe(t.name),className:"w-full flex items-center justify-between p-4 hover:bg-slate-50 transition-colors",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"w-3 h-3 rounded-full shrink-0",style:{backgroundColor:t.color}}),e.jsx("span",{className:"text-sm font-black text-black",children:t.name})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"text-xs font-bold text-slate-400",children:r(t.items.reduce((s,a)=>s+(k[a.key]||0),0))}),e.jsx(W,{className:`w-4 h-4 text-slate-400 transition-transform duration-200 ${se[t.name]?"rotate-180":""}`})]})]}),se[t.name]&&e.jsx("div",{className:"px-4 pb-4 space-y-2",children:t.items.map(s=>{const a=!!E[s.key],x=s.key in y?y[s.key]:s[C];return e.jsxs("div",{className:`flex items-center gap-3 py-2 ${a?"":"opacity-40"}`,children:[e.jsx("button",{onClick:()=>qe(s.key),className:`w-5 h-5 rounded border-2 flex items-center justify-center shrink-0 transition-all ${a?"bg-black border-black text-white":"border-slate-300 hover:border-slate-400"}`,children:a&&e.jsx(_,{className:"w-3 h-3"})}),e.jsx("span",{className:"text-sm font-medium text-slate-700 flex-1",children:s.label}),e.jsxs("div",{className:"relative w-28 shrink-0",children:[e.jsx("span",{className:"absolute left-3 top-1/2 -translate-y-1/2 text-slate-400 font-bold text-xs",children:"$"}),e.jsx("input",{type:"text",inputMode:"numeric",value:a?g(x):"0",onChange:De=>$e(s.key,Math.max(0,h(De.target.value))),disabled:!a,className:"w-full pl-7 pr-3 py-1.5 bg-slate-50 border border-slate-200 rounded-lg text-sm font-bold text-black focus:outline-none focus:ring-2 focus:ring-yellow-400 focus:border-transparent disabled:opacity-50"})]})]},s.key)})})]},t.name))})]})]}),e.jsxs("div",{className:"bg-white rounded-2xl border border-slate-100 shadow-lg shadow-slate-200/30 p-5 md:p-8 mb-10",children:[e.jsx("h2",{className:"text-lg font-black tracking-tight text-black mb-4",children:"Related Calculators"}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-3",children:[e.jsxs(N,{to:"/tools/rental-property-calculator",className:"group p-4 rounded-xl border border-slate-100 hover:border-yellow-400/50 hover:bg-yellow-50/30 transition-all",children:[e.jsx("div",{className:"text-sm font-bold text-black group-hover:text-yellow-600 transition-colors",children:"Rental Property Calculator"}),e.jsx("div",{className:"text-xs text-slate-400 mt-0.5",children:"Analyze cash flow, cap rate & ROI"})]}),e.jsxs(N,{to:"/tools/closing-cost-calculator",className:"group p-4 rounded-xl border border-slate-100 hover:border-yellow-400/50 hover:bg-yellow-50/30 transition-all",children:[e.jsx("div",{className:"text-sm font-bold text-black group-hover:text-yellow-600 transition-colors",children:"Closing Cost Calculator"}),e.jsx("div",{className:"text-xs text-slate-400 mt-0.5",children:"Estimate all buyer closing fees"})]}),e.jsxs(N,{to:"/tools/commission-calculator",className:"group p-4 rounded-xl border border-slate-100 hover:border-yellow-400/50 hover:bg-yellow-50/30 transition-all",children:[e.jsx("div",{className:"text-sm font-bold text-black group-hover:text-yellow-600 transition-colors",children:"Commission Calculator"}),e.jsx("div",{className:"text-xs text-slate-400 mt-0.5",children:"See how commissions affect proceeds"})]})]})]}
34),e.jsxs("div",{className:"max-w-3xl mx-auto space-y-12 mb-16",children:[e.jsxs("section",{children:[e.jsx("h2",{className:"text-2xl font-black tracking-tight text-black mb-4",children:"How to Use This ARV Calculator"}),e.jsxs("div",{className:"prose prose-slate max-w-none text-slate-600 text-sm leading-relaxed space-y-3",children:[e.jsx("p",{children:"This calculator helps you evaluate fix-and-flip or BRRRR deals by estimating your After Repair Value and projecting total costs and profit before you make an offer."}),e.jsxs("ol",{className:"list-decimal pl-5 space-y-2",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Set your ARV"})," â enter a value directly if you already know it, or switch to the comps method and enter 3 to 6 recently sold comparable properties. The calculator averages their price per square foot and multiplies by your property's size to derive an ARV."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Enter your purchase price"})," â the amount you plan to offer or have under contract. The calculator immediately checks whether you're above or below the maximum allowable offer based on your investor rule percentage."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Build your rehab budget"})," â expand the Rehab Budget section and check off the work items that apply. Choose a quality level (budget, mid-range, or high-end) to auto-fill national average costs, then edit any line item to match local quotes. Add a contingency buffer for surprises."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Adjust deal costs"})," â set your closing cost percentages, agent commission, holding period, and monthly carrying costs to reflect your actual deal structure."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Read the results"})," â the right panel shows your estimated profit, profit margin, ROI, max allowable offer, and a deal health indicator. Green means strong margins, yellow means tight, red means the numbers don't work."]})]})]})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-2xl font-black tracking-tight text-black mb-4",children:"Understanding the 70% Rule"}),e.jsxs("div",{className:"prose prose-slate max-w-none text-slate-600 text-sm leading-relaxed space-y-3",children:[e.jsx("p",{children:"The 70% rule is the most widely used formula for quickly evaluating flip deals. It says you should pay no more than 70% of the ARV minus your rehab costs. The remaining 30% acts as a cushion that covers closing costs on both sides, holding costs during the rehab, and your profit."}),e.jsxs("p",{children:["The formula is simple:"," ",e.jsx("strong",{children:"Max Offer = (ARV x 70%) - Rehab Costs"}),". For example, if a property has an ARV of $300,000 and needs $50,000 in repairs, your maximum offer is ($300,000 x 0.70) - $50,000 = $160,000."]}),e.jsx("p",{children:"Not every deal needs exactly 70%. In fast-moving markets where properties sell quickly and holding costs stay low, experienced investors might stretch to 75% or even 80%. In slower markets or rural areas, a more conservative 65% provides extra protection against longer hold times and unexpected costs. Adjust the slider above to model different scenarios."})]})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-2xl font-black tracking-tight text-black mb-4",children:"Common Rehab Cost Mistakes to Avoid"}),e.jsx("div",{className:"prose prose-slate max-w-none text-slate-600 text-sm leading-relaxed space-y-3",children:e.jsxs("ul",{className:"list-disc pl-5 space-y-2",children:[e.jsxs("li",{children:[e.jsx("strong",{children:"Skipping the contingency"})," â unexpected issues are nearly guaranteed. Plumbing surprises, code violations, or material delays can easily add 10 to 20 percent to your budget. Always include a buffer."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Using a single number for rehab"}),' â a lump-sum estimate like "I think it needs $40K" invites underestimating. Break costs into categories and get line-item bids from contractors to catch hidden costs early.']}),e.jsxs("li",{children:[e.jsx("strong",{children:"Forgetting holding costs"})," â every extra month you own the property costs money. Hard money loan payments, insurance, taxes, and utilities add up fast and eat directly into profit."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Over-improving for the neighborhood"})," â high-end finishes in a mid-range market won't return the extra cost. Your renovations should match the quality level of your comps, not exceed them."]}),e.jsxs("li",{children:[e.jsx("strong",{children:"Ignoring permits"})," â unpermitted work can create problems at resale, from failed inspections to title issues. Budget for permits and factor them into your timeline."]})]})})]}),e.jsxs("section",{children:[e.jsx("h2",{className:"text-2xl font-black tracking-tight text-black mb-6",children:"Frequently Asked Questions"}),e.jsx("div",{className:"space-y-2",children:he.map((t,s)=>e.jsxs("div",{className:"border border-slate-100 rounded-xl overflow-hidden",children:[e.jsxs("button",{onClick:()=>ke(B===s?null:s),className:"w-full flex items-center justify-between p-4 md:p-5 text-left hover:bg-slate-50 transition-colors",children:[e.jsx("span",{className:"text-sm font-bold text-black pr-4",children:t.q}),e.jsx(W,{className:`w-4 h-4 text-slate-400 shrink-0 transition-transform duration-200 ${B===s?"rotate-180":""}`})]}),B===s&&e.jsx("div",{className:"px-4 md:px-5 pb-4 md:pb-5",children:e.jsx("p",{className:"text-sm text-slate-600 leading-relaxed",children:t.a})})]},s))})]})]}),e.jsxs(N,{to:"/contact",className:"fixed bottom-6 right-6 z-40 flex items-center gap-2 px-5 py-3 bg-black text-white rounded-full shadow-xl shadow-black/15 hover:bg-slate-800 hover:scale-105 active:scale-95 transition-all text-sm font-bold",children:[e.jsx(Ge,{className:"w-4 h-4"}),e.jsx("span",{className:"hidden sm:inline",children:"Want something changed?"}),e.jsx("span",{className:"sm:hidden",children:"Help"})]}),e.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(He)}}),e.jsx("script",{type:"application/ld+json",dangerouslySetInnerHTML:{__html:JSON.stringify(Be)}})]})}function bt(){const[o,i]=l.useState({isOpen:!1,tab:"signin"});return e.jsxs("div",{className:"min-h-screen bg-background text-slate-900 font-sans",children:[e.jsx(Le,{isOpen:o.isOpen,onClose:()=>i(m=>({...m,isOpen:!1})),defaultTab:o.tab}),e.jsx(ze,{onAuthClick:m=>i({isOpen:!0,tab:m})}),e.jsx("main",{className:"relative z-10 pt-24 pb-20",children:e.jsx(Xe,{})}),e.jsx(Ue,{})]})}
34export{bt as component};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.