Skip to content

Conversation

@vaishsriram
Copy link

@vaishsriram vaishsriram commented Aug 6, 2025

This PR calculates limits not only from deposits but from withdrawals also.

The solution is tested locally.

Closes #338

@afadil
Copy link
Owner

afadil commented Aug 7, 2025

@vaishsriram, thanks for the contribution! I'm not sure about this, though.
Actually, contribution limits are used to track and enforce legal caps on how much users can deposit into regulated (tax-advantaged) accounts annually (e.g., RRSP, TFSA, FHSA in Canada or 401(k), IRA, HSA in the U.S.). These limits are defined by tax law and vary by account type.

  • Only deposits count against the limit
  • Withdrawals do not affect current-year room
  • For some accounts, TFSA withdrawals restore room in the following year, not the current year.

@vaishsriram
Copy link
Author

vaishsriram commented Aug 22, 2025

@vaishsriram, thanks for the contribution! I'm not sure about this, though. Actually, contribution limits are used to track and enforce legal caps on how much users can deposit into regulated (tax-advantaged) accounts annually (e.g., RRSP, TFSA, FHSA in Canada or 401(k), IRA, HSA in the U.S.). These limits are defined by tax law and vary by account type.

  • Only deposits count against the limit
  • Withdrawals do not affect current-year room
  • For some accounts, TFSA withdrawals restore room in the following year, not the current year.

@afadil thanks for the detailed response, and apologies for the delay in getting back.

I see what you mean for regulated, tax-advantaged accounts (RRSP, TFSA, 401k, etc.) where withdrawals don’t affect contribution room. That makes sense.

That said, I was thinking more about a different use case: after-tax contribution accounts where a user might still want to set an annual limit for themselves, and both deposits and withdrawals would affect that limit.

From your suggestion, it sounds like modeling this as a goal with time constraints (e.g., yearly savings goals) could be a better fit. The one wrinkle I see is that the same account can’t be assigned to multiple goals today, so I’m curious if you think extending the goal system (or making contribution limits a first-class property of an account) would be a more flexible path forward.

Do you think goals with dates offer a more flexible alternative, or is the current setup still the better option?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

The limits doesn't include withdrawals

2 participants