How To Track Stock Portfolio with Google Finance & Google Sheets

How do I set up a Google Sheets portfolio tracker for Indian stocks?
Open Google Sheets, create a new spreadsheet, and list your stocks with their NSE ticker symbols (e.g., NSE:TCS, NSE:RELIANCE). Use the =GOOGLEFINANCE() function to fetch real-time data. For example, enter =GOOGLEFINANCE("NSE:TCS", "price") to get the current price. Add columns for other attributes like volume or P/E ratio, and update regularly for accurate tracking.
What is the GOOGLEFINANCE function, and how does it work for Indian stocks?
The =GOOGLEFINANCE(ticker, [attribute]) function in Google Sheets retrieves real-time or historical stock data. For Indian stocks, use NSE tickers (e.g., NSE:INFY). Example: =GOOGLEFINANCE("NSE:INFY", "price") returns the current price. Attributes like "price", "volume", or "pe" provide specific metrics. Check Google’s support page for a full list of attributes.
Which Google Finance attributes are most useful for tracking Indian stock portfolios?
Key attributes include: "price" (current stock price), "changepct" (percentage change), "volume" (trading volume), "pe" (P/E ratio), "eps" (earnings per share), "high" (day’s high), "low" (day’s low), and "marketcap" (market capitalization). These help monitor performance and fundamentals of stocks like NSE:HDFCBANK or NSE:SBIN.
How do I fetch the current price of an Indian stock in Google Sheets?
Use =GOOGLEFINANCE("NSE:stock_symbol", "price"). For example, =GOOGLEFINANCE("NSE:TCS", "price") fetches the current price of TCS. Ensure the ticker is prefixed with NSE: for Indian stocks listed on the National Stock Exchange.
Can I track historical stock prices for Indian stocks in Google Sheets?
Yes, use =GOOGLEFINANCE("NSE:stock_symbol", "price", start_date, end_date, [interval]). For example, =GOOGLEFINANCE("NSE:RELIANCE", "price", "2025-01-01", "2025-05-01", "DAILY") retrieves daily closing prices for Reliance Industries between January 1 and May 1, 2025. Use this to analyze past performance.
How do I calculate portfolio returns in Google Sheets using Google Finance?
Track returns by calculating (Current Price - Purchase Price) / Purchase Price. Fetch the current price with =GOOGLEFINANCE("NSE:TCS", "price") in one column, input your purchase price in another, and compute returns in a third column. For example, if you bought TCS at ₹4000 and the current price is ₹4500, the return is =(4500-4000)/4000, or 12.5%.
How can I monitor the P/E ratio of Indian stocks in my portfolio?
Use =GOOGLEFINANCE("NSE:stock_symbol", "pe"). For example, =GOOGLEFINANCE("NSE:INFY", "pe") returns the P/E ratio for Infosys. Add this to your Google Sheets tracker to compare valuation across stocks like NSE:HDFCBANK or NSE:BAJFINANCE.
How do I track daily price changes for Indian stocks?
Use =GOOGLEFINANCE("NSE:stock_symbol", "changepct") to get the daily percentage change. For example, =GOOGLEFINANCE("NSE:SBIN", "changepct") shows the percentage change for State Bank of India. Combine with "price" to see absolute changes.
Can I track trading volume for Indian stocks in Google Sheets?
Yes, use =GOOGLEFINANCE("NSE:stock_symbol", "volume"). For example, =GOOGLEFINANCE("NSE:RELIANCE", "volume") shows the trading volume for Reliance Industries. High volume can indicate market interest or volatility.
How do I find the market capitalization of Indian stocks?
Use =GOOGLEFINANCE("NSE:stock_symbol", "marketcap"). For example, =GOOGLEFINANCE("NSE:TCS", "marketcap") returns the market capitalization of TCS. This helps assess the size and stability of companies in your portfolio.
How can I track dividend yields for Indian stocks?
While Google Finance doesn’t directly provide dividend yield, you can calculate it using =GOOGLEFINANCE("NSE:stock_symbol", "dividend") / GOOGLEFINANCE("NSE:stock_symbol", "price"). For example, for NSE:HDFCBANK, this gives the dividend yield. Check company reports for accurate dividend data.
How do I handle stock splits in my Google Sheets portfolio tracker?
For stock splits (e.g., 2:1), update the number of shares and purchase price in your sheet. If you held 100 shares at ₹2000 each and a 2:1 split occurs, you now have 200 shares at ₹1000 each. Adjust your tracker manually, as GOOGLEFINANCE data reflects post-split prices.
Can I create charts in Google Sheets to visualize portfolio performance?
Yes, use historical price data from =GOOGLEFINANCE("NSE:stock_symbol", "price", start_date, end_date) to create a data table. Select the data, go to Insert > Chart, and choose a line or candlestick chart to visualize trends for stocks like NSE:INFY or NSE:RELIANCE.
How do I find the correct NSE ticker for Indian stocks?
Search the stock on Google or the NSE website (nseindia.com) to find its ticker. For example, Tata Consultancy Services is NSE:TCS. Always prefix with NSE: in GOOGLEFINANCE formulas to ensure accurate data retrieval.
How do I calculate total portfolio value in Google Sheets?
List the number of shares for each stock in one column and fetch current prices using =GOOGLEFINANCE("NSE:stock_symbol", "price") in another. Multiply shares by price (e.g., =A2*B2) and sum all values with =SUM(C2:C10) to get the total portfolio value.
Can I track 52-week high and low for Indian stocks?
Yes, use =GOOGLEFINANCE("NSE:stock_symbol", "high52") and =GOOGLEFINANCE("NSE:stock_symbol", "low52"). For example, =GOOGLEFINANCE("NSE:BAJFINANCE", "high52") shows the 52-week high for Bajaj Finance, helping you assess price ranges.
How do I automate updates in my Google Sheets portfolio tracker?
Google Sheets automatically updates GOOGLEFINANCE data in real-time during market hours. Ensure your formulas (e.g., =GOOGLEFINANCE("NSE:TCS", "price")) are correct, and refresh the sheet to fetch the latest data. For historical data, set specific date ranges.
How do I compare Indian stocks in my portfolio using Google Sheets?
Create a table with columns for metrics like "pe", "eps", "marketcap", and "changepct" using =GOOGLEFINANCE(). For example, compare NSE:TCS and NSE:INFY by fetching their P/E ratios and sorting or filtering the table to identify outperformers.
What should I do if GOOGLEFINANCE returns an error for an Indian stock?
Errors occur due to incorrect tickers, unavailable data, or connectivity issues. Verify the ticker (e.g., NSE:RELIANCE) on nseindia.com, ensure the attribute is valid (e.g., "price"), and check your internet connection. If errors persist, try refreshing the sheet or using a different ticker.
How do I diversify my Indian stock portfolio using Google Sheets data?
Use =GOOGLEFINANCE("NSE:stock_symbol", "sector") (if available) or manually categorize stocks by sector (e.g., IT, Banking, Energy). Fetch market cap and P/E ratios to balance large-cap (e.g., NSE:TCS) and mid-cap stocks (e.g., NSE:MINDTREE). Allocate investments across sectors to reduce risk.

Introduction

Till Nov’2017, Google Finance provided excellent tools for portfolio tracking and stock screening. But Google decided to discontinue this service since then. If you want to know about the discontinued features of Google Finance, you can read this blog post.

People like me were a die-hard fan of Google Finance’s stock screener. I used to track all my stock holdings in their portfolio tracker.

Though I’ll admit that their portfolio tracker was not awesome, but due to continued usage, I became a habitual user of it. I’m sure there were many people like me, who would have wanted the Google Portfolio tracker to continue. But anyways, it saw its demise.

So people like me did what? Where we migrated after Google Finance? I know, majority went to use other services like Yahoo Finance etc. But I remained with Google Finance. How? I started using Google Finance in Google Sheets

Why Google Finance?

Google Finance Portfolio Tracker - Template

[Check my Online Stock Analysis Tool – The Stock Engine]

As I told you, I was almost a habitual user of Google Finance from my earlier days of stock investing. Hence, a transition to another service provider was a task.

But more than my personal limitation, there was something else which held me with Google Finance – it is called Google Finance Attributes. Using these attributes, I was able to create an almost duplicate portfolio tracker (like Google Finance) in Google Sheets.

Once I was able to create my stock’s portfolio in Google Sheets, I could see no reasons to switch to any other service provider.

In this blog post, I will explain in brief how I built my Google-Finance-like portfolio tracker in Google Sheets.

Steps to build a portfolio tracker

There are two steps necessary to build a portfolio tracker in Google Sheets.

A trained mind can create a template, and start tracking stocks performance in less than 30 minutes.

It only takes time for the first stock. The balance are almost a copy-paste tasks.

So let’s see the two steps:

  • Step #1 – Fetching Data: Before we can start tracking performance of our stocks in Google Sheets, we must build a template in which the relevant stock data can be fetched (over internet). How to fetch the data? Using Google Finance Attributes. We will see the details later.
  • Step #2 – Prepare Report Sheets: The old Google Finance theme had three main reporting sheets, they were named like this: (a) Overview, (b) Fundamentals, and (c) Performance. When I built my stock’s portfolio tracker, I exactly duplicated the overview and fundamental reports. I made my customised changes in Performance reporting.

In the next portion of this article, you will get further detailing of the above 2 steps.

[Do you know you can use EXCEL formulas to get your investment answers, check out how.]

Step #1: Fetching Data (Database Sheet)

The above is a template which I use to fetch stock data in Google Sheets. What you can see above is the data of two stocks TCS and RIL. Let’s see how to prepare this template:

  • Create a Duplicate Template: Open your Google Sheets and prepare a format same as above. Copy the columns marked as “SL and Attributes”. Take special care to copy the info from SL 7 to 24 (without spelling errors). You can also get this data in Google support page. Additional notes are here:
    • Symbol: This is the stock ticker. Type the name of your stock in Google Search, you will get the ticker name. Manually enter this data in your google sheet.
    • Name: This is the name of your stock. Example: For ticker “NSE:TCS”, the full name will be Tata Consultancy Services. Manually enter the name in your google sheet.
    • Purchase Date: This is the date on which you have purchased your stock. Manually enter this data in your google sheet.
    • Qty (nos): This is the number of stocks you have purchased on the above date. Manually enter this data in your google sheet.
    • Total Cost: This is the total cost (including brokerage, taxes etc), you paid to buy the above number of stocks. Manually enter this data in your google sheet.
    • Average Cost Per Share: This is cost per share you paid to buy the above stocks. Use this formula to calculate average cost per share ( = Total Cost / Qty).
Google Finance Portfolio Tracker - Database Sheet
Database Sheet
  • Fetch Data: Which are the stock’s data that can be fetched using Google Finance? All attributes shown in serial number 7 to 24 can be fetched. How to do it? By using a simple formula. Above I have shown how to fetch “price” data of TCS. Below you will get formulas for few more attributes:
    • Price: =GOOGLEFINANCE($A3,G$1)
    • Market Cap: =GOOGLEFINANCE($A3,H$1)/10000000
    • Day’s High: =GOOGLEFINANCE($A3,I$1)
    • Day’s Low: =GOOGLEFINANCE($A3,J$1)
    • Volume: =GOOGLEFINANCE($A3,K$1)
Google Finance Portfolio Tracker - Database Sheet2

In case you want to know more about using the Google Finance formulas, check the support page of Google.

Once you are done here, you have fetched the stock data in your google sheets. Now you are ready to create the report sheets.

Step #2 – Prepare Report Sheets

[Learn how you can analyse your stocks on your own using MS EXCEL.]

There are 3 report sheets: ‘Overview’, ‘Fundamentals’, and ‘Performance’. I will explain how I’ve prepared the Performance report sheet. Using this information, it will be easy for you to prepare the ‘overview’ and ‘fundamentals’ reports.

To prepare the Performance report, I have used the “HLOOKUP” formula of Google Sheets. It is similar to HLOOKUP formula of MS Excel.

Why HLOOKUP formula is used? In Step #1, we have fetched stock’s data from internet into our Google Sheets. This has become our main database (I have also named this sheet as Database). Now, we will use HLOOKUP function to pick relevant information from our ‘database sheet’, to other repot sheets.

Performance Sheet

Google Finance Portfolio Tracker of Indian Stocks - Performance

The header of the performance sheets looks like shown above. You must copy the same in your google sheet.

Please note the numbers written on top of the headers. These numbers are the serial numbers indicated in Step#1 (see fetching data template).

What is the use of these numbers? Example:

  • “Number 7” indicated above ‘Latest Price’ means, in this column we will call “price” data from the ‘Database Sheet’ using HLOOKUP formula.
  • “Number 6” indicates, we will call “Avg Cost / Share” from the ‘Database Sheet’ using HLOOKUP formula..

Let’s see how this is done:

Google Finance Portfolio Tracker of Indian Stocks - Performance

Let me show you what it means by “Database!$D$2:$J$25” visible in the above highlighted formula. Check the below pic.

Google Finance Portfolio Tracker of Indian Stocks - Performance

To learn more about HLOOKUP function of Google Sheets check this support page.

Overview Sheet

How the ‘overview sheet’ looks, is shown below. You can use the same HLOOKUP function explained above to generate the overview report.

Google Finance Portfolio Tracker of Indian Stocks - Performance

Which value will appear in the overview sheet? Price, Change, Market Cap, Volume, Open price, High price, Low price, and Day’s Gain.

In the above sheet all data will be pulled by HLOOKUP formula from the main Database sheet, except for “Day’s Gain”. This must be calculated using this formula = Change/Price.

How to use HLOOKUP formula? Check the explanation given for the Performance Sheet.

Fundamentals Sheet

In this sheet all data is pulled from the main Database sheet using HLOOKUP formula. Nothing needs to be calculated manually.

Google Finance Portfolio Tracker of Indian Stocks - Performance

Which value will appear in the overview sheet? Price, Change, Market Cap, Average Volume, 52 Wk High, 52 Wk Low, EPS, P/E, and Beta.

How to use HLOOKUP formula? Check the explanation given for the Performance Sheet.

Final Words

Apart from the above set of reports, I also use Google Sheets and Google Finance Attributes to generate the stocks ’10 year price data’. Why I do it? Because it helps me to gauge how the price of stock as performed in last 10 years.

How 10 years price data can be fetched? Use the formula shown in the below graphics:

Google Finance Portfolio Tracker of Indian Stocks - PriceData 10 Year

Once the price data is available, one can also generate the 10 years price chart as shown below. This is the 10 Year price chart of TCS. It gives a good idea of how the price has behaved in long term:

Google Finance Portfolio Tracker of Indian Stocks - PriceData

I hope you’ve found this article helpful. It will be great if you can leave your comment below.

Have a happy investing.

Handpicked Articles:

Related Posts

19 Comments

  1. I found great pleasure in reading your thoughtful blog article. The views and concepts you expressed were tremendously useful.

  2. I greatly enjoyed reading your blog post. Your insights were incredibly helpful, and the way you presented them really resonated with me.

  3. Sir, Is there is any formula to get face value of stock in google finance. Pl let me know.

  4. Hey Mani,

    Thanks for this handy trick, it’s very useful. I wan wondering can you create crypto portfolio just like this?

  5. Is there any formula, to get the moving avg of stocks for 20,30, 50 days in the google finance.

      1. Sir mere liye google sheet bana dijiye
        Smallcap >250
        Market Capitalization >1000
        Weekly % cheng price
        2 Weekly %
        Monthly %

  6. This facility is now directly available in latest version of Excel. Data is directly picked by from NSE

  7. What is the formula of Exponential Moving Average (EMA) in Google sheet ?

    How it can be used to calculate Share market stock EMA of different period. Eg 5, 21, 50 Days.

    Can anyone share Demo sheet.

    Thanks 🙏🏻

  8. Excellent guide. Please elaborate further about fetching the historical data of last 10 years or from the day the stock was listed if less than 10 years more clearly. Does it require a separate sheet or the same database sheet. And how to construct the interactive graph . thanks a lot.
    PS: A fresh screenshot might be more helpful

  9. Hi, When I add the same stocks (say ITC) bought at two different dates in the database sheet, the HLOOKUP in the performance sheet always picks the stock that appears first. Is there a solution other than limiting the HLOOKUP range?

  10. Sir
    Fetching live data from google finance is really awesome. Thanks for the guidance. with the help of you I have started learning the nitty gritty of stock market.
    you have really worked hard to educate people like us, who want to invest in the stock market.
    Thanks

  11. I HAVE LONG TERM PORTFOLIO OF SHARES,MY FULL TIME PROFFESSIOUN IS INVESTMENT IN THE INDIAN STOCKMARKET,I HAVE A LONG TERM GOAL SO I THINK GOOGLE FINANCE WILL HELP ME TO ACHIEVE THIS

    THANK YOU

Leave a Reply

Your email address will not be published. Required fields are marked *