Skip to content

Commit

Permalink
2025 brackets and IRS retirement limits, including support for 60-63 …
Browse files Browse the repository at this point in the history
…catch up contributions to 401k
  • Loading branch information
rrelyea committed Nov 2, 2024
1 parent e828c86 commit c07cde2
Show file tree
Hide file tree
Showing 6 changed files with 45 additions and 17 deletions.
2 changes: 1 addition & 1 deletion Pages/Portfolio-Review.razor
Original file line number Diff line number Diff line change
Expand Up @@ -571,7 +571,7 @@ else
<br />

<label>Target Year:</label>
<select @bind=appData.FamilyData.Year><option>2023</option><option>2024</option></select><br />
<select @bind=appData.FamilyData.Year><option>2024</option><option>2025</option></select><br />

@{
var taxFilers = appData?.IRSData?.TaxRateData?.TaxData?.TaxFilers;
Expand Down
23 changes: 15 additions & 8 deletions Pages/Saving.razor
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ Savings@(stepPath==null?" Planner":": "+stepPath.Replace('-',' ')) - MultiFol.io
<div>
<p ><b>Prerequisities:</b></p>
<EditForm Model="familyData" style=margin-left:25px>
<label>Target Year:</label> <select @bind=familyData.Year><option>2023</option><option>2024</option></select><br/>
<label>Target Year:</label> <select @bind=familyData.Year><option>2024</option><option>2025</option></select><br/>
<span>People Details:</span><br/>
<div style=margin-left:25px>
<label>Tax Filing Status:</label>
Expand Down Expand Up @@ -613,7 +613,7 @@ Savings@(stepPath==null?" Planner":": "+stepPath.Replace('-',' ')) - MultiFol.io
break;
case 1:
<p ><b>Prerequisities:</b></p>
<label>Target Year:</label> <select @bind=familyData.Year><option>2023</option><option>2024</option></select><br/>
<label>Target Year:</label> <select @bind=familyData.Year><option>2024</option><option>2025</option></select><br/>
<br />

<p><b>Worksheet:</b> </p>
Expand All @@ -638,7 +638,7 @@ Savings@(stepPath==null?" Planner":": "+stepPath.Replace('-',' ')) - MultiFol.io
case 2:
<p><b>Prerequisities:</b> </p>
<EditForm Model="familyData" style=margin-left:25px>
<label>Target Year:</label> <select @bind=familyData.Year><option>2023</option><option>2024</option></select><br/>
<label>Target Year:</label> <select @bind=familyData.Year><option>2024</option><option>2025</option></select><br/>

<label>Tax Filing Status:</label> <select @bind=familyData.TaxFilingStatus>
<option value="ChoiceNeeded">ChoiceNeeded</option>
Expand Down Expand Up @@ -698,7 +698,7 @@ Savings@(stepPath==null?" Planner":": "+stepPath.Replace('-',' ')) - MultiFol.io
case 4:
<p><b>Prerequisities:</b> </p>
<EditForm Model="familyData" style=margin-left:25px>
<label>Target Year:</label> <select @bind=familyData.Year><option>2023</option><option>2024</option></select><br/>
<label>Target Year:</label> <select @bind=familyData.Year><option>2024</option><option>2025</option></select><br/>

<label>Tax Filing Status:</label> <select @bind=familyData.TaxFilingStatus>
<option value="ChoiceNeeded">ChoiceNeeded</option>
Expand Down Expand Up @@ -765,7 +765,7 @@ Savings@(stepPath==null?" Planner":": "+stepPath.Replace('-',' ')) - MultiFol.io
case 5:
<p><b>Prerequisities:</b> </p>
<EditForm Model="familyData" style=margin-left:25px>
<label>Target Year:</label> <select @bind=familyData.Year><option>2023</option><option>2024</option></select><br/>
<label>Target Year:</label> <select @bind=familyData.Year><option>2024</option><option>2025</option></select><br/>

<label>Tax Filing Status:</label> <select @bind=familyData.TaxFilingStatus>
<option value="ChoiceNeeded">ChoiceNeeded</option>
Expand Down Expand Up @@ -831,7 +831,7 @@ Savings@(stepPath==null?" Planner":": "+stepPath.Replace('-',' ')) - MultiFol.io
<p><b>Prerequisities:</b> </p>

<EditForm Model="familyData" style=margin-left:25px>
<label>Target Year:</label> <select @bind=familyData.Year><option>2023</option><option>2024</option></select><br/>
<label>Target Year:</label> <select @bind=familyData.Year><option>2024</option><option>2025</option></select><br/>

<label>Tax Filing Status:</label> <select @bind=familyData.TaxFilingStatus>
<option value="ChoiceNeeded">ChoiceNeeded</option>
Expand All @@ -856,7 +856,14 @@ Savings@(stepPath==null?" Planner":": "+stepPath.Replace('-',' ')) - MultiFol.io
<p><b>Person @(i+1):</b> </p>

<EditForm Model="person" style=margin-left:25px>
<label>Eligible for Catchup Contributions (50 or older):</label> @person.FiftyOrOver<br/><br/>
@if (person.CatchUpAgeRangeB(person.EmployerPlan.Employer401k.CatchUpAgeBStart, person.EmployerPlan.Employer401k.CatchUpAgeBEnd))
{
<span><label>Eligible for Catchup Contributions (@person.EmployerPlan.Employer401k.CatchUpAgeBStart-@person.EmployerPlan.Employer401k.CatchUpAgeBEnd):</label> yes<br/><br/></span>
}
else
{
<span><label>Eligible for Catchup Contributions (50 or older):</label> @yesno(person.FiftyOrOver)<br/><br/></span>
}

<label>@person.FamilyData.Year 401(k) Total Contribution Allowed:</label> $<span>@person.EmployerPlan.ContributionAllowed</span><br/>
<label>minus Matched Contribution Allowed (step 2):</label> $<span>@person.EmployerPlan.AmountToSaveForMatch</span><br/>
Expand All @@ -867,7 +874,7 @@ Savings@(stepPath==null?" Planner":": "+stepPath.Replace('-',' ')) - MultiFol.io
case 7:
<p><b>Prerequisities:</b> </p>
<EditForm Model="familyData" style=margin-left:25px>
<label>Target Year:</label> <select @bind=familyData.Year><option>2023</option><option>2024</option></select><br/>
<label>Target Year:</label> <select @bind=familyData.Year><option>2024</option><option>2025</option></select><br/>

<label>Tax Filing Status:</label> <select @bind=familyData.TaxFilingStatus>
<option value="ChoiceNeeded">ChoiceNeeded</option>
Expand Down
17 changes: 14 additions & 3 deletions library/Models/FamilyData/EmployerPlan.cs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ public class EmployerPlan : INotifyPropertyChanged {
[JsonIgnore]
public Person? Person { get; set; }

private IRS.Employer401k Employer401k {
[JsonIgnore]
public IRS.Employer401k Employer401k {
get { return Person!.FamilyData.AppData.IRSData!.RetirementData.Employer401k!; }
set { Person!.FamilyData.AppData.IRSData!.RetirementData!.Employer401k = value; }
}
Expand Down Expand Up @@ -143,8 +144,18 @@ public int? ContributionAllowed {
{
if (Eligible == TriState.True)
{
return Employer401k.ContributionLimit
+ (Person!.FiftyOrOver ? Employer401k.CatchUpContributionLimit : 0);
if (Person!.CatchUpAgeRangeB(Employer401k.CatchUpAgeBStart, Employer401k.CatchUpAgeBEnd))
{
return Employer401k.ContributionLimit + Employer401k.ContributionLimitB;
}
else if (Person!.FiftyOrOver)
{
return Employer401k.ContributionLimit + Employer401k.CatchUpContributionLimit;
}
else
{
return Employer401k.ContributionLimit;
}
}
else
{
Expand Down
4 changes: 4 additions & 0 deletions library/Models/FamilyData/Person.cs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,10 @@ public bool FiftyFiveOrOver {
return Age >= 55;
}
}
public bool CatchUpAgeRangeB(int start, int end)
{
return Age >= start && Age <= end;
}

public Person? Spouse {
get {
Expand Down
13 changes: 8 additions & 5 deletions library/Models/IRS/IRSData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,17 @@ namespace IRS
{
public class IRSData(RetirementData retirementDataY1, RetirementData retirementDataY2, TaxRateData taxRatesY1, TaxRateData taxRatesY2)
{
private static int FIRST_YEAR = 2024;
private static int SECOND_YEAR = FIRST_YEAR + 1;

public async static Task<IRSData?> Create(HttpClient httpClient)
{
IRSData? irsData = null;

var retirementYear1 = await httpClient.GetStreamAsync("https://raw.githubusercontent.com/bogle-tools/financial-variables/main/data/usa/irs/irs.retirement.2023.json");
var retirementYear2 = await httpClient.GetStreamAsync("https://raw.githubusercontent.com/bogle-tools/financial-variables/main/data/usa/irs/irs.retirement.2024.json");
var taxRatesYear1 = await httpClient.GetStreamAsync("https://raw.githubusercontent.com/bogle-tools/financial-variables/main/data/usa/irs/irs.tax-rates.2023.json");
var taxRatesYear2 = await httpClient.GetStreamAsync("https://raw.githubusercontent.com/bogle-tools/financial-variables/main/data/usa/irs/irs.tax-rates.2024.json");
var retirementYear1 = await httpClient.GetStreamAsync("https://raw.githubusercontent.com/bogle-tools/financial-variables/main/data/usa/irs/irs.retirement."+FIRST_YEAR.ToString()+".json");
var retirementYear2 = await httpClient.GetStreamAsync("https://raw.githubusercontent.com/bogle-tools/financial-variables/main/data/usa/irs/irs.retirement."+SECOND_YEAR.ToString()+".json");
var taxRatesYear1 = await httpClient.GetStreamAsync("https://raw.githubusercontent.com/bogle-tools/financial-variables/main/data/usa/irs/irs.tax-rates."+FIRST_YEAR.ToString()+".json");
var taxRatesYear2 = await httpClient.GetStreamAsync("https://raw.githubusercontent.com/bogle-tools/financial-variables/main/data/usa/irs/irs.tax-rates."+SECOND_YEAR.ToString()+".json");
RetirementData? retirementDataY1 = await JsonSerializer.DeserializeAsync<IRS.RetirementData>(retirementYear1);
RetirementData? retirementDataY2 = await JsonSerializer.DeserializeAsync<IRS.RetirementData>(retirementYear2);
TaxRateData? taxRatesY1 = await JsonSerializer.DeserializeAsync<IRS.TaxRateData>(taxRatesYear1);
Expand All @@ -29,7 +32,7 @@ public class IRSData(RetirementData retirementDataY1, RetirementData retirementD
public int YearIndex
{
get {
return AppData!.FamilyData!.Year - 2023;
return AppData!.FamilyData!.Year - FIRST_YEAR;
}
}

Expand Down
3 changes: 3 additions & 0 deletions library/Models/IRS/RetirementData.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,9 @@ public class Employer401k
{
public int ContributionLimit { get; set; }
public int CatchUpContributionLimit { get; set; }
public int ContributionLimitB { get; set; }
public int CatchUpAgeBStart { get; set; }
public int CatchUpAgeBEnd { get; set; }
}

public class ContributionLimit
Expand Down

0 comments on commit c07cde2

Please sign in to comment.