1import{r as m,j as e,L as Y,B as F}from"./index-BohnwZCp.js";import{S as L,A as M,e as I}from"./SiteFooter-BQ7GfuRb.js";import{E,k as D,P}from"./ProjectionDisclaimer-DMfm2mpo.js";import{A as z,T as K}from"./GuideTrustBadges-CosSq4Al.js";import{R as G,C as U,X as H,Y as O,T as W,L as Q,B as R}from"./generateCategoricalChart-gBcdyZjC.js";import{B as X}from"./BarChart-DqU4nmty.js";import"./index-LnHu7TD7.js";const _=[{h2:"Using the Kapitalwise Investment Calculator",body:["Enter your starting amount, additional contribution, contribution frequency, rate of return, and years to grow. The calculator shows your final balance, along with how much came from contributions and how much came from investment growth."]},{h2:"Starting Amount",body:["Starting amount is the amount you're investing to begin with, such as savings, a bonus, or an inheritance."]},{h2:"Additional Contribution",body:["Additional contribution is the amount you plan to add on a recurring basis."]},{h2:"Contribution Frequency",body:["Contribution frequency is how often you add to your investment, such as monthly or annually."]},{h2:"Rate of Return",body:["Rate of return is the annual growth rate you expect your investments to earn."]},{h2:"Years to Grow",body:["Years to grow is the length of time you plan to stay invested before withdrawing the funds."]},{h2:"Compound Frequency",body:["Compound frequency is how often your investment returns are added back to your balance, which then earns returns of its own."]},{h2:"Understanding Investment Returns and Risk",body:["Return expectations vary significantly by asset type. The S&P 500 has averaged roughly 10% to 11% annually over its history since 1957, dropping to around 6.8% once adjusted for inflation. Bonds have historically returned 3% to 5%, depending on the bond type, and real estate has averaged around 5.4% annually since the early 1990s, according to CEIC Data.","These are long-term averages, not annual guarantees. Stock returns are volatile year to year: the S&P 500 finished 2022 down 18%, then posted gains of 26% and 25% in the two years that followed. A 10% long-term average can include years far above or far below that number.","Diversification, spreading money across stocks, bonds, and other asset classes, is the primary way investors manage this volatility. When one holding underperforms, others may offset it."]},{h2:"Assumptions Matter",body:["The rate of return you enter has an outsized effect on your projection, more than almost any other input. A $10,000 investment growing at 5% annually reaches about $12,800 after five years; at 7.5%, it exceeds $14,000 over the same period. Because future returns can't be predicted with certainty, it's worth running the calculator more than once, using a conservative estimate and a more aggressive one, rather than treating a single projection as a guarantee."]}];function s(a,n=0){return isFinite(a)?a.toLocaleString("en-US",{style:"currency",currency:"USD",maximumFractionDigits:n,minimumFractionDigits:n}):"$0"}function J(a){const n=Number(a.replace(/[^0-9.]/g,""));return isFinite(n)?n:0}const B={monthly:12,quarterly:4,annually:1};function oe(){const[a,n]=m.useState(1e4),[i,u]=m.useState(500),[o,c]=m.useState("monthly"),[l,N]=m.useState(7),[h,b]=m.useState(30),[g,w]=m.useState("monthly"),r=m.useMemo(()=>{const t=Math.max(1,Math.round(h)),p=B[g],y=B[o],f=Math.max(p,y),C=Math.max(0,i),T=Math.max(0,l)/100/p;let d=Math.max(0,a),x=Math.max(0,a);const S=[];for(let k=1;k<=t;k++){for(let v=1;v<=f;v++)v*p%f===0&&(d=d*(1+T)),v*y%f===0&&(d+=C,x+=C);S.push({year:k,contributions:Math.round(x),growth:Math.round(Math.max(0,d-x)),total:Math.round(d)})}const A=Math.max(0,d-x);return{years:t,final:d,contributed:x,addedContributions:x-Math.max(0,a),growth:A,growthShare:d>0?A/d*100:0,chart:S}},[a,i,o,l,h,g]),q=o==="monthly"?"mo":o==="quarterly"?"qtr":"yr";return e.jsxs("div",{className:"flex min-h-screen flex-col bg-background",children:[e.jsx(L,{}),e.jsxs("main",{children:[e.jsxs("section",{className:"relative overflow-hidden bg-gradient-to-br from-[#f5f2eb] to-[#eef2ec] pt-16 pb-12 px-6 md:px-16",children:[e.jsx("div",{"aria-hidden":!0,
1className:"pointer-events-none absolute -top-40 right-[-10%] h-[640px] w-[640px] rounded-full opacity-40 blur-3xl",style:{background:"radial-gradient(closest-side, oklch(0.86 0.09 88 / 0.55), transparent)"}}),e.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute -bottom-40 left-[-10%] h-[640px] w-[640px] rounded-full opacity-30 blur-3xl",style:{background:"radial-gradient(closest-side, oklch(0.62 0.16 152 / 0.4), transparent)"}}),e.jsxs("div",{className:"relative mx-auto max-w-4xl",children:[e.jsxs(Y,{to:"/calculators",className:"mb-8 inline-flex items-center gap-1.5 text-sm font-medium text-primary/80 transition-colors hover:text-primary",children:[e.jsx(z,{className:"h-4 w-4"})," Back to Calculators"]}),e.jsxs("h1",{className:"mt-6 text-balance font-serif text-4xl font-light leading-[1.05] tracking-tight text-foreground md:text-5xl",children:["Investment ",e.jsx("em",{className:"italic text-primary",children:"Calculator."})]}),e.jsx("p",{className:"mt-7 max-w-2xl text-lg leading-[1.7] text-muted-foreground",children:"An investment calculator estimates how a portfolio could grow over time based on a starting amount, ongoing contributions, and an assumed rate of return."}),e.jsx(E,{}),e.jsx(K,{tone:"light"})]})]}),e.jsxs("section",{id:"calculator",className:"bg-background py-12",children:[e.jsx("div",{className:"mx-auto max-w-6xl px-4 sm:px-6",children:e.jsxs("div",{className:"rounded-2xl border border-border bg-card p-6 shadow-md md:p-8",children:[e.jsxs("div",{className:"grid gap-10 lg:grid-cols-2",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-[0.22em] text-primary",children:"Your Details"}),e.jsx("h2",{className:"mt-2 font-serif text-2xl font-light tracking-tight text-foreground",children:"Your investment plan"}),e.jsxs("div",{className:"mt-8 space-y-5",children:[e.jsx(j,{id:"start",label:"Starting Amount",prefix:"$",helper:"What you're investing to begin with, such as savings, a bonus, or an inheritance.",value:a,onChange:n}),e.jsx(j,{id:"contrib",label:"Additional Contribution",prefix:"$",helper:"The amount you plan to add on a recurring basis.",value:i,onChange:u}),e.jsx($,{label:"Contribution Frequency",helper:"How often you add to your investment.",value:o,onChange:t=>c(t),options:[{k:"monthly",l:"Monthly"},{k:"quarterly",l:"Quarterly"},{k:"annually",l:"Annually"}]}),e.jsx(j,{id:"rate",label:"Rate of Return",suffix:"%",step:"0.1",helper:"The annual growth rate you expect your investments to earn.",value:l,onChange:N}),e.jsx(j,{id:"years",label:"Years to Grow",helper:"How long you plan to stay invested before withdrawing the funds.",value:h,onChange:b}),e.jsx($,{label:"Compound Frequency",helper:"How often returns are added back to your balance, so they earn returns of their own.",value:g,onChange:t=>w(t),options:[{k:"monthly",l:"Monthly"},{k:"quarterly",l:"Quarterly"},{k:"annually",l:"Annually"}]})]})]}),e.jsxs("div",{className:"lg:border-l lg:border-border lg:pl-10",children:[e.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-[0.22em] text-primary",children:"Live Result"}),e.jsx("h2",{className:"mt-2 font-serif text-2xl font-light tracking-tight text-foreground",children:"Your projected portfolio"}),e.jsxs("div",{className:"mt-6 rounded-2xl border border-border bg-secondary/30 p-8 text-center",children:[e.jsxs("div",{className:"text-[10px] font-semibold uppercase tracking-[0.22em] text-muted-foreground",children:["Balance After ",r.years," Years"]}),e.jsx("div",{className:"mt-3 font-serif text-4xl font-light tracking-tight text-foreground",children:s(r.final)}),e.jsxs("p",{className:"mt-3 text-sm leading-relaxed text-muted-foreground",children:[s(r.growth)," of that is investment growth, or"," ",r.growthShare.toFixed(0),"% of your final balance."]})]}),e.jsxs("div",{className:"mt-4 grid grid-cols-2 gap-3",children:[e.jsxs("div",{className:"rounded-2xl border border-border bg-card p-4 shadow-sm",children:[e.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-[0.16em] text-muted-foreground",children:"Total contributions"}),e.jsx("div",{className:"mt-2 font-serif text-2xl font-light text-foreground",children:s(r.contributed)}),e.jsx("p",{className:"mt-1 text-xs text-muted-foreground",children:"Starting amount plus deposits"})]}),e.jsxs("div",{className:"rounded-2xl border border-primary/40 bg-secondary/30 p-4 shadow-sm",children:[e.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-[0.16em] text-primary",children:"Investment growth"}),e.jsx("div",{className:"mt-2 font-serif text-2xl font-light text-foreground",children:s(r.growth)}),e.jsxs("p",{className:"mt-1 text-xs text-muted-foreground",children:["Earned over ",r.years," years"]})]})]}),e.jsxs("div",{className:"mt-4 rounded-2xl border border-border bg-card p-5 shadow-sm",children:[e.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-[0.22em] text-muted-foreground",children:"Result summary"}),e.jsx("dl",{className:"mt-3 divide-y divide-border/70 text-sm",children:[{k:"Starting amount",v:s(a)},{k:"Additional contribution",v:`${s(i)} / ${q}`},{k:"Rate of return",v:`${l}%`},{k:"Years to grow",v:`${r.years}`},{k:"Contributions added over time",v:s(r.addedContributions)},{k:"Total investment growth",v:s(r.growth)},{k:"Final balance",v:s(r.final)}].map(t=>e.jsxs("div",{className:"flex items-baseline justify-between gap-4 py-2",children:[e.jsx("dt",{className:"text-muted-foreground",children:t.k}),e.jsx("dd",{className:"font-serif text-base font-light text-foreground",children:t.v})]},t.k))}),e.jsx("p",{className:"mt-3 text-xs leading-relaxed text-muted-foreground",children:"Assumes a constant rate of return and that contributions are made at the end of each period. Actual returns vary year to year."})]}),e.jsxs("div",{className:"mt-6",children:[e.jsx(F,{asChild:!0,size:"lg",className:"h-12 w-full rounded-full px-7 text-base shadow-md",children:e.jsxs("a",{href:"/advisor-match",children:["Find My Matched Advisor â Free ",e.jsx(M,{className:"ml-1"})]})}),e.jsx("p",{className:"mt-3 text-center text-xs text-muted-foreground",children:"100% free · Fiduciary advisors · No obligation"}),e.jsxs("a",{href:"https://kapitalwise.com/index",target:"_blank",rel:"noopener noreferrer",className:"mt-5 flex flex-col items-center justify-center text-muted-foreground transition-opacity hover:opacity-80",children:[e.jsx("span",{className:"text-[11px] font-medium uppercase tracking-[0.14em]",children:"Powered by"}),e.jsx("img",{src:D.url,alt:"Kapitalwise",className:"mt-1 h-4 w-auto object-contain mix-blend-multiply"})]})]})]})]}),r.chart.length>0&&e.jsxs("div",{className:"mt-10 border-t border-border pt-8",children:[e.jsx("div",{className:"text-[10px] font-semibold uppercase tracking-[0.22em] text-muted-foreground",children:"Contributions vs. Growth Over Time"}),e.jsx("div",{className:"mt-4 h-[360px] w-full",children:e.jsx(G,{width:"100%",height:"100%",children:e.jsxs(X,{data:r.chart,margin:{top:24,right:24,left:12,bottom:28},children:[e.jsx(U,{strokeDasharray:"3 3",stroke:"hsl(var(--border))",vertical:!1}
1),e.jsx(H,{dataKey:"year",tickLine:!1,axisLine:!1,tick:{fontSize:12},label:{value:"Year",position:"insideBottom",offset:-14,fontSize:12}}),e.jsx(O,{tickLine:!1,axisLine:!1,tick:{fontSize:12},tickFormatter:t=>`$${Math.round(t/1e3)}K`}),e.jsx(W,{cursor:!1,formatter:t=>s(t),labelFormatter:t=>`Year ${t}`}),e.jsx(Q,{verticalAlign:"top",height:28}),e.jsx(R,{activeBar:{fillOpacity:.8},dataKey:"contributions",name:"Contributions",stackId:"a",fill:"oklch(0.35 0.07 240)"}),e.jsx(R,{activeBar:{fillOpacity:.8},dataKey:"growth",name:"Investment growth",stackId:"a",fill:"oklch(0.62 0.16 152)",radius:[4,4,0,0]})]})})}),e.jsx("div",{className:"mt-8 overflow-x-auto",children:e.jsxs("table",{className:"w-full min-w-[520px] text-sm",children:[e.jsx("thead",{children:e.jsxs("tr",{className:"border-b border-border text-left text-[11px] font-semibold uppercase tracking-[0.14em] text-muted-foreground",children:[e.jsx("th",{className:"py-2 pr-4",children:"Year"}),e.jsx("th",{className:"py-2 pr-4 text-right",children:"Contributions"}),e.jsx("th",{className:"py-2 pr-4 text-right",children:"Growth"}),e.jsx("th",{className:"py-2 text-right",children:"Balance"})]})}),e.jsx("tbody",{children:r.chart.map(t=>e.jsxs("tr",{className:"border-b border-border/60",children:[e.jsx("td",{className:"py-2 pr-4 text-foreground",children:t.year}),e.jsx("td",{className:"py-2 pr-4 text-right text-muted-foreground",children:s(t.contributions)}),e.jsx("td",{className:"py-2 pr-4 text-right text-muted-foreground",children:s(t.growth)}),e.jsx("td",{className:"py-2 text-right font-medium text-foreground",children:s(t.total)})]},t.year))})]})})]})]})}),e.jsx(P,{className:"mx-auto mt-8 max-w-6xl px-4 sm:px-6"})]}),_.map((t,p)=>e.jsx("section",{className:p%2===0?"bg-white py-14":"bg-[#F4F7F5] py-14",children:e.jsxs("article",{className:"mx-auto max-w-3xl px-6",children:[e.jsx("h2",{className:"border-l-4 border-primary pl-4 font-serif text-2xl font-light tracking-tight text-foreground md:text-3xl",children:t.h2}),e.jsx("div",{className:"mt-4 text-base leading-relaxed text-gray-600",children:t.body.map((y,f)=>e.jsx("p",{className:"mb-6 last:mb-0",children:y},f))})]})},t.h2)),e.jsxs("section",{className:"relative overflow-hidden bg-navy py-24 text-navy-foreground",children:[e.jsx("div",{"aria-hidden":!0,className:"pointer-events-none absolute inset-0 opacity-[0.14]",style:{backgroundImage:"radial-gradient(circle at 1px 1px, oklch(0.86 0.09 88 / 0.6) 1px, transparent 0)",backgroundSize:"32px 32px"}}),e.jsxs("div",{className:"relative mx-auto max-w-2xl px-6 text-center",children:[e.jsxs("div",{className:"mb-6 inline-flex items-center gap-2 text-[10px] font-semibold uppercase tracking-[0.22em] text-gold",children:[e.jsx("span",{className:"h-px w-8 bg-gold"})," The Next Step"]}),e.jsx("h2",{className:"text-balance font-serif text-3xl font-light leading-[1.1] tracking-tight text-navy-foreground md:text-4xl",children:"Next Steps"}),e.jsx("p",{className:"mx-auto mt-4 mb-8 max-w-xl text-lg leading-relaxed text-white/80",children:"A fiduciary financial advisor can help you set a realistic rate of return based on your actual asset allocation and build a diversified portfolio around your timeline. Matching with an advisor is free and comes with no pressure to commit."}),e.jsx("div",{className:"flex justify-center",children:e.jsx(F,{asChild:!0,size:"lg",className:"h-12 rounded-full px-7 text-base shadow-md",children:e.jsxs("a",{href:"/advisor-match",children:["Find My Matched Advisor â Free ",e.jsx(M,{className:"ml-1"})]})})}),e.jsx("p",{className:"mt-4 text-sm text-white/50",children:"100% free · No obligation · No cold calls"})]})]})]}),e.jsx(I,{})]})}function $({label:a,helper:n,value:i,onChange:u,options:o}){return e.jsxs("div",{children:[e.jsx("span",{className:"block text-sm font-medium text-foreground",children:a}),e.jsx("div",{className:"mt-2 grid grid-cols-3 gap-2",children:o.map(c=>e.jsx("button",{type:"button",onClick:()=>u(c.k),className:`h-11 rounded-xl border px-2 text-sm font-medium transition ${i===c.k?"border-primary bg-primary text-primary-foreground shadow-sm":"border-border bg-background text-foreground hover:border-primary/40"}`,children:c.l},c.k))}),n&&e.jsx("p",{className:"mt-1.5 text-xs leading-relaxed text-muted-foreground",children:n})]})}function j({id:a,label:n,helper:i,prefix:u,suffix:o,step:c,value:l,onCh
1ange:N}){const[h,b]=m.useState(!1),g=h?l===0?"":String(l):l===0?"":l.toLocaleString("en-US",{maximumFractionDigits:2});return e.jsxs("div",{children:[e.jsx("label",{htmlFor:a,className:"block text-sm font-medium text-foreground",children:n}),e.jsxs("div",{className:"relative mt-2",children:[u&&e.jsx("span",{className:"pointer-events-none absolute inset-y-0 left-3 flex items-center text-sm font-medium text-muted-foreground",children:u}),e.jsx("input",{id:a,inputMode:"decimal",step:c,value:g,placeholder:"0",onFocus:()=>b(!0),onBlur:()=>b(!1),onChange:w=>N(J(w.target.value)),className:`h-11 w-full rounded-xl border border-border bg-background text-base text-foreground shadow-sm outline-none transition focus:border-primary focus:ring-2 focus:ring-primary/20 ${u?"pl-7":"pl-3"} ${o?"pr-8":"pr-3"}`}),o&&e.jsx("span",{className:"pointer-events-none absolute inset-y-0 right-3 flex items-center text-sm font-medium text-muted-foreground",children:o})]}),i&&e.jsx("p",{className:"mt-1.5 text-xs leading-relaxed text-muted-foreground",children:i})]})}export{oe 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.