PowerBuilder Tips, Tricks, and Techniques

Berndt Hamboeck

Subscribe to Berndt Hamboeck: eMailAlertsEmail Alerts
Get Berndt Hamboeck: homepageHomepage mobileMobile rssRSS facebookFacebook twitterTwitter linkedinLinkedIn

Related Topics: Java EE Journal

J2EE Journal: Article

Double Your Money, or the Rule of 72

A simple way to find out when your finances will double

We know that the natural logarithm (log in PowerBuilder) has the following property:

log(ab) = b * log( a )

Applied to our formula, we use this as follows:

YEARS * log(1.1) = log(2) ->YEARS * (0.09531) = 0.693147

This finally leaves us with: YEARS = 7.2725527. This means that at 10%, your money doubles in about 7.3 years. So the Rule of 72 is pretty close and seems to be very usable. You can solve the equation for other values of r to see how rough of an approximation this rule provides. Table 1 shows the actual number of years required to double your money based on different interest rates, along with the number that the Rule of 72 gives you.

As you can see, the Rule of 72 is remarkably accurate, as long as the interest rate is less than about 20%, which is a realistic number (anything higher is very hard to achieve for your bank account or portfolio). As you can see in "Error! Reference source not found," at higher rates the error starts to become high and really significant. I also implemented the reverse system within the PocketBuilder sample application. For example, if you want to double your money in six years, divide 6 into 72 to find that it will require an interest rate of about 12%. The full source code is shown in Listing 2.

We have learned that it will take quite a long time (36 years) to get rich when we get only about 2% interest on our money from the bank. The Rule of 72 allows us to determine the number of years it takes before money doubles, whether we're talking about debt or investment. Now it should be easy for you to figure out how fast your account can double with high interest rates (e.g., those charged on most credit card accounts) or how long it takes with low interest rates (e.g., your bank account). Next time we'll think about how we might start to maximize our interest rates, but for this month I wish you luck with PocketBuilder and my PKMoneyMan implementation (see Figure 1 and Figure 2).

More Stories By Berndt Hamboeck

Berndt Hamboeck is a senior consultant for BHITCON (www.bhitcon.net). He's a CSI, SCAPC8, EASAC, SCJP2, and started his Sybase development using PB5. You can reach him under [email protected]

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.