1. Definition of the rule of 72

When reading the chapter of rough estimation in Programming Abas, I saw an interesting rule of thumb mentioned in finance — “Rule of 72 “, so I decided to do further research on this interesting rule.

The rule of 72, if you assume an annual interest rateInvest a sum of moneyYears, ifThen the investment will double.

On the surface, this seems to be a very simple rule, but the approximation is quite accurate to a certain extent: if you invest 1000 yuan at an annual interest rate of 6% for 12 years, you will get 2,012 yuan; If you invest 1,000 yuan at 8% interest for 8 years, you will get 1,999 yuan for 9 years.

2. Use mathematical methods to verify your experience

So I was thinking, since it is a rule of thumb, nature can systematically prove the theory through mathematical methods. The first thing THAT comes to mind is that compound interest is a square root calculation, so is it possible to apply that


The important limit of this sequence is the derivation of this rule. If we substitute the annual interest rate and investment duration from the rule of 72 into this limit, we can obtain the following equations:


Solving this system of equations gives you


As can be seen from the results, the annual interest rate increases as the investment time increasesMultiplied by the number of yearsThe investment will double when the product is 69.3, which is a little different from 72 in the rule, but it doesn’t matter because the sum of experience is not the same as the exact calculation required by mathematics. And if you factor 72, you get the prime factorsThese prime factors can be used to form a lot of everyday numbers, such as 2,3,4,6,8,12This is more suitable for daily use than the number 69.3, and also conforms to the quality of the rule of thumb. At the same time, the error between 72 and 69.3 is completely within the acceptable range.

3. Application of “72” rule in program performance estimation

This rule of thumb in Programming Is not, of course, intended to persuade readers to give up programming and get involved in economics, but rather to guide readers to make reliable estimates of the running time of their programs. If an exponential program takes 10 seconds to solve a problem with n=40, and the running time increases by 12% for every 1 increase in n, the rule of 72 tells us that for every 6 increase in n, the running time of the program doubles. This is just a simple by rule of thumb in other fields extended out of a simple example to estimate, but more important is the author wants to tell us the estimate skills no matter in life or in the programming, is a very useful skill, so often in peacetime to estimate the performance of their own programs, And testing it is a very interesting and meaningful thing to do. Because a little experimentation that takes a little time today could help us make informed choices and save a lot of time in the future.