Click here to Skip to main content
15,886,055 members
Articles / Desktop Programming / Windows Forms
Article

Counting the Days to Retirement with "Retirement Countdown"

Rate me:
Please Sign up or sign in to vote.
4.13/5 (6 votes)
9 Aug 20064 min read 45.5K   477   17   8
A program that provides a little extra motivation to keep coming in to work.

Retirement Countdown application image

Introduction

At some point, you are going to realize that there just might be more to life than your career. Or you might just get tired of working in the insanity that is IT. Either way, sooner or later you are going to start thinking about your retirement.

Will you be able to retire early on the stock options you cashed out just before the big pop, or did you have to start over? With your current investments, how long do you have before you can retire? Would a simple change to your investment strategy shave years off your eventual retirement date? Inquiring minds want to know!

To answer these questions for myself, I developed this deceptively simple yet infinitely entertaining application called "Retirement Countdown." Retirement Countdown takes some basic information from you and uses it to calculate your time to retirement and your current approximate net worth (if the market cooperates). The display is continuously updated so you can see the seconds ticking off and the pennies adding on.

I have found it immensely therapeutic after a long meaningless meeting to stare at Retirement Countdown for a minute or so to remind myself what I'm working toward. It also provides a great deal of incentive for me to keep investing in my 401K plan and stay on top of my investments.

Hey, don't take my word for it. Download the code and try it for yourself!

Background

The technical part of this application is not worth mentioning. What's interesting to me is the mathematics of compound interest. You invest a little and you wait.  If you wait long enough, your little investment will turn into a fortune. Theoretically speaking, it is the mathematics of exponentiation. Practically speaking, how much do I need to save, and how long do I have to wait?

There are basically two considerations we need to make. First, you probably already have some investments. We'll call that your "nest-egg." Second, you probably want to make additional contributions to your investments periodically. 

The first key formula tells you how much you'll make on your nest-egg if you don't make any additional contributions.

Vf = S(1 + i)n
Vf - The future value of the investment.
S - The initial lump-sum amount.
i - The interest rate your investment earns per period (ex. 12.5% is 0.125)
n - The number of periods.

The second key formula tells you how much you'll make if you start with nothing and make regular contributions into your investment account.

Vf = P(1 + i)n
i
P - The contribution (payment) you make each period.

By combining the formulas, we get a single, unified formula that tells us how much you'd make if you started out with a lump sum and also made regular contributions. This formula is used in the application to estimate your current net worth.

Vf = S(1 + i)n + P(1 + i)n
i

Now if we solve the previous formula for n, we can calculate the number of periods (years) until we reach our goal (retirement).  The application uses this formula to estimate your retirement date and to calculate the time left until you can retire.  I'll leave it as an exercise for the student to derive this formula from the one above.

n = log1+i(P + iVf)nlog=i+1
P + iS

Using Retirement Countdown

It's pretty easy to use Retirement Countdown. You just run it, enter your assumptions, and keep it minimized on the desktop. If you'd like, you can update your assumptions periodically - perhaps once a year.

The source package contains a compiled version of Retirement Countdown as well as the full source code and all associated project files. At a minimum, you will need to install the Microsoft.NET 2.0 Runtime package to run this application. The project requires Visual Studio 2005 or the Microsoft.NET 2.0 SDK if you want to compile the code yourself.

Points of Interest

Why stop at your own retirement account? It might be fun to pretend to be someone else. How about the champion of Visual Basic and also the richest man in the world, Bill Gates? A recent Forbes article listed Mr. Gates net worth at $40.7 billion. Pick a goal (maybe $100,000,000) and a growth rate (let's say 8%). Now sit back and relax as you watch the Gates fortune grow by more than $100 per second!

All kidding aside, God bless you, Mr. Gates, for the wonderful things you are doing through the Gates Foundation. Please don't ever stop doing what you are doing.  And thanks for keeping the faith with Visual Basic all these years. With the 2005 release, I think it has finally shown its true, remarkable potential!

License

This article has no explicit license attached to it but may contain usage terms in the article text or the download files themselves. If in doubt please contact the author via the discussion board below.

A list of licenses authors might use can be found here


Written By
Web Developer
United States United States
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
QuestionHow to suppress the Outlook Address Book Securtiy Pop up box ? Pin
salon18-Jan-07 19:59
salon18-Jan-07 19:59 
AnswerRe: How to suppress the Outlook Address Book Securtiy Pop up box ? Pin
JasonSmith20-Jan-07 6:50
JasonSmith20-Jan-07 6:50 
GeneralNice but....... Pin
Azlan David10-Aug-06 6:59
Azlan David10-Aug-06 6:59 
GeneralRe: Nice but....... Pin
JasonSmith10-Aug-06 11:26
JasonSmith10-Aug-06 11:26 
Ha! At least I hope that is humor...

I guess it just depends on how much money you have saved, how much you are putting away every year, and how early you started. If you are really older and need to catch up, Uncle Sam lets you put up to $20,000 into your 401K each year ($15,000 for us younger folks). Then there's IRAs to consider. An older couple with sufficient income could conceivably put $50,000 per year into tax-deferred or tax-free accounts.

Keep in mind that I didn't factor in things like pensions (for those whose pensions are still solvent) and Social Security (for those of you who are old enough to collect it while it still exists). If you have those coming to you, adjust the goal amount down accordingly.

In any case, you have the source code. Make it say whatever the heck you want! It's your code to do with as you see fit. If it encourages you to save a bit more toward your retirement, my work here is done.
GeneralRe: Nice but....... Pin
Azlan David11-Aug-06 3:02
Azlan David11-Aug-06 3:02 
GeneralRe: Nice but....... Pin
underclocker14-Aug-06 11:15
underclocker14-Aug-06 11:15 
Questionfiles to download? Pin
outlawpoet9-Aug-06 11:11
outlawpoet9-Aug-06 11:11 
AnswerRe: files to download? [modified] Pin
JasonSmith9-Aug-06 11:29
JasonSmith9-Aug-06 11:29 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.