KJE.SocialSecurityCalc=function(){this.iDecimal=0;this.ADJUST_ONLY=false;this.SOCIAL_SECURITY_CURRENT_MAX=168600;this.SOCIAL_SECURITY_AP_MAX=45864;this.SOCIAL_SECURITY_MAX_RATIO=0.2697;this.SOCIAL_EARLIEST_RETIRE_AGE=KJE.SocialSecurityCalc.SOCIAL_EARLIEST_RETIRE_AGE;this.SOCIAL_NORMAL_RETIRE_AGE=67;this.SOCIAL_LATEST_RETIRE_AGE=70;this.EARLY_DISCOUNTS=[0.7,0.75,0.8,0.86666,0.93333,1];this.EARLY_AGE_CUTOFFS=[79,66,0];this.AGE_FULL_BENEFITS=[65,66,67];this.LATE_AGE_CUTOFFS=[72,0];this.LATE_AGE_INCREASES=[0.075,0.08];this.SOCIAL_SPOUSE_BENEFIT=0.5;this.SOCIAL_FULL_BENEFIT_AMT=0;this.cats=null;this.DS_SOCIAL_PAYMENTS=null;this.DR_SOCIAL_PAYMENTS=null;this.MSG_SUMMARY_TEXT=KJE.parameters.get("MSG_SUMMARY_TEXT","Social Security may provide KJE1");this.MSG_GRAPH3=KJE.parameters.get("MSG_GRAPH3","Estimated Monthly Benefits");this.MSG_SUMMARY_TEXT2=KJE.parameters.get("MSG_SUMMARY_TEXT2","If you start collecting your benefits at age KJE2 you could receive approximately KJE3 per year or KJE4 per month. This is KJE5 of your final year's income of KJE6. This is only an estimate. Actual benefits depend on work history and the complete compensation rules used by Social Security.");this.SUMMARY_TEXT="";this.SUMMARY_TEXT2="";this.WAGE_CUTOFFS=[10000,20000,30000,40000,50000,60000,70000,80000,90000,100000,110000,120000,this.SOCIAL_SECURITY_CURRENT_MAX];this.SOCIAL_FULL_BENEFIT=[0.7056,0.6024,0.4852,0.4266,0.3914,0.368,0.3514,0.3389,0.3291,0.312,0.2943,0.2796,this.SOCIAL_SECURITY_MAX_RATIO];this.sSchedule=new KJE.Repeating()};KJE.SocialSecurityCalc.prototype.clear=function(){this.CURRENT_AGE=0;this.HOUSEHOLD_INCOME=0;this.SALARY_PERCENT=0;this.SOCIAL_SECURITY_INCREASE_RATE=0;this.MARRIED=0;this.AGE_OF_RETIREMENT=0};KJE.SocialSecurityCalc.prototype.calculate=function(G){var g=KJE;var k=this.CURRENT_AGE;var s=this.HOUSEHOLD_INCOME;var c=this.SALARY_PERCENT;var q=this.SOCIAL_SECURITY_INCREASE_RATE;var m=this.MARRIED;var H=this.AGE_OF_RETIREMENT;var J=0;var d=0;var o=0;var C=0;var z=0;var a=0;var r=65;var B=0;var b=0;var F=0;var A=0;var D=q/100;if(H=this.LATE_AGE_CUTOFFS[v]){F=this.LATE_AGE_INCREASES[v];break}}if(!this.ADJUST_ONLY){this.SOCIAL_FULL_BENEFIT_AMT=0;b=r-k;var f=b-1;f=(f<0?0:f);d=g.round(KJE.FV_AMT(D,f,this.SOCIAL_SECURITY_CURRENT_MAX),2);this.WAGE_CUTOFFS[this.WAGE_CUTOFFS.length-1]=this.SOCIAL_SECURITY_CURRENT_MAX;J=KJE.FV_AMT(c/100,f,s);var t=J;this.SOCIAL_FULL_BENEFIT_PERCENT=(this.SOCIAL_FULL_BENEFIT[this.SOCIAL_FULL_BENEFIT.length-1]*d)/t;for(var u=0;u0){this.SOCIAL_FULL_BENEFIT_PERCENT=this.SOCIAL_FULL_BENEFIT_PERCENT*(1+this.SOCIAL_SPOUSE_BENEFIT)}this.SOCIAL_FULL_BENEFIT_AMT=g.round(this.SOCIAL_FULL_BENEFIT_PERCENT*t,0);if(m>0){this.SOCIAL_FULL_BENEFIT_PERCENT=this.SOCIAL_FULL_BENEFIT_AMT/J}}var l=this.SOCIAL_LATEST_RETIRE_AGE-this.SOCIAL_EARLIEST_RETIRE_AGE+1;this.cats=new Array(l);this.DS_SOCIAL_PAYMENTS=new Array(l);this.DR_SOCIAL_PAYMENTS=new Array(l);for(v=0;vBenefits Begin",1),h.sReportCol("Amount
per Month",2),h.sReportCol("Amount
per Year",3))}var x=0;for(v=1;v<=l;v++){x=v-1;this.DS_SOCIAL_PAYMENTS[x]=this.DR_SOCIAL_PAYMENTS[x]/12;if(G){h.addRepeat(g.number(x+this.SOCIAL_EARLIEST_RETIRE_AGE,0),g.dollars(this.DR_SOCIAL_PAYMENTS[x]/12),g.dollars(this.DR_SOCIAL_PAYMENTS[x]))}}this.FUTURE_HOUSEHOLD_INCOME=J;this.SOCIAL_SECURITY_MAX=d;this.SOCIAL_AT_RETIRE_AMT=o;this.SOCIAL_AT_RETIRE_AGE=C;this.SOCIAL_AT_RETIRE_AMT_MONTHLY=z;this.SOCIAL_AT_RETIRE_PERCENT=a;this.SOCIAL_FULL_BENEFIT_AGE=r;this.SOCIAL_FULL_BENEFIT_PERCENT=B;this.YEARS_UNTIL_SOCIAL_FULL_BENEFITS=b;this.SOCIAL_DELAYED_RETIRE_PERCENT=F;this.HOUSEHOLD_INCOME_AT_RETIRE=A};KJE.SocialSecurityCalc.prototype.formatReport=function(a){a.dollars("FUTURE_HOUSEHOLD_INCOME",this.FUTURE_HOUSEHOLD_INCOME);a.dollars("HOUSEHOLD_INCOME_AT_RETIRE",this.HOUSEHOLD_INCOME_AT_RETIRE);a.dollars("SOCIAL_SECURITY_MAX",this.SOCIAL_SECURITY_MAX);a.number("SOCIAL_AT_RETIRE_AGE",this.SOCIAL_AT_RETIRE_AGE);a.dollars("SOCIAL_AT_RETIRE_AMT_MONTHLY",this.SOCIAL_AT_RETIRE_AMT_MONTHLY);a.dollars("SOCIAL_AT_RETIRE_AMT",this.SOCIAL_AT_RETIRE_AMT);a.percent("SOCIAL_AT_RETIRE_PERCENT",this.SOCIAL_AT_RETIRE_PERCENT,2);a.dollars("SOCIAL_FULL_BENEFIT_AMT",this.SOCIAL_FULL_BENEFIT_AMT);a.number("SOCIAL_FULL_BENEFIT_AGE",this.SOCIAL_FULL_BENEFIT_AGE);a.percent("SOCIAL_FULL_BENEFIT_PERCENT",this.SOCIAL_FULL_BENEFIT_PERCENT,2);a.year("YEARS_UNTIL_SOCIAL_FULL_BENEFITS",this.YEARS_UNTIL_SOCIAL_FULL_BENEFITS);a.age("CURRENT_AGE",this.CURRENT_AGE);a.dollars("HOUSEHOLD_INCOME",this.HOUSEHOLD_INCOME);a.percent("SALARY_PERCENT",this.SALARY_PERCENT/100,2);a.yesno("MARRIED",this.MARRIED);a.age("AGE_OF_RETIREMENT",this.AGE_OF_RETIREMENT);a.dollars("SOCIAL_SECURITY_CURRENT_MAX",this.SOCIAL_SECURITY_CURRENT_MAX);a.percent("SOCIAL_SECURITY_INCREASE_RATE",this.SOCIAL_SECURITY_INCREASE_RATE/100,2);a.inflationRate("INFLATION_RATE",this.SOCIAL_SECURITY_INCREASE_RATE/100);a.number("SOCIAL_EARLIEST_RETIRE_AGE",this.SOCIAL_EARLIEST_RETIRE_AGE);a.number("SOCIAL_LATEST_RETIRE_AGE",this.SOCIAL_LATEST_RETIRE_AGE);a.percent("SOCIAL_DELAYED_RETIRE_PERCENT",this.SOCIAL_DELAYED_RETIRE_PERCENT,2);a.replace("**REPEATING GROUP**",this.sSchedule.getRepeat())};KJE.SocialSecurityCalc.prototype.formatGraph=function(a,b){b[0].setTitle(this.MSG_GRAPH3);b[0].setTitleGraph(this.MSG_GRAPH3);b[0].show(true);b[0].paint()};KJE.definitions.getSet("**SS_DEFINITION**","Social Security is based on a sliding scale depending on your income, how long you work and at what age you retire. Social Security benefits automatically increase each year based on increases in the Consumer Price Index. Including a spouse increases your Social Security benefits by 1.5 times your individual estimated benefit. Please note that this calculator assumes that only one spouse works. Benefits could be different if your spouse worked and earned a benefit higher than one half of your benefit. If you are a married couple, and both spouses work, you may need to run the calculation twice – once for each spouse and their respective income. This calculator provides only an estimate of your benefits.

The calculations use the 2024 FICA income limit of $168,600 with an annual maximum Social Security benefit of $45,864 ($3,822 per month) for a single person and 1.5 times this amount for a married couple. To receive the maximum benefit would require earning the maximum FICA income for nearly your entire career. You would also need to begin receiving benefits at your full retirement age of 66 or 67 (depending on your birthdate). This calculator rounds the age you can receive full Social Security benefits to the next highest full year. If your birthdate is in 1955 through 1959 your actual full retirement age for Social Security is 66 plus two months for each year after 1954. Your actual benefit may be lower or higher depending on your work history and the complete compensation rules used by Social Security.");KJE.SocialSecurityCalc.SOCIAL_EARLIEST_RETIRE_AGE=62;KJE.RetirementPlanCalc=function(){this.SHOW_SOCIAL=KJE.parameters.get("SHOW_SOCIAL",true);this.MSG_ERROR1=KJE.parameters.get("MSG_ERROR1","Both current savings and monthly income cannot be zero.");this.MSG_ERROR2=KJE.parameters.get("MSG_ERROR2","Current age must be less than retirement age.");this.MSG_ERROR3=KJE.parameters.get("MSG_ERROR3","Start age can't be less than retirement age.");this.NEST_EGG=KJE.parameters.get("NEST_EGG",false);this.MSG_GRAPH_TITLE=KJE.parameters.get("MSG_GRAPH_TITLE","You need to save KJE1 per month to meet your retirement needs.");this.MSG_TITLE=KJE.parameters.get("MSG_TITLE","You may need KJE1 to retire at age KJE2");this.MSG_LABEL_3=KJE.parameters.get("MSG_LABEL_3","Your plan is on track.");this.MSG_LABEL_4=KJE.parameters.get("MSG_LABEL_4","You may need to save more.");this.MSG_RUNOUT=KJE.parameters.get("MSG_RUNOUT_BOLD","Retirement savings runs out at age AGE_RUN_OUT.");this.MSG_SUCCESS=KJE.parameters.get("MSG_SUCCESS_BOLD","Balance at end of retirement is ENDING_BALANCE.");this.MSG_RESULT=KJE.parameters.get("MSG_SUCCESS","Your plan provides KJE1 when you retire. This assumes annual retirement expenses of KJE2 which is KJE3 of your last year's income of KJE4.");this.MSG_RESULT_SOCIAL=KJE.parameters.get("MSG_RESULT_SOCIAL","This includes KJE5 per year from Social Security.");this.MSG_RESULT_EXTRA=KJE.parameters.get("MSG_RESULT_EXTRA","");this.MSG_RESULT_EXTRA_GRAPH=KJE.parameters.get("MSG_RESULT_EXTRA_GRAPH","");this.MSG_SUCCESS_REPORT=KJE.parameters.get("MSG_SUCCESS_REPORT","Does not run out of funds.");this.MSG_RUNOUT_REPORT=KJE.parameters.get("MSG_RUNOUT_REPORT","Retirement funds run out at age KJE1.");this.MSG_INFLATION_REPORT=KJE.parameters.get("MSG_INFLATION_REPORT","This amount is increased INFLATION_RATE each year until you retire and through your retirement to account for inflation.");this.MSG_SOCIAL_SECURITY=KJE.parameters.get("MSG_SOCIAL_SECURITY","This plan includes SOCIALSECURITY_AT_RETIRE per year from Social Security.");this.MSG_START_OF_MESSAGE=KJE.parameters.get("MSG_START_OF_MESSAGE","");this.MSG_GRAPH_REPORT_TITLE=KJE.parameters.get("MSG_GRAPH_REPORT_TITLE","Retirement Savings and Expenditures");this.sGraph2=KJE.parameters.get("GRAPH_2","Savings for retirement");this.sGraph3=KJE.parameters.get("GRAPH_3","Withdrawals for retirement");this.bATRETIREMENT=false;this.RESPONSE="";this.RESPONSE1="";this.RESPONSE2="";this.START_OF_MESSAGE="";this.INCREASE_ANNUAL_SAVINGS=(this.NEST_EGG?false:true);this.YEARS_OF_RETIREMENT=0;this.dAdjustedSavingsRate=0;this.dAdjustedRorRate=0;this.dAdjustedSalaryPercent=0;this.dAdjusteYearsToRetirement=0;this.RESULTS_MSG="";this.INCOME_PERCENT=0;this.AGE_RUN_OUT=0;this.END_OF_RETIREMENT_MESSAGE="";this.SOCIAL_SECURITY_INCREASE_RATE=0.024;this.CURRENT_TAX=0;this.RETIREMENT_TAX=0;this.RETIREMENT_TAX_WITHDRAWALS=false;this.SOCIAL_SECURITY_TAX_WITHDRAWALS=false;this.USE_NET_INCOME=KJE.parameters.get("USE_NET_INCOME",false);this.SHORT_RESULTS=false;this.OTHER_PENSION_START=[0,0,0];[];this.OTHER_PENSION_AMOUNT=[0,0,0];this.OTHER_PENSION_LASTS=[0,0,0];this.OTHER_PENSION_START_MIN=KJE.FloatArray(3);this.OTHER_PENSION_ENFORCE_MIN=new Array(3);this.OTHER_PENSION_USERETIREAGE=new Array(3);for(var a=0;a<3;a++){this.OTHER_PENSION_START_MIN[a]=KJE.parameters.get("OTHER_PENSION_START"+(a+1)+"_MIN",14);this.OTHER_PENSION_ENFORCE_MIN[a]=KJE.parameters.get("OTHER_PENSION_ENFORCE"+(a+1)+"_MIN",false);this.OTHER_PENSION_USERETIREAGE[a]=KJE.parameters.get("OTHER_PENSION_USERETIREAGE"+(a+1),false)}this.OTHER_PENSION_INFLATION=[false,false,false];[];this.OTHER_PENSION_CPP=[KJE.parameters.get("OTHER_PENSION_CPP1",false),KJE.parameters.get("OTHER_PENSION_CPP2",false),KJE.parameters.get("OTHER_PENSION_CPP3",false)];[];this.OTHER_PENSION_COUNT=KJE.parameters.get("OTHER_PENSION_COUNT",0);this.OTHER_PENSION_AMOUNT_ADJUSTED=[0,0,0];this.OTHER_PENSION_AMOUNT_ADJUSTED=[0,0,0];this.CPP_MINIMUM_AGE=60;this.CPP_MAXIMUM_AGE=71;this.CPP_NOMINAL_AGE=65;this.CPP_ADJUSTMENT_EARLY=0.072;this.CPP_ADJUSTMENT_LATE=0.084;this.DD_RETIRE1=KJE.FloatArray(3);this.DD_RETIRE2=KJE.FloatArray(3);this.DS_RETIRE1=KJE.FloatArray(3);this.DR_SALARY=null;this.DR_BEGINING_BALANCE=null;this.DR_ENDING_BALANCE=null;this.DR_INTEREST=null;this.DR_SAVINGS=null;this.DR_RETIREMENT_INCOME=null;this.DR_SOCIAL_SECURITY_INCOME=null;this.DR_RETIREMENT_WITHDRAWAL=null;this.DS_INFLATION_INCREASE=KJE.FloatArray(4);this.DS_INFLATION_RUNOUT=KJE.FloatArray(4);this.DS_SAVEMORE_INCREASE=KJE.FloatArray(5);this.DS_SAVEMORE_RUNOUT=KJE.FloatArray(5);this.CS_INFLATION_RUNOUT=new Array(4);this.CS_SAVEMORE_RUNOUT=new Array(5);this.cats=null;this.cats2=new Array(3);this.CAT_LABELS=KJE.parameters.get("ARRAY_CAT_LABELS",["Projected nestegg required:","Projected nestegg required after Social Security:","Projected nestegg required after current Savings:"]);this.INFLATION_RESULTS=false;this.SAVEMORE_RESULTS=false;this.sSchedule=new KJE.Repeating()};KJE.RetirementPlanCalc.prototype.clear=function(){this.CURRENT_AGE=0;this.HOUSEHOLD_INCOME=0;this.PRE_RATE_OF_RETURN=0;this.AGE_OF_RETIREMENT=0;this.POST_RATE_OF_RETURN=0;this.SALARY_PERCENT=0;this.CURRENT_SAVINGS=0;this.INFLATION_RATE=0;this.INCLUDE_SOCIAL_SECURITY=false;this.MARRIED=false;this.SAVINGS_PERCENT=0;var a=this.DD_RETIRE1.length;for(var c=0;c69?69:m);E.HOUSEHOLD_INCOME=A;E.AGE_OF_RETIREMENT=(x>70?70:x);E.SALARY_PERCENT=s;E.SOCIAL_SECURITY_INCREASE_RATE=o;E.MARRIED=k;E.calculate();g=E.SOCIAL_AT_RETIRE_AMT;N=(m>E.SOCIAL_AT_RETIRE_AGE?m:E.SOCIAL_AT_RETIRE_AGE)}else{g=0;N=65;M=false}this.SOCIALSECURITY_START_AGE=N;this.SOCIALSECURITY_AT_RETIRE=g;this.INCLUDE_SOCIAL_SECURITY=M;var I=e.round(A*(X/100),0);var r=I/12;if(m>x){throw (this.MSG_ERROR2)}this.bATRETIREMENT=false;if(m==x){m=m-1;this.CURRENT_AGE=m;this.bATRETIREMENT=true}var f=Math.round(h+this.YEARS_OF_RETIREMENT);var V=0;var S=0;var U=0;this.DS_SAVINGS=KJE.FloatArray(f);this.DS_WITHDRAWAL=KJE.FloatArray(f);this.DR_SALARY=KJE.FloatArray(f);this.DR_BEGINING_BALANCE=KJE.FloatArray(f);this.DR_ENDING_BALANCE=KJE.FloatArray(f);this.DR_INTEREST=KJE.FloatArray(f);this.DR_SAVINGS=KJE.FloatArray(f);this.DR_RETIREMENT_INCOME=KJE.FloatArray(f);this.DR_SOCIAL_SECURITY_INCOME=KJE.FloatArray(f);this.DR_RETIREMENT_WITHDRAWAL=KJE.FloatArray(f);this.DR_RETIREMENT_TAXES=KJE.FloatArray(f);this.cats=new Array(f);var D=false;for(U=0;Uthis.CPP_NOMINAL_AGE){this.OTHER_PENSION_AMOUNT_ADJUSTED[U]=this.OTHER_PENSION_AMOUNT[U]+((this.OTHER_PENSION_START[U]-this.CPP_NOMINAL_AGE)*this.CPP_ADJUSTMENT_LATE*this.OTHER_PENSION_AMOUNT[U])}else{if(this.OTHER_PENSION_START[U]0){this.DR_SAVINGS[V]=(this.INCREASE_ANNUAL_SAVINGS?((V==0?A:this.DR_SALARY[V-1])*(X/100)):I);this.DR_SALARY[V]=KJE.FV_AMT(s/100,U,A);this.DR_INTEREST[V]=(this.DR_BEGINING_BALANCE[V])*(w);this.DR_RETIREMENT_INCOME[V]=0;this.DR_SOCIAL_SECURITY_INCOME[V]=0;this.DR_RETIREMENT_WITHDRAWAL[V]=0;W=this.DR_SALARY[V];C=W*(1-this.CURRENT_TAX/100);F=W*(this.INCOME_PERCENT/100);l=C*(this.INCOME_PERCENT/100)}else{this.DR_SALARY[V]=KJE.FV_AMT(o/100,(U-h-(this.bATRETIREMENT?1:0)),W);this.DR_INTEREST[V]=this.DR_BEGINING_BALANCE[V]*(j);this.DR_SAVINGS[V]=0;this.DR_RETIREMENT_INCOME[V]=(this.DR_SALARY[V]*(this.INCOME_PERCENT/100))*(1-(this.USE_NET_INCOME?this.CURRENT_TAX/100:0));if((((U+m)-N)>=0)&&M){this.DR_SOCIAL_SECURITY_INCOME[V]=KJE.FV_AMT(o/100,(U+m-N),g);if(this.SOCIAL_SECURITY_TAX_WITHDRAWALS){this.DR_RETIREMENT_TAXES[V]=this.DR_SOCIAL_SECURITY_INCOME[V]*(this.RETIREMENT_TAX/200)}}else{this.DR_SOCIAL_SECURITY_INCOME[V]=0}var L=0;var O=0;for(S=0;S0){L=U+m-(this.OTHER_PENSION_START[S]==0?x:this.OTHER_PENSION_START[S]);if(L>=0){if(this.OTHER_PENSION_LASTS[S]==0||this.OTHER_PENSION_LASTS[S]>L){if(this.OTHER_PENSION_INFLATION[S]){O+=KJE.FV_AMT(o/100,U-1,this.OTHER_PENSION_AMOUNT_ADJUSTED[S]*12)}else{O+=this.OTHER_PENSION_AMOUNT_ADJUSTED[S]*12}}}}}this.DR_SOCIAL_SECURITY_INCOME[V]+=O;if(this.RETIREMENT_TAX_WITHDRAWALS){this.DR_RETIREMENT_TAXES[V]+=O*(this.RETIREMENT_TAX/100)}this.DR_RETIREMENT_WITHDRAWAL[V]=this.DR_RETIREMENT_INCOME[V]+this.DR_RETIREMENT_TAXES[V]-this.DR_SOCIAL_SECURITY_INCOME[V];if(this.USE_NET_INCOME&&this.DR_RETIREMENT_WITHDRAWAL[V]>0&&this.RETIREMENT_TAX_WITHDRAWALS){var z=this.DR_RETIREMENT_WITHDRAWAL[V]/(1-(this.RETIREMENT_TAX/100));this.DR_RETIREMENT_TAXES[V]+=z-this.DR_RETIREMENT_WITHDRAWAL[V];this.DR_RETIREMENT_WITHDRAWAL[V]=z}var u=1;a=KJE.NPV_AMT(j,U-h+1,this.DR_RETIREMENT_WITHDRAWAL[V]);this.DD_RETIRE1[1]+=a;this.DD_RETIRE2[1]+=this.DR_RETIREMENT_WITHDRAWAL[V];R=KJE.NPV_AMT(j,U-h+1,this.DR_RETIREMENT_INCOME[V]);this.DD_RETIRE1[0]+=R;this.DD_RETIRE2[0]+=this.DR_RETIREMENT_INCOME[V]}this.DR_ENDING_BALANCE[V]=this.DR_BEGINING_BALANCE[V]+this.DR_INTEREST[V]+this.DR_SAVINGS[V]-this.DR_RETIREMENT_WITHDRAWAL[V];if((h-U)==1){B=this.DR_ENDING_BALANCE[V]}if(this.DR_ENDING_BALANCE[V]<=0){var T=(this.AGE_RUN_OUT!=0?this.DR_RETIREMENT_WITHDRAWAL[V]:(-1)*this.DR_ENDING_BALANCE[V]);P=KJE.NPV_AMT(j,U-h+1,T);this.DD_RETIRE1[2]+=P;this.DD_RETIRE2[2]+=T;if(this.AGE_RUN_OUT==0){this.AGE_RUN_OUT=U+m}this.DR_RETIREMENT_WITHDRAWAL[V]=this.DR_BEGINING_BALANCE[V]+this.DR_INTEREST[V]+this.DR_SAVINGS[V];this.DR_ENDING_BALANCE[V]=0}}var t=this.DR_ENDING_BALANCE[V];this.END_OF_RETIREMENT_MESSAGE=null;if(t==0){this.END_OF_RETIREMENT_MESSAGE=this.MSG_RUNOUT;this.RESULTS_MSG=this.MSG_LABEL_4;this.RESPONSE=this.RESPONSE2}else{this.END_OF_RETIREMENT_MESSAGE=this.MSG_SUCCESS;this.RESULTS_MSG=this.MSG_LABEL_3;this.RESPONSE=this.RESPONSE1}if(this.NEST_EGG){this.RESULTS_MSG=KJE.getKJEReplaced(this.MSG_TITLE,e.dollars(this.DD_RETIRE1[0]),e.number(x))}var G=KJE.RetirementPlanCalc.getSuccessScale(this.DD_RETIRE1[1],B);this.RESULTS_MSG=KJE.replace("KJERetirementPlanScalePoint","KJERetirementPlanScalePoint"+KJE.number(G),this.RESULTS_MSG);K=0;if(t==0){this.dAdjustedSavingsRate=this.getAdjustedSavingsRate((m+f),w,j);this.dAdjustedRorRate=this.getAdjustedRorRate((m+f),w,j);this.dAdjustedSalaryPercent=this.getAdjustedSalaryPercent((m+f),w,j);this.dAdjusteYearsToRetirement=this.getAdjustedYearsToRetirement((m+f),w,j)+m;if(h<=1){c=this.DD_RETIRE1[2]}else{c=e.round(this.dAdjustedSavingsRate*A,2)}K=e.round(c/12,2)}if(this.INFLATION_RESULTS){for(U=0;U<4;U++){this.DS_INFLATION_INCREASE[U]=(U*0.03+o/100);if(U==3){this.DS_INFLATION_INCREASE[U]=((U+1)*0.03+o/100)}this.DS_INFLATION_RUNOUT[U]=this.getRunoutAge(m,p,s/100,A,w,X/100,this.DS_INFLATION_INCREASE[U],j,this.INCOME_PERCENT/100,M,o/100,h,N,g,110,true);this.CS_INFLATION_RUNOUT[U]=e.percent(this.DS_INFLATION_INCREASE[U])}}if(this.SAVEMORE_RESULTS){for(U=0;U<5;U++){this.DS_SAVEMORE_INCREASE[U]=(U*0.04+X/100);this.DS_SAVEMORE_RUNOUT[U]=this.getRunoutAge(m,p,s/100,A,w,this.DS_SAVEMORE_INCREASE[U],o/100,j,this.INCOME_PERCENT/100,M,o/100,h,N,g,110,true);this.CS_SAVEMORE_RUNOUT[U]=e.percent(this.DS_SAVEMORE_INCREASE[U])}}if(Q){var H=this.sSchedule;H.clearRepeat();var J=(M||this.OTHER_PENSION_COUNT>0?H.sReportCol(D?"Pension Income
OAS/CPP
or QPP":"Social
Security
Income",5):null);if(J&&!M){J=J.replace("","","-->")}if(this.SHORT_RESULTS){H.addHeader(H.sReportCol("Age",9),H.sReportCol("Interest
and
Savings",8),H.sReportCol("Retirement
Account
Withdrawals",6),H.sReportCol("Ending
Retirement
Balance",7))}else{H.addHeader(H.sReportCol("Age",9),H.sReportCol("Beginning
Retirement
Balance",1),H.sReportCol("
Investment
Growth",2),(!this.NEST_EGG?(this.INCREASE_ANNUAL_SAVINGS?KJE.replace("CALC_RESULT",e.percent(X/100,2),H.sReportCol("Contributions
at CALC_RESULT
of Income",3)):KJE.replace("CALC_RESULT",e.percent(X/100,2),H.sReportCol("

Contributions",10))):null),KJE.replace("CALC_RESULT",e.percent(this.INCOME_PERCENT/100,0),H.sReportCol("
Annual Income
Desired",4)),J,(this.USE_NET_INCOME?H.sReportCol("Estimated
Retirement
Taxes",8):null),H.sReportCol("Retirement
Account
Withdrawals",6),H.sReportCol("Ending
Retirement
Balance",7))}}if(!M){this.DS_RETIRE1=KJE.FloatArray(2);this.cats2=new Array(2);this.cats2[0]=this.CAT_LABELS[0]+" "+e.dollars(this.DD_RETIRE1[0]);this.cats2[1]=this.CAT_LABELS[2]+" "+e.dollars(this.DD_RETIRE1[2]);for(S=0;S0?e.dollars(this.DR_SOCIAL_SECURITY_INCOME[V]):null),(this.USE_NET_INCOME?e.dollars(this.DR_RETIREMENT_TAXES[V],this.iDecimals):null),e.dollars(this.DR_RETIREMENT_WITHDRAWAL[V]),e.dollars(this.DR_ENDING_BALANCE[V]))}}if(this.DR_RETIREMENT_WITHDRAWAL[V]<0){this.DR_RETIREMENT_WITHDRAWAL[V]=0}}if(this.MSG_START_OF_MESSAGE=("")){this.START_OF_MESSAGE=""}else{this.START_OF_MESSAGE=KJE.replace("NEED_AT_RETIRE_AFSS",e.dollars(this.DD_RETIRE1[1],0),this.MSG_START_OF_MESSAGE);this.START_OF_MESSAGE=KJE.replace("NEED_THRU_RETIRE_AFSS",e.dollars(this.DD_RETIRE2[1],0),this.START_OF_MESSAGE)+" "}this.SOCIAL_SECURITY_PERCENT=b;this.SOCIAL_SECURITY_SALARY=d;this.ENDING_BALANCE=t;this.ANNUAL_SAVINGS=I;this.MONTHLY_SAVINGS=r;this.INCOME_AT_RETIRE=W;this.INCOME_AT_RETIRE_NET=C;this.INCOME_REQUIRED_AT_RETIRE=F;this.INCOME_REQUIRED_AT_RETIRE_NET=l;this.SOCIALSECURITY_AT_RETIRE=g;this.SOCIALSECURITY_START_AGE=N;this.BALANCE_AT_RETIRE=B;this.ADJUST_ANNUAL_SAVINGS=c;this.ADJUST_MONTHLY_SAVINGS=K};KJE.RetirementPlanCalc.prototype.formatReport=function(a){a.replace("END_OF_RETIREMENT_MESSAGE",this.END_OF_RETIREMENT_MESSAGE);var b=0;for(b=0;bthis.AGE_OF_RETIREMENT?this.OTHER_PENSION_START[b]:this.AGE_OF_RETIREMENT);a.dollars("OTHER_PENSION_AMOUNT"+(b+1),this.OTHER_PENSION_AMOUNT_ADJUSTED[b]);a.replace("OTHER_PENSION_INFLATION"+(b+1),(this.OTHER_PENSION_INFLATION[b]?this.MSG_INFLATION_REPORT:""));a.number("OTHER_PENSION_LASTS"+(b+1),this.OTHER_PENSION_LASTS[b])}if(this.INFLATION_RESULTS){for(b=0;b<4;b++){a.inflationRate("INFLATION_INCREASE"+b,this.DS_INFLATION_INCREASE[b]);if(this.DS_INFLATION_RUNOUT[b]<110){a.replace("INFLATION_MSG"+b,KJE.replace("KJE1",KJE.number(this.DS_INFLATION_RUNOUT[b],this.MSG_RUNOUT_REPORT)))}else{a.replace("INFLATION_MSG"+b,this.MSG_SUCCESS_REPORT)}}}if(this.SAVEMORE_RESULTS){for(b=0;b<5;b++){a.percent("SAVEMORE_INCREASE"+b,this.DS_SAVEMORE_INCREASE[b],2);if(this.DS_SAVEMORE_RUNOUT[b]<110){a.number("SAVEMORE_MSG"+b,this.MSG_RUNOUT_REPORT+" "+this.DS_SAVEMORE_RUNOUT[b])}else{a.replace("SAVEMORE_MSG"+b,this.MSG_SUCCESS_REPORT)}}}if(this.ENDING_BALANCE==0&&!this.bATRETIREMENT&&this.CURRENT_AGE!=this.AGE_OF_RETIREMENT-1){a.replace("","");a.replace("","");a.replace("","");a.replace("","");a.returnRate("ADJUST_SAVINGS_RATE",this.dAdjustedSavingsRate);a.returnRate("ADJUST_ROR",this.dAdjustedRorRate);a.percent("ADJUST_INCOME_REQUIRED",this.dAdjustedSalaryPercent);a.year("ADJUST_YEARS",this.dAdjusteYearsToRetirement)}else{a.replace("","","-->");a.replace("","")}a.dollars("ADJUST_ANNUAL_SAVINGS",this.ADJUST_ANNUAL_SAVINGS);a.dollars("ADJUST_MONTHLY_SAVINGS",this.ADJUST_MONTHLY_SAVINGS);a.replace("INCREASE_ANNUAL_SAVINGS",(this.INCREASE_ANNUAL_SAVINGS?"will":"does not"));a.age("CURRENT_AGE",this.CURRENT_AGE+(this.bATRETIREMENT?1:0));a.dollars("HOUSEHOLD_INCOME",this.HOUSEHOLD_INCOME);a.returnRate("PRE_RATE_OF_RETURN",this.PRE_RATE_OF_RETURN/100);a.age("AGE_OF_RETIREMENT",this.AGE_OF_RETIREMENT);a.returnRate("POST_RATE_OF_RETURN",this.POST_RATE_OF_RETURN/100);a.percent("SALARY_PERCENT",this.SALARY_PERCENT/100,2);a.year("YEARS_UNTIL_RETIREMENT",this.YEARS_UNTIL_RETIREMENT);a.year("YEARS_OF_RETIREMENT",this.YEARS_OF_RETIREMENT);a.percent("INCOME_PERCENT",this.INCOME_PERCENT/100,2);a.dollars("CURRENT_SAVINGS",this.CURRENT_SAVINGS);a.inflationRate("INFLATION_RATE",this.INFLATION_RATE/100);if(this.INCLUDE_SOCIAL_SECURITY){a.replace("SOCIAL_SECURITY_MSG",this.MSG_SOCIAL_SECURITY);a.dollars("SOCIALSECURITY_AT_RETIRE",this.SOCIALSECURITY_AT_RETIRE)}else{a.replace("SOCIAL_SECURITY_MSG","");a.dollars("SOCIALSECURITY_AT_RETIRE",0)}a.yesno("RETIREMENT_TAX_WITHDRAWALS",this.RETIREMENT_TAX_WITHDRAWALS);a.yesno("SOCIAL_SECURITY_TAX_WITHDRAWALS",this.SOCIAL_SECURITY_TAX_WITHDRAWALS);a.yesno("INCLUDE_SOCIAL_SECURITY",this.INCLUDE_SOCIAL_SECURITY);a.yesno("INCLUDE_SOCIAL_SECURITY",this.INCLUDE_SOCIAL_SECURITY);a.taxRate("CURRENT_TAX",this.CURRENT_TAX/100);a.taxRate("RETIREMENT_TAX",this.RETIREMENT_TAX/100);a.yesno("MARRIED",this.MARRIED);a.percent("SOCIAL_SECURITY_PERCENT",this.SOCIAL_SECURITY_PERCENT);a.dollars("SOCIAL_SECURITY_SALARY",this.SOCIAL_SECURITY_SALARY);a.dollars("PV_ENDING_BALANCE",KJE.NPV_AMT(KJE.NPV_AMT(this.INFLATION_RATE/100,Math.round(this.YEARS_UNTIL_RETIREMENT+this.YEARS_OF_RETIREMENT),this.ENDING_BALANCE)));a.dollars("ENDING_BALANCE",this.ENDING_BALANCE);a.percent("SAVINGS_PERCENT",this.SAVINGS_PERCENT/100,2);a.dollars("ANNUAL_SAVINGS",this.ANNUAL_SAVINGS);a.dollars("MONTHLY_SAVINGS",this.MONTHLY_SAVINGS);a.dollars("INCOME_AT_RETIRE_NET",this.INCOME_AT_RETIRE_NET);a.dollars("INCOME_AT_RETIRE",this.INCOME_AT_RETIRE);a.dollars("INCOME_REQUIRED_AT_RETIRE_NET",this.INCOME_REQUIRED_AT_RETIRE_NET);a.dollars("INCOME_REQUIRED_AT_RETIRE",this.INCOME_REQUIRED_AT_RETIRE);a.number("SOCIALSECURITY_START_AGE",this.SOCIALSECURITY_START_AGE);a.dollars("BALANCE_AT_RETIRE",this.BALANCE_AT_RETIRE);a.replace("RESULTS_MSG",this.RESULTS_MSG);a.replace("RESPONSE",this.RESPONSE);a.age("AGE_RUN_OUT",this.AGE_RUN_OUT);a.dollars("ENDING_BALANCE",this.ENDING_BALANCE);a.dollars("NEED_AT_RETIRE_AFSS",this.DD_RETIRE1[1]);a.dollars("NEED_AT_RETIRE_PLAN",this.DD_RETIRE1[2]);a.dollars("NEED_AT_RETIRE",this.DD_RETIRE1[0]);a.dollars("NEED_THRU_RETIRE_AFSS",this.DD_RETIRE2[1]);a.dollars("NEED_THRU_RETIRE_PLAN",this.DD_RETIRE2[2]);a.dollars("NEED_THRU_RETIRE",this.DD_RETIRE2[0]);a.replace("**REPEATING GROUP**",this.sSchedule.getRepeat())};KJE.RetirementPlanCalc.prototype.formatGraph=function(a,b){if(!this.NEST_EGG&&b[0]){b[0].setTitle(this.MSG_GRAPH_REPORT_TITLE);b[0].setTitleGraph(this.MSG_GRAPH_REPORT_TITLE);b[0].show(true);b[0].paint()}};KJE.RetirementPlanCalc.prototype.getRunoutAge=function(v,y,F,u,H,g,E,e,b,h,z,A,r,w,J,j){var a=y;var G=0;var l=0;var D=0;var t=0;var x=0;var p=0;var C=0;var I=0;var B=0;var d=u*g;var c=this.USE_NET_INCOME;var m=this.CURRENT_TAX/100;for(var s=1;s<=(J-v);s++){B=0;I=0;p=0;C=0;if((A-s)>0){G=KJE.FV_AMT(F,s,u);l=a*(H);D=(this.INCREASE_ANNUAL_SAVINGS?G*(g):d);t=0;x=G}else{G=KJE.FV_AMT(E,s-A,x);l=a*(e);D=0;t=G*(b)*(1-(c?m:0));if(((s+v)-r>=0)&&(h>0)){p=KJE.FV_AMT(z,(s+v)-r,w);if(this.SOCIAL_SECURITY_TAX_WITHDRAWALS){B=p*(this.RETIREMENT_TAX/200)}}var k=this.OTHER_PENSION_AMOUNT.length;var i=0;for(var o=0;o0){i=this.OTHER_PENSION_START[o]==0?(s-A):(s+v-this.OTHER_PENSION_START[o]);if(this.OTHER_PENSION_LASTS[o]==0||this.OTHER_PENSION_LASTS[o]>i){if(this.OTHER_PENSION_INFLATION[o]){I+=KJE.FV_AMT(E,(s),this.OTHER_PENSION_AMOUNT_ADJUSTED[o]*12)}else{I+=this.OTHER_PENSION_AMOUNT_ADJUSTED[o]*12}}}}if(this.RETIREMENT_TAX_WITHDRAWALS){B=I*(this.RETIREMENT_TAX/100)}C=t+B-p-I;if(c&&C>0&&this.RETIREMENT_TAX_WITHDRAWALS){var f=C/(1-(this.RETIREMENT_TAX/100));B+=f-C;C=f}}a=a+l+D-C;if(a<0){J=s+v;break}}if(j){return J}return a};KJE.RetirementPlanCalc.prototype.getAdjustedSavingsRate=function(b,e,d){var c=200;var g=c/2;var a=0;for(var f=1;f<50;f++){a=this.getRunoutAge(this.CURRENT_AGE,this.CURRENT_SAVINGS,this.SALARY_PERCENT/100,this.HOUSEHOLD_INCOME,e,c,this.INFLATION_RATE/100,d,this.INCOME_PERCENT/100,this.INCLUDE_SOCIAL_SECURITY,this.INFLATION_RATE/100,this.YEARS_UNTIL_RETIREMENT,this.SOCIALSECURITY_START_AGE,this.SOCIALSECURITY_AT_RETIRE,b,false);if(a>0&&a<1){return KJE.round(c+5e-8,7)}else{if(a<=0){c+=g}else{c-=g}}g=g/2}return KJE.round(c+5e-8,7)};KJE.RetirementPlanCalc.prototype.getAdjustedRorRate=function(b,e,d){var c=e;var h=0.5;var a=0;var f=KJE;for(var g=1;g<50;g++){a=this.getRunoutAge(this.CURRENT_AGE,this.CURRENT_SAVINGS,this.SALARY_PERCENT/100,this.HOUSEHOLD_INCOME,c,this.SAVINGS_PERCENT/100,this.INFLATION_RATE/100,d,this.INCOME_PERCENT/100,this.INCLUDE_SOCIAL_SECURITY,this.INFLATION_RATE/100,this.YEARS_UNTIL_RETIREMENT,this.SOCIALSECURITY_START_AGE,this.SOCIALSECURITY_AT_RETIRE,b,false);if(a>0&&a<1){return f.round(c+0.00005,4)}else{if(a<=0){c+=h}else{c-=h}}h=h/2}return f.round(c+0.00005,4)};KJE.RetirementPlanCalc.prototype.getAdjustedSalaryPercent=function(b,e,d){var c=this.INCOME_PERCENT/100;var h=0.5;var a=0;var f=KJE;for(var g=1;g<50;g++){a=this.getRunoutAge(this.CURRENT_AGE,this.CURRENT_SAVINGS,this.SALARY_PERCENT/100,this.HOUSEHOLD_INCOME,e,this.SAVINGS_PERCENT/100,this.INFLATION_RATE/100,d,c,this.INCLUDE_SOCIAL_SECURITY,this.INFLATION_RATE/100,this.YEARS_UNTIL_RETIREMENT,this.SOCIALSECURITY_START_AGE,this.SOCIALSECURITY_AT_RETIRE,b,false);if(a>0&&a<1){return f.round(c-0.005,2)}else{if(a<=0){c-=h}else{c+=h}}h=h/2}return f.round(c-0.005,4)};KJE.RetirementPlanCalc.prototype.getAdjustedYearsToRetirement=function(c,i,h){var g=0;var f=this.INCLUDE_SOCIAL_SECURITY;if(f){var d=new KJE.SocialSecurityCalc()}for(var b=1;b<50;b++){var e=0;var a=0;if(this.INCLUDE_SOCIAL_SECURITY){d.clear();d.CURRENT_AGE=(this.CURRENT_AGE>69?69:this.CURRENT_AGE);d.HOUSEHOLD_INCOME=this.HOUSEHOLD_INCOME;d.AGE_OF_RETIREMENT=(this.CURRENT_AGE+this.YEARS_UNTIL_RETIREMENT+b>70?70:this.CURRENT_AGE+this.YEARS_UNTIL_RETIREMENT+b);d.SALARY_PERCENT=this.SALARY_PERCENT;d.SOCIAL_SECURITY_INCREASE_RATE=this.INFLATION_RATE;d.MARRIED=this.MARRIED;d.calculate();a=d.SOCIAL_AT_RETIRE_AMT;e=d.SOCIAL_AT_RETIRE_AGE}g=this.getRunoutAge(this.CURRENT_AGE,this.CURRENT_SAVINGS,this.SALARY_PERCENT/100,this.HOUSEHOLD_INCOME,i,this.SAVINGS_PERCENT/100,this.INFLATION_RATE/100,h,this.INCOME_PERCENT/100,this.INCLUDE_SOCIAL_SECURITY,this.INFLATION_RATE/100,(this.YEARS_UNTIL_RETIREMENT+b),e,a,c+b,false);if(g>0){return(this.YEARS_UNTIL_RETIREMENT+b)}}return(this.YEARS_UNTIL_RETIREMENT+50)};KJE.RetirementPlanCalc.prototype.getGraphTitle=function(b){var a="";if(this.NEST_EGG){a=KJE.getKJEReplaced(this.MSG_GRAPH_TITLE,KJE.dollars(this.ADJUST_MONTHLY_SAVINGS))}else{if(KJE.lang=="EN"||KJE.lang=="SP"){a=(this.MSG_RESULT_EXTRA_GRAPH==""?(this.ENDING_BALANCE>0?this.MSG_SUCCESS:this.MSG_RUNOUT):this.MSG_RESULT_EXTRA_GRAPH)+"

"+this.MSG_RESULT_EXTRA+this.MSG_RESULT+(this.SHOW_SOCIAL?" "+this.MSG_RESULT_SOCIAL:"")+"
";if(b){a=KJE.replace("AGE_RUN_OUT",KJE.number(this.AGE_RUN_OUT),a);a=KJE.replace("ENDING_BALANCE",KJE.dollars(this.ENDING_BALANCE),a);a=KJE.replace("NEED_AT_RETIRE_AFSS",KJE.dollars(this.DD_RETIRE1[1]),a);a=KJE.replace("NEED_THRU_RETIRE_AFSS",KJE.dollars(this.DD_RETIRE2[1]),a);a=KJE.getKJEReplaced(a,KJE.dollars(this.BALANCE_AT_RETIRE),KJE.dollars(this.INCOME_REQUIRED_AT_RETIRE),KJE.percent(this.INCOME_PERCENT/100),KJE.dollars(this.INCOME_AT_RETIRE),(this.SHOW_SOCIAL?KJE.dollars(this.SOCIALSECURITY_AT_RETIRE):""))}}else{a=this.MSG_GRAPH_REPORT_TITLE}}return a};KJE.RetirementPlanCalc.getSuccessScale=function(d,e){var h=d*2;var c=200;var g=200;var a=h/c;for(var b=0;ba*b){g=b}else{g=b;break}}var f=e-d;if(f<=10000&&f>=-10000){g=100}if(g<=25){g=0}else{if(g>25&&g<100){g=Math.round(((g-25)/75)*50)}else{if(g==100){g=50}else{if(g>100&&g<200){g=Math.round(((g-100)/100)*50)+50}else{g=100}}}}g=Math.round(g/5)*5;return KJE.round(g)};KJE.CalcName="Retirement Planner Calculator";KJE.CalcType="retirementplan";KJE.CalculatorTitleTemplate="KJE1";KJE.gHeight=300;KJE.initialize=function(){KJE.CalcControl=new KJE.RetirementPlanCalc();KJE.GuiControl=new KJE.RetirementPlan(KJE.CalcControl)};KJE.RetirementPlan=function(i){var e=KJE;var g=KJE.inputs.items;KJE.NumberSlider("CURRENT_AGE","Current age",14,90,0);KJE.NumberSlider("AGE_OF_RETIREMENT","Age at retirement",10,90,0,1);KJE.DollarSlider("HOUSEHOLD_INCOME","Annual household income",1,10000000,0);KJE.PercentSlider("SAVINGS_PERCENT","Percent of income to save",0,100,2,1);KJE.DollarSlider("CURRENT_SAVINGS","Current retirement savings",0,100000000,0,1,5);KJE.PercentSlider("SALARY_PERCENT","Expected income increase",0,KJE.parameters.get("MAX_SALARY_PERCENT",20),2,1);KJE.PercentSlider("INCOME_PERCENT","Pre-retirement income desired in retirement",KJE.parameters.get("MIN_INCOME_PERCENT",40),KJE.parameters.get("MAX_INCOME_PERCENT",160),0,5);KJE.NumberSlider("YEARS_OF_RETIREMENT","Years of retirement income",1,100,0,1);KJE.DollarSlider("OTHER_PENSION_AMOUNT1","Misc. income / pensions",KJE.parameters.get("OTHER_PENSION_AMT1_MIN",0),KJE.parameters.get("OTHER_PENSION_AMT1_MAX",20000),0);KJE.DollarSlider("OTHER_PENSION_AMOUNT2","Retirement work income",KJE.parameters.get("OTHER_PENSION_AMT2_MIN",0),KJE.parameters.get("OTHER_PENSION_AMT2_MAX",20000),0);KJE.DollarSlider("OTHER_PENSION_AMOUNT3","Additional retirement income",KJE.parameters.get("OTHER_PENSION_AMT3_MIN",0),KJE.parameters.get("OTHER_PENSION_AMT3_MAX",20000),0);KJE.Checkbox("OTHER_PENSION_INFLATION1","Increase with inflation",true,KJE.parameters.get("MSG_OTHER_PENSION_AMOUNT1","Misc. income / pensions"));KJE.Checkbox("OTHER_PENSION_INFLATION2","Increase with inflation",true,KJE.parameters.get("MSG_OTHER_PENSION_AMOUNT2","Retirement work income"));KJE.Checkbox("OTHER_PENSION_INFLATION3","Increase with inflation",true,KJE.parameters.get("MSG_OTHER_PENSION_AMOUNT3","Additional retirement income"));KJE.InvestRateSlider("PRE_RATE_OF_RETURN","Rate of return before retirement");KJE.InvestRateSlider("POST_RATE_OF_RETURN","Rate of return during retirement");KJE.InflationRateSlider("INFLATION_RATE","Expected rate of inflation");KJE.PercentSlider("CURRENT_TAX","Current tax rate",0,50,2);KJE.PercentSlider("RETIREMENT_TAX","Retirement tax rate",0,50,2);KJE.Checkbox("MARRIED","Married",true,"Check here");KJE.Checkbox("INCLUDE_SOCIAL_SECURITY","Include Social Security",true,"Check here");KJE.Checkbox("RETIREMENT_TAX_WITHDRAWALS","Tax retirement income",false,"Check here");KJE.Checkbox("SOCIAL_SECURITY_TAX_WITHDRAWALS","Tax 1/2 Social Security",false,"Check here");this.USE_OTHER_PENSION_START1=KJE.parameters.get("SHOW_PENSION_START1",false);this.USE_OTHER_PENSION_START2=KJE.parameters.get("SHOW_PENSION_START2",false);this.USE_OTHER_PENSION_START3=KJE.parameters.get("SHOW_PENSION_START3",false);if(this.USE_OTHER_PENSION_START1){KJE.NumberSlider("OTHER_PENSION_START1","Misc. income / pensions starts",KJE.parameters.get("OTHER_PENSION_START1_MIN",14),KJE.parameters.get("OTHER_PENSION_START1_MAX",90),0)}if(this.USE_OTHER_PENSION_START2){KJE.NumberSlider("OTHER_PENSION_START2","Retirement work income starts",KJE.parameters.get("OTHER_PENSION_START2_MIN",14),KJE.parameters.get("OTHER_PENSION_START2_MAX",90),0)}if(this.USE_OTHER_PENSION_START3){KJE.NumberSlider("OTHER_PENSION_START3","Additional retirement income starts",KJE.parameters.get("OTHER_PENSION_START3_MIN",14),KJE.parameters.get("OTHER_PENSION_START3_MAX",90),0)}this.USE_PENSION_LASTS1=KJE.parameters.get("SHOW_PENSION_YEAR1",false);this.USE_PENSION_LASTS2=KJE.parameters.get("SHOW_PENSION_YEAR2",false);if(this.USE_PENSION_LASTS1){KJE.NumberSlider("OTHER_PENSION_LASTS1","Years to work",0,30,0,1)}if(this.USE_PENSION_LASTS2){KJE.NumberSlider("OTHER_PENSION_LASTS2","Years to work",0,30,0,1)}var h=KJE.gNewGraph((i.NEST_EGG?KJE.gCATEGORIES:KJE.gLINE),"GRAPH1",true,false,KJE.colorList[1],i.getGraphTitle());if(h){h._titleXAxis.setText(KJE.parameters.get("MSG_GRAPH_1",""));h._axisX.setVisible(!i.NEST_EGG);h._axisY.setVisible(true);h._legend._iOrientation=KJE.gLegend.BOTTOM;h._showItemLabel=true;h._showItemLabelOnTop=true;h._axisX._fSpacingPercent=0.2}var a=KJE.parameters.get("MSG_DROPPER_TITLE","Retirement plan inputs:");var c=KJE.parameters.get("MSG_DROPPER_CLOSETITLE"," Retire at age KJE1 with KJE2 of current income");var j=function(){return a+KJE.subText(KJE.getKJEReplaced(c,KJE.number(i.AGE_OF_RETIREMENT),KJE.percent(i.INCOME_PERCENT/100,3)),"KJECenter")};KJE.addDropper(new KJE.Dropper("INPUTS",true,a,j),KJE.colorList[0]);var b=KJE.parameters.get("MSG_DROPPER2_TITLE","Investment returns, inflation and Social Security:");var d=KJE.parameters.get("MSG_DROPPER2_CLOSETITLE","KJE1 pre-retirement, KJE2 in retirement, KJE3 inflation, Include Social Security? KJE4");var f=function(){return b+KJE.subText(KJE.getKJEReplaced(d,KJE.percent(i.PRE_RATE_OF_RETURN/100,3),KJE.percent(i.POST_RATE_OF_RETURN/100,3),KJE.percent(i.INFLATION_RATE/100,3),(i.INCLUDE_SOCIAL_SECURITY?KJE.MSG_YES:KJE.MSG_NO)),"KJECenter")};KJE.addDropper(new KJE.Dropper("INPUTS2",false,b,f),KJE.colorList[0]);this.DIV_RESULTS=document.getElementById("KJE-C-RESULTS");KJE.addDiv("RESULTS",KJE.colorList[1])};KJE.RetirementPlan.clear=function(){if(this.DIV_RESULTS){this.DIV_RESULTS.innerHTML=""}};KJE.RetirementPlan.prototype.setValues=function(b){var a=KJE.inputs.items;b.CURRENT_AGE=a.CURRENT_AGE.getValue();b.HOUSEHOLD_INCOME=a.HOUSEHOLD_INCOME.getValue();b.PRE_RATE_OF_RETURN=a.PRE_RATE_OF_RETURN.getValue();b.AGE_OF_RETIREMENT=a.AGE_OF_RETIREMENT.getValue();b.POST_RATE_OF_RETURN=a.POST_RATE_OF_RETURN.getValue();b.SALARY_PERCENT=a.SALARY_PERCENT.getValue();b.YEARS_OF_RETIREMENT=a.YEARS_OF_RETIREMENT.getValue();b.INCOME_PERCENT=a.INCOME_PERCENT.getValue();b.CURRENT_SAVINGS=a.CURRENT_SAVINGS.getValue();b.INFLATION_RATE=a.INFLATION_RATE.getValue();b.SAVINGS_PERCENT=a.SAVINGS_PERCENT.getValue();b.INCLUDE_SOCIAL_SECURITY=a.INCLUDE_SOCIAL_SECURITY.getValue();b.MARRIED=a.MARRIED.getValue();b.CURRENT_TAX=a.CURRENT_TAX.getValue();b.RETIREMENT_TAX=a.RETIREMENT_TAX.getValue();b.OTHER_PENSION_AMOUNT[0]=a.OTHER_PENSION_AMOUNT1.getValue();b.OTHER_PENSION_AMOUNT[1]=a.OTHER_PENSION_AMOUNT2.getValue();b.OTHER_PENSION_AMOUNT[2]=a.OTHER_PENSION_AMOUNT3.getValue();b.OTHER_PENSION_INFLATION[0]=a.OTHER_PENSION_INFLATION1.getValue();b.OTHER_PENSION_INFLATION[1]=a.OTHER_PENSION_INFLATION2.getValue();b.OTHER_PENSION_INFLATION[2]=a.OTHER_PENSION_INFLATION3.getValue();b.RETIREMENT_TAX_WITHDRAWALS=a.RETIREMENT_TAX_WITHDRAWALS.getValue();b.SOCIAL_SECURITY_TAX_WITHDRAWALS=a.SOCIAL_SECURITY_TAX_WITHDRAWALS.getValue();if(this.USE_PENSION_LASTS1){b.OTHER_PENSION_LASTS[0]=a.OTHER_PENSION_LASTS1.getValue()}if(this.USE_PENSION_LASTS2){b.OTHER_PENSION_LASTS[1]=a.OTHER_PENSION_LASTS2.getValue()}if(this.USE_OTHER_PENSION_START1){b.OTHER_PENSION_START[0]=a.OTHER_PENSION_START1.getValue()}if(this.USE_OTHER_PENSION_START2){b.OTHER_PENSION_START[1]=a.OTHER_PENSION_START2.getValue()}if(this.USE_OTHER_PENSION_START3){b.OTHER_PENSION_START[2]=a.OTHER_PENSION_START3.getValue()}};KJE.RetirementPlan.prototype.refresh=function(c){var b=KJE;var a=KJE.gGraphs[0];KJE.setTitleTemplate(c.RESULTS_MSG);if(a){a.removeAll();a.setTitle(c.getGraphTitle(true));if(c.NEST_EGG){a.setGraphCategories(c.cats2);a.add(new KJE.gGraphDataSeries(c.DS_RETIRE1,c.sGraph2,a.getColor(1)))}else{a.setGraphCategories(c.cats);a.add(new KJE.gGraphDataSeries(c.DR_ENDING_BALANCE,c.sGraph2,a.getColor(1)));a.add(new KJE.gGraphDataSeries(c.DR_RETIREMENT_WITHDRAWAL,c.sGraph3,a.getColor(2)))}a.paint()}if(this.DIV_RESULTS){this.DIV_RESULTS.innerHTML="
"+KJE.setToggleTitleText(c.getGraphTitle(true),null,KJE)+"
"}};KJE.InputScreenText="
Input information:
Input information:
**GRAPH1** ";KJE.DefinitionText="
Current age
Your current age.
Age at retirement
Age at which you plan to retire. This calculator assumes that the year you retire, you do not make any contributions to your retirement savings. For example, if you retire at age 65, your last contribution occurs when you are actually age 64. This calculator also assumes that you make your entire contribution at the end of each year.
Household income
Your total household income. If you are married, this should include your spouse's income.
Current retirement savings
Total amount that you currently have saved toward your retirement. Include all sources of retirement savings such as 401(k)s, IRAs and annuities.
Rate of return before retirement
This is the annual rate of return you expect from your retirement savings and investments. This should also be an after-tax rate of return if the majority of your retirement savings is not in a tax-deferred account such as a 403(b), 401(k), 457(b), annuity or IRA. **ROR_DEFINITION**
Rate of return during retirement
This is the annual rate of return you expect from your savings and investments during retirement. This should also be an after-tax rate of return if the majority of your retirement savings is not in a tax-deferred account such as a 403(b), 401(k), 457(b), annuity or IRA. It is often lower than the return earned before retirement due to more conservative investment choices to help insure a steady flow of income. **ROR_DEFINITION**
Percent of income to save
The percentage of your annual income you plan to contribute to your retirement savings. This should reflect the total you save toward your retirement. This should include any 403(b), 401(k), or 457(b) plans and your employer's contribution to these plans. It should also include any other retirement accounts such as an IRA or a Roth IRA and any retirement savings in non-retirement accounts. This calculator assumes that you make one annual contribution at the end of each year, and any withdrawals happen once per year at the end of the year.
Expected income increase
Annual percent increase you expect in your household income.
Years of retirement income
Total number of years you expect to use your retirement income.
Pre-retirement income desired in retirement
The percentage of your pre-retirement household income you think you will need in retirement. This amount is based on the household income earned during the year immediately before your retirement. You can change this amount to be as low as 40% and as high as 160%. The percentage should reflect an after-tax amount if the majority of your retirement savings is not in a tax-deferred savings account such as a 401(k), IRA or other tax-deferred account.
Expected rate of inflation
**INFLATION_DEFINITION**
Married checkbox
Check this box if you are married. Married couples have a higher maximum Social Security benefit than single wage earners.
Include Social Security checkbox
Check this box if you wish to include Social Security benefits in your retirement planning. **SS_DEFINITION**
Withdrawals for retirement
This is the projected net amount per year that is needed from retirement savings to cover retirement expenses. If you include Social Security in your results, this is the net amount after Social Security.
";KJE.ReportText='

RESULTS_MSG

END_OF_RETIREMENT_MESSAGE RESPONSE This assumes annual retirement expenses of INCOME_REQUIRED_AT_RETIRE which is INCOME_PERCENT of your last year\'s income of INCOME_AT_RETIRE. SOCIAL_SECURITY_MSG

**GRAPH**

To help meet your goal, you may wish to do one of the following:

  • Increase contributions to ADJUST_SAVINGS_RATE of your income (ADJUST_ANNUAL_SAVINGS annual savings, which INCREASE_ANNUAL_SAVINGS increase as your income increases)
  • Increase your rate of return before retirement to ADJUST_ROR.
  • Reduce your required income in retirement to ADJUST_INCOME_REQUIRED of your final year\'s income.
  • Delay your retirement until age ADJUST_YEARS.
Retirement Plan Inputs
Current ageCURRENT_AGE
Age at retirementAGE_OF_RETIREMENT
Household incomeHOUSEHOLD_INCOME
Current retirement savingsCURRENT_SAVINGS
Percent of income to saveSAVINGS_PERCENT (ANNUAL_SAVINGS annually which INCREASE_ANNUAL_SAVINGS increase as your income increases)
Expected income increaseSALARY_PERCENT
Years of retirement incomeYEARS_OF_RETIREMENT
Pre-retirement income desired in retirementINCOME_PERCENT
Investment Returns and Inflation
Rate of return before retirementPRE_RATE_OF_RETURN
Rate of return during retirementPOST_RATE_OF_RETURN
Expected inflation rateINFLATION_RATE
Are you married?MARRIED
Include Social Security?INCLUDE_SOCIAL_SECURITY
Result Summary
Years until retirementYEARS_UNTIL_RETIREMENT
Your last year\'s incomeINCOME_AT_RETIRE
Estimated annual retirement expendituresINCOME_REQUIRED_AT_RETIRE
Your ending balanceENDING_BALANCE

Balances by year*

**REPEATING GROUP**

* This chart reflects fixed annual rates of return, expense, and income growth. It is meant solely as a guide. It is not likely that these and other variables will increase and decrease by a steady annual rate year over year.

'; // 04/01/2024 Copyright 2024 KJE Computer Solutions, Inc. Licensed for use on www.thrivent.com cms.qa2.thrivent.psdops.com qa.thrivent.psdops.com qa2.thrivent.psdops.com qa3.thrivent.psdops.com uat.thrivent.psdops.com prod.thrivent.psdops.com cms.qa.thrivent.psdops.com cms.qa2.thrivent.psdops.com cms.qa3.thrivent.psdops.com cms.uat.thrivent.psdops.com cms.prod.thrivent.psdops.com