Click here to Skip to main content
Click here to Skip to main content

Counting the Days to Retirement with "Retirement Countdown"

, 9 Aug 2006
Rate this:
Please Sign up or sign in to vote.
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. 

<!--

To simplify the math, I am making a few assumptions.  First, I assume you can assign a single average (expected) interest rate to all your investments.  This is probably the biggest SWAG you have to make.  Second, the formulas assume your additional contributions will be the same every year until you retire.  That is probably not going to happen, but luckily changes to later contributions don't affect the result very much (if you are making $80,000 a year in interest, it makes very little difference if you contribute an additional $5,000). 

-->

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
<!-- --> <!-- -->
Vf - The future value of the investment.
P - The contribution (payment) you make each period.
i - The interest rate your investment earns per period (ex. 12.5% is 0.125)
n - The number of periods.

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

About the Author

JasonSmith
Web Developer
United States United States
No Biography provided

Comments and Discussions

 
QuestionHow to suppress the Outlook Address Book Securtiy Pop up box ? Pinmemberbhavna81618-Jan-07 19:59 
AnswerRe: How to suppress the Outlook Address Book Securtiy Pop up box ? PinmemberJasonSmith20-Jan-07 6:50 
GeneralNice but....... PinmemberAzlan David10-Aug-06 6:59 
GeneralRe: Nice but....... PinmemberJasonSmith10-Aug-06 11:26 
GeneralRe: Nice but....... PinmemberAzlan David11-Aug-06 3:02 
GeneralRe: Nice but....... Pinmemberunderclocker14-Aug-06 11:15 
Questionfiles to download? Pinmemberoutlawpoet9-Aug-06 11:11 
AnswerRe: files to download? [modified] PinmemberJasonSmith9-Aug-06 11:29 

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

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

| Advertise | Privacy | Mobile
Web03 | 2.8.140721.1 | Last Updated 9 Aug 2006
Article Copyright 2006 by JasonSmith
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid