### Time value of money, Present Value (PV), Future Value (FV), Net Present Value (NPV), Internal Rate of Return (IRR)

Why do I use my current money to invest in the stock market? Because I expect to have more money in the future. Why do I need more money in the future than now? Because of many reasons, the same amount of money will have less purchasing power than today. Therefore my investment needs to generate more money than today to protect my purchasing power in the future. That is the main concept of the time value of money where one dollar today is worth more than one dollar in the future.

## Present Value (PV), Future Value (FV)

At 10% annual growth rate, an investment of 1000\$ will be worth `1000 * 110% = 1100\$` after 1 year, and will be worth `1000 * 110% * 110% = 1210\$` after 2 years.

• The future value of 1000\$ after 2 years at the rate of 10% is 1210\$.
• Inversely, the "present value" of 1210\$ 2 years ago at the rate of 10% is 1000\$.

## Net Present Value (NPV)

Let's say I have 1000\$ now and a bank offers me a saving account at a 10% annual rate. At the same time, a public company attracts my attention because it pays a very good amount of dividend each year and has potential growth in the future. The scenario is that I would buy 100 shares at the cost of 10\$ each now and hold them for 5 years. Each year I would receive a fairly good and stable amount of dividends, at least 5% yield. After 5 years, I would sell all shares with the expectation that the share price would grow 20%. The table below shows the scenario of cash flows if I buy stocks of that company. Which investment should I choose?

YearAmountType
1\$50.00Dividend
2\$55.00Dividend
3\$60.00Dividend
4\$65.00Dividend
5\$1,200.00Sell

To make that decision, let put it this way: I want to have the same scenario of cash flows as investing into the stock market but by putting money into a saving account at a 10% annual rate. How much money do I need to put into that saving account now? Let's do the math:

• At a 10% rate, to have 50\$ after 1 year, I need to invest 45.45\$ now. Because 50\$ is the future value of 45.45\$ after 1 year at a 10% rate.
• At a 10% rate, to have 55\$ after 2 years, I need to invest 45.45\$ now. Because 55\$ is the future value of 45.45\$ after 2 years at a 10% rate.
• At a 10% rate, to have 60\$ after 3 years, I need to invest 45.08\$ now. Because 60\$ is the future value of 45.08\$ after 3 years at a 10% rate.
• At a 10% rate, to have 65\$ after 4 years, I need to invest 44.40\$ now. Because 65\$ is the future value of 44.40\$ after 4 years at a 10% rate.
• At a 10% rate, to have 1200\$ after 5 years, I need to invest 745.11\$ now. Because 1200\$ is the future value of 745.11\$ after 5 years at a 10% rate.

Totally, to have the same scenario of cash flows as investing in the stock market, I need to invest `45.45 + 45.45 + 45.08 + 44.40 + 745.11 = 925.49\$` now in a saving account at a 10% rate. In other words, to have the same result in the future, investing in the stock market costs me 1000\$ now, whereas investing in the saving account at a 10% rate costs me only 925.49\$ now. Therefore, in this case, I should better put money in the saving account at 10% rate.

Let's suppose that the share prices would grow 50% during the 5 years, which means the last cash flow would be 1500\$ in the 5th year. In this case, at a 10% rate, to have 1500\$ after 5 years, I need to invest 931.38\$ now. Because 1500\$ is the future value of 931.38\$ after 5 years at a 10% rate. Totally, to have the same scenario of cash flows as investing in the stock market, I need to invest `45.45 + 45.45 + 45.08 + 44.40 + 931.38 = 1089.88\$` now in a saving account at a 10% rate. In other words, to have the same result in the future, investing in the stock market costs me only 1000\$ now, whereas investing into the saving account at a 10% rate costs me 1089.88\$ now. Therefore, in this case, I have a better deal to invest in the stock market than to put money in a saving account at a 10% rate.

Moreover, because at year 0 future value equals to present value, I can do like that:

• For the first scenario, sum of all present values of future cash flows is: `-1000 + 45.45 + 45.45 + 45.08 + 44.40 + 745.11 = -96.40 < 0`
• For the second scenario, sum of all present values of future cash flows is: `-1000 + 45.45 + 45.45 + 45.08 + 44.40 + 931.38 = 89.88 > 0`

What's I have calculated so far is to sum the present values of future cash flows at a defined discount rate and compare it with 0. That's what they call Net Present Value (NPV). If Net Present Value (NPV) is positive, the investment is worth pursuing.

## Discount rate

In this example, I have chosen the saving account at a 10% annual rate as a benchmark to evaluate my investment in the stock market. The 10% annual rate of that saving account is therefore the discount rate in my evaluation. My investment in the stock market must beat 10% annually, otherwise, it is not worth my time and effort because I can easily save that money at 10% annually. The choice of a discount rate is important and depends on personal preferences. Here are a few examples:

• A minimum required rate of return for an investment that one sets for herself/himself
• An expected rate of return if investing in an alternative asset such as: saving account, real estate, buying a business, etc.
• A reference rate of return of the market: S&P 500, CAC 40, etc.

## Internal Rate of Return (IRR)

The discount rate that makes Net Present Value (NPV) equal to zero is called the Internal Rate of Return (IRR).

• For the first scenario of cash flows above, that internal rate of return is 8.13%.
• At a 8.13% rate, sum of all present values of future cash flows is: `-1000 + 46.24 + 47.04 + 47.46 + 47.54 + 811.72 = 0`.
• Because 8.13% < 10%, it confirms once again that the saving account at a 10% rate is a better choice.

YearAmountTypePresent Value
1\$50.00Dividend\$46.24
2\$55.00Dividend\$47.04
3\$60.00Dividend\$47.46
4\$65.00Dividend\$47.54
5\$1,200.00Sell\$811.72
• For the second scenario of cash flows above, that internal rate of return is 12.57%.
• At a 12.57% rate, sum of all present values of future cash flows is: `-1000 + 44.42 + 43.40 + 42.06 + 40.47 + 829.66 = 0`.
• Because 12.57% > 10%, it confirms once again that investing in the stock market is a better choice.
YearAmountTypePresent Value
1\$50.00Dividend\$44.42
2\$55.00Dividend\$43.40
3\$60.00Dividend\$42.06
4\$65.00Dividend\$40.47
5\$1,500.00Sell\$829.66

## Conclusion

In summary, Net Present Value (NPV) and Internal Rate of Return (IRR) are two methods that help me to evaluate the performance of an investment.

To evaluate an investment with Net Present Value (NPV), I follow the steps below:

• Identify all cash flows
• Pick a discount rate
• Calculate Net Present Value (NPV) by summing all present values of those cash flows
• If Net Present Value (NPV) is positive, the investment is worth pursuing

To evaluate an investment with Internal Rate of Return (IRR), I follow the steps below:

• Identify all cash flows
• Pick a discount rate
• Calculate the Internal Rate of Return (IRR) rate that makes Net Present Value (NPV) equal to 0
• If Internal Rate of Return (IRR) is bigger than the discount rate, the investment is worth pursuing

Performing those steps requires many calculations, and I don't perform them manually. I have leveraged the built-in functions of Google Sheets to do those tasks. In the next posts, I will explain how to calculate Net Present Value (NPV) and Internal Rate of Return (IRR) in Google Sheets, particularly in the context of a stock portfolio.

## Series: how to calculate internal rate of return (IRR) and net present value (NPV) for a stock portfolio in Google Sheets

This series was suggested by an anonymous reader's comment on June 15, 2021. At first, I didn't have any clue about what she/he was talking about. After several months of researching about the concepts and formulas, then trying different functions of Google Sheets, I am delighted to finish the subject and to share it on this blog. I hope it is clear and easy to follow for the readers and if you find it useful, please support me a coffee. I appreciate it, thank you!

### Create personal stock portfolio tracker with Google Sheets and Google Data Studio

I have been investing in the stock market for a while. I was looking for a software tool that could help me better manage my portfolio, but, could not find one that satisfied my needs. One day, I discovered that the Google Sheets application has a built-in function called GOOGLEFINANCE which fetches current or historical prices of stocks into spreadsheets. So I thought it is totally possible to build my own personal portfolio tracker with Google Sheets. I can register my transactions in a sheet and use the pivot table, built-in functions such as GOOGLEFINANCE, and Apps Script to automate the computation for daily evolutions of my portfolio as well as the current position for each stock in my portfolio. I then drew some sort of charts within the spreadsheet to have some visual ideas of my portfolio. However, I quickly found it inconvenient to have the charts overlapped the table and to switch back and forth among sheets in the spreadsheet. That's when I came to know the existen

### How to convert column index into letters with Google Apps Script

Although Google Sheets does not provide a ready-to-use function that takes a column index as an input and returns corresponding letters as output, we can still do the task by leveraging other built-in functions ADDRESS , REGEXEXTRACT , INDEX , SPLIT as shown in the post . However, in form of a formula, that solution is not applicable for scripting with Google Apps Script. In this post, we look at how to write a utility function with Google Apps Script that converts column index into corresponding letters. With the solution in the form of a formula , we don't even need to understand how column index and letters map each other. With apps script, we need to understand the mapping to come up with an algorithm. In a spreadsheet, columns are indexed alphabetically, starting from A. Obviously, the first 26 columns correspond to 26 alphabet characters, A to Z. The next 676 columns ( 26*26 ), from 27th to 702nd, are indexed with 2 letters. [AA, AB, ... AY, AZ], [BA, BB, ... BY, BZ],

### Create a dividend income tracker with Google Sheets by simply using pivot tables

As my investment strategy is to buy stocks that pay regular and stable dividends during a long-term period, I need to monitor my dividends income by stocks, by months, and by years, so that I can answer quickly and exactly the following questions: How much dividend did I receive on a given month and a given year? How much dividend did I receive for a given stock in a given year? Have a given stock's annual dividend per share kept increasing gradually over years? Have a given stock's annual dividend yield been stable over years? In this post, I explain how to create a dividend tracker with Google Sheets. Manage stock transactions with Google Sheets Create dividend tracker with Google Sheets Track annual dividend amount of stocks Track dividend amount by month and by year Track annual dividend per share of stocks Track annual dividend yield of stocks Demo Conclusion References Manage stock transactions with Google Sheets I use a spreadsheet on Goo