Home
Search
 
What's New
Index
Books
Links
Q & A
Newsletter
Banners
 
Feedback
Tip Jar
 
C# Helper...
 
XML RSS Feed
Follow VBHelper on Twitter Follow VBHelper on Twitter
 
 
 
MSDN Visual Basic Community
 
 
 
 
 
TitleGraph savings from a normal bank account, a 401(k), and a Roth IRA account in Visual Basic 6
DescriptionThis example shows how to graph savings from a normal bank account, a 401(k), and a Roth IRA account in Visual Basic 6.
Keywordsmathematics, algorithms, graphics, graph, Roth IRA, IRA account, 401(k), savings, bank account, saving account, example, example program, Windows Forms programming, Visual Basic 6, VB 6
CategoriesAlgorithms
 

Important Note: I am not a tax or investment professional. I don't even pretend to understand this stuff. This is a very simple tool for playing with numbers (it doesn't even compound continuously) and I don't vouch for its correctness. It should in no way be taken for investment advice. What, are you crazy???

That said...

This example graphs the savings you would get by making annual contributions to a savings account, a 401(k), and a Roth IRA. As far as I can tell, these are the rules:

  • In a traditional bank account, interest is taxed each year. Money you plan to put into the account is taxed first. This program takes taxes out of the annual contribution.
  • In a 401(k) account, the annual contribution is taken from pre-tax money so it is not taxed. Interest is also not taxed. When you withdraw the money, it is all taxed at your current rate. (One advantage to this type of account is that you may be paying at a lower rate when you retire than you would pay when you make contributions.) There may also be a penalty for early withdrawal.
  • In a Roth IRA, annual contributions are post-tax so this example withholds taxes from the contributions. withdrawals are not taxed, although there may be a penalty for early withdrawal.
  • These are not the only rules. For example, you may be allowed to make early withdrawals without penalty in case of hardship. The program doesn't do anything about these extra rules.

This program marches through each of the years specified, calculating new balances each year, and displays the results. Notice the saw-tooth result for the savings account as taxes are removed each year.

Interestingly the 401(k) and Roth IRA produce the same final result if the tax rate you pay on the withdrawal is the same as the rate you paid while making contributions. If the rate is lower, the 401(k) does better.

If you understand this stuff better than I do and want to make corrections, please let me know and I'll update the program.

 
 
 
 
Copyright © 1997-2010 Rocky Mountain Computer Consulting, Inc.   All rights reserved.
  Updated