How to Calculate Year-to-Date (YTD) Performance in Google Sheets

If you’re tracking the performance of stocks or ETFs in Google Sheets, calculating Year-to-Date (YTD) performance can give you a clear picture of how your investments are performing. Instead of manually calculating the change in price, you can use a custom formula that automates this process, using data from Google Finance.

In this guide, we’ll show you how to create a custom formula to calculate YTD performance for a stock using Google Finance data in Google Sheets.

Formula for YTD Performance Using Google Finance

Here’s the formula you’ll need to calculate the YTD performance for a specific stock or financial asset:

=(GOOGLEFINANCE(D5,"price")/INDEX(GOOGLEFINANCE(D5,"close","01/01", TODAY()),2,2))-1

Explanation of the Formula:

  • GOOGLEFINANCE(D5,"price"): This part fetches the current price of the stock or asset specified in cell D5 (e.g., the ticker symbol for the stock).
  • GOOGLEFINANCE(D5,"close","01/01", TODAY()): This part retrieves the closing price of the stock on January 1st of the current year. The TODAY() function dynamically gets today’s date.INDEX(..., 2, 2):
  • The GOOGLEFINANCE function returns a table with multiple rows of data. The INDEX function is used to extract the second row, which contains the closing price from January 1st.
  • /...-1: The formula divides the current price by the price on January 1st, subtracts 1, and gives you the percentage change.