0% found this document useful (0 votes)
236 views17 pages

How To Use GOOGLEFINANCE Function in Google Sheets - Sheetaki

The document discusses how to use the GOOGLEFINANCE function in Google Sheets to retrieve current and historical market data from Google Finance. It provides the syntax of the function, explaining the parameters for ticker, attribute, start date, end date/number of days, and interval. Examples are given for retrieving real-time stock prices and attributes as well as historical data. The function allows importing financial data straight into a spreadsheet without manual copying.

Uploaded by

Shakeel Ahmed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
236 views17 pages

How To Use GOOGLEFINANCE Function in Google Sheets - Sheetaki

The document discusses how to use the GOOGLEFINANCE function in Google Sheets to retrieve current and historical market data from Google Finance. It provides the syntax of the function, explaining the parameters for ticker, attribute, start date, end date/number of days, and interval. Examples are given for retrieving real-time stock prices and attributes as well as historical data. The function allows importing financial data straight into a spreadsheet without manual copying.

Uploaded by

Shakeel Ahmed
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 17

1/14/22, 10:37 PM How to Use GOOGLEFINANCE Function in Google Sheets - Sheetaki

  

How to Use GOOGLEFINANCE


Function in Google Sheets
by Chan Pascual · August 27, 2021

How to Use GOOGLEFINANCE Function in Google Sheets

The GOOGLEFINANCE function in Google Sheets is useful when you need to


retrieve current or historical market data from Google Finance.

TABLE OF CONTENTS

1 The Anatomy of the GOOGLEFINANCE Function


2 A Real Example of Using GOOGLEFINANCE Function

https://www.sheetaki.com/googlefinance-function-google-sheets/ 1/17
1/14/22, 10:37 PM How to Use GOOGLEFINANCE Function in Google Sheets - Sheetaki

3 How to Use GOOGLEFINANCE Function in Google Sheets


  

Google Sheets has tons of advanced functions that you can use to fast-track your
work. In this article, we’ll take a look at an out-of-the-box function called
GOOGLEFINANCE to help you gain insights on up-to-date financial analytics.

Whenever you research a stock, you are likely to work with a spreadsheet, storing
data from reputable websites such as Google Finance. To save you the trouble of
manually copying and pasting market trends information, consider using the
GOOGLEFINANCE function of Google Sheets.

This function lets you access real-time data straight from Google Finance. Thus,
you no longer need to use highly technical scripts or programs just to keep track of
your stock portfolio efficiently.

You can import a wide range of relevant stock information such as the current
price, trading volume, and market capitalization into your spreadsheet with just a
few configurations.

This all seems convenient, right? Now, it’s time to learn how you can utilize the
GOOGLEFINANCE function in Google Sheets.

The Anatomy of the GOOGLEFINANCE Function


In order for the GOOGLEFINANCE function to work, here’s how we should write it:

=GOOGLEFINANCE(ticker, [attribute], [start_date], [end_date|num_days],


[interval])

https://www.sheetaki.com/googlefinance-function-google-sheets/ 2/17
1/14/22, 10:37 PM How to Use GOOGLEFINANCE Function in Google Sheets - Sheetaki

Let’s break down the syntax and understand each parameter:


  

= just like other functions, the equal sign is the first character we should type in
to use GOOGLEFINANCE.
GOOGLEFINANCE is the function that we’ll need to import data from the
Google Finance website.
ticker is the first parameter. This parameter should hold both the exchange and
ticker symbols of the stock you want to know. The ticker symbol usually
consists of letters and/or numbers. To give you an example, the ticker of
Amazon, Inc. is AMZN. If you’re not sure about the company’s ticker symbol you
want to retrieve, you can always search it in Google Finance.
attribute is a parameter that you can use to specify the type of information you
would like to retrieve. You can use the following attributes taken from Google’s
official documentation.

Attribute Description

“price” The real-time price quote with up to 20 minutes delay.

“priceopen” The opening price.

“high” Current day’s high price.

“low” Current day’s low price.

“volume” Trading volume of the current day.

“marketcap” Stock’s market capitalization.

“tradetime” Time of the last trade.

“datadelay” Shows the delay time of the real-time data.

“volumeavg” This is the average daily trading volume.

“pe” Price/earnings ratio.

https://www.sheetaki.com/googlefinance-function-google-sheets/ 3/17
1/14/22, 10:37 PM How to Use GOOGLEFINANCE Function in Google Sheets - Sheetaki

“eps” Earnings per share.


  

“high52” The highest price over the past 52 weeks. 

“low52” The lowest price over the past 52 weeks. 

“change” The change in price since the end of the previous day’s
trading.

“beta” The beta value.

“changepct” The percentage change in price since the end of the previous
day’s trading.

“closeyest” The closing price of the previous day.

“shares” The number of outstanding shares.

“currency” The currency in which the stock is priced in.

For retrieving historical data, you can use the following attributes:

Attribute Description

“open” The opening price of a specific date.

“close” The closing price of a specific date.

“high” The high price of a specific date.

“low” The low price of a specific date.

“volume” The trading volume of a specific date.

“all” Retrieves all the attributes above.

https://www.sheetaki.com/googlefinance-function-google-sheets/ 4/17
1/14/22, 10:37 PM How to Use GOOGLEFINANCE Function in Google Sheets - Sheetaki

You can also retrieve mutual fund data with these attributes:

  

Attribute Description

“closeyest” The closing price of the previous day.

“date” The net asset value’s reported date.

“returnytd” The year-to-date return.

“netassets” The net assets.

“change” Change between the most recent and its previously


reported net asset value.

“changepct” The percentage change in the net asset value.

“yieldpct” The distribution yield.

“returnday” One-day total return.

“return1” One-week total return.

“return4” Four-week total return.

“return13” Thirteen-week total return.

“return52” Annual total return.

“return156” 3-year total return.

“return260” 5-year total return.

“incomedividend” The most recent cash distribution amount.

“incomedividenddate” The most recent cash distribution date.

“capitalgain” The most recent capital gain distribution’s amount.

https://www.sheetaki.com/googlefinance-function-google-sheets/ 5/17
1/14/22, 10:37 PM How to Use GOOGLEFINANCE Function in Google Sheets - Sheetaki

“morningstarrating” The Morningstar “star” rating.


  

“expenseratio” The fund’s expense ratio.

start_date is an optional parameter that can be used to specify the start date of
the historical data you wish to retrieve.
end_date|num_days is also an optional parameter that holds either the end
date or the number of days from the start date of the historical data you want to
retrieve.
interval is another optional parameter you can use to define the frequency of
returned data. Specify in this parameter if you want to retrieve “DAILY” or
“WEEKLY”. Alternatively, you can use 1 or 7.

A Real Example of Using GOOGLEFINANCE


Function
Let’s understand further the GOOGLEFINANCE function using the example below.

https://www.sheetaki.com/googlefinance-function-google-sheets/ 6/17
1/14/22, 10:37 PM How to Use GOOGLEFINANCE Function in Google Sheets - Sheetaki

  

The image above shows the current market data of Amazon taken from the Google
Finance website.

For instance, we want to retrieve the price and trading volume and the high and low
prices of the current day. Obviously, you can always fetch these attributes by
scanning through all the data fields and graphs on the website. However, this can
be cumbersome at times.

Google Sheets offer an easier and more efficient way of retrieving the required
data. In the image below, we utilized GOOGLEFINANCE to retrieve the four
attributes automatically.

https://www.sheetaki.com/googlefinance-function-google-sheets/ 7/17
1/14/22, 10:37 PM How to Use GOOGLEFINANCE Function in Google Sheets - Sheetaki

  

In each of our formulas, we only defined two parameters—ticker and attribute.


The second parameter holds our attribute, so you may notice that it’s the only
parameter that varies. Since we only want to retrieve Amazon’s information, we
used the same ticker for all formulas, NASDAQ:AMZN.

You see how easy that is? Now, make a copy of the example data and try the
GOOGLEFINANCE function on your own.

Make a copy of example spreadsheet.

We just showed you a concrete example of how to retrieve the current market data
using GOOGLEFINANCE. This time, let’s try to utilize this function to pull out
historical data. We’ll be using the same spreadsheet, so go ahead and click the link
above.

How to Use GOOGLEFINANCE Function in


Google Sheets
https://www.sheetaki.com/googlefinance-function-google-sheets/ 8/17
1/14/22, 10:37 PM How to Use GOOGLEFINANCE Function in Google Sheets - Sheetaki

1. Upon opening the copy of the example spreadsheet, click Sheet2 to display the
  
following data.

The purpose of the spreadsheet is to record the weekly highest and lowest
prices of the Amazon market from January to March 2021. Given the
parameters, let’s use the GOOGLEFINANCE function to display the relevant
data next to the table.

2. We’ll retrieve the high price first. In cell D3, type in the equal sign ‘=’ followed
by ‘GOOGLEFINANCE(’ to start the function.

https://www.sheetaki.com/googlefinance-function-google-sheets/ 9/17
1/14/22, 10:37 PM How to Use GOOGLEFINANCE Function in Google Sheets - Sheetaki

3. Our first parameter should contain the ticker of AMAZON, which is


  
NASDAQ:AMZN. Since it’s already provided in cell B4, we’ll just use its cell
reference. Type ‘B4‘ in our ticker parameter.

 
4. The next parameter we should indicate is the attribute. We need to retrieve the
high price, and the appropriate attribute for this is ‘high‘. Let’s specify it as our
attribute parameter.

 
5. The values for our last three parameters are already provided in the
spreadsheet. Therefore, it should be easy now to complete the function. Specify
the start_date, end_date, and interval parameters by indicating ‘B5‘, ‘B6‘, and

https://www.sheetaki.com/googlefinance-function-google-sheets/ 10/17
1/14/22, 10:37 PM How to Use GOOGLEFINANCE Function in Google Sheets - Sheetaki

‘B7‘, respectively.

  

6. When all parameters have been specified, type the close parenthesis ‘)‘ and
press the Enter key on your keyboard. This will return a result similar to the data
below.

7. Good work! You just retrieved the records we need. At this point, try to display
Amazon’s previous low price records from January to March. Type in your
formula on cell F3.

https://www.sheetaki.com/googlefinance-function-google-sheets/ 11/17
1/14/22, 10:37 PM How to Use GOOGLEFINANCE Function in Google Sheets - Sheetaki

If your formula is correct, you should have this final output.

  
 

There you go! You just learned another powerful function called
GOOGLEFINANCE. Use it along with other Google Sheets formulas to make your
work more efficient.

TAGS: Google Sheets

 SHARE  TWEET 

Chan Pascual
As an IT professional, Google Sheets and MS Excel are included in my arsenal of skills. In fact, they are my
go-to tools for organizing and analyzing data. I deal with large data sets every day, but I don't have to worry
since these tools have me covered. I would love to share everything I know about them, so, make sure to
catch up!

https://www.sheetaki.com/googlefinance-function-google-sheets/ 12/17
1/14/22, 10:37 PM How to Use GOOGLEFINANCE Function in Google Sheets - Sheetaki

VIEW COMMENTS (0) 


  

 — PREVIOUS ARTICLE

How to Create a Star Rating System in Google Sheets

NEXT ARTICLE — 

How to Use Conditional Formatting Rules in Google Sheets

YOU MAY ALSO LIKE

G — GOOGLE SHEETS

How to Use Query With Importrange in Google


Sheets
by Karla Dacanay · May 19, 2020

The Query with Importrange in Google Sheets is useful if you want to pull the exact data that…

https://www.sheetaki.com/googlefinance-function-google-sheets/ 13/17
1/14/22, 10:37 PM How to Use GOOGLEFINANCE Function in Google Sheets - Sheetaki

  

G — GOOGLE SHEETS

How to Compare Two Sheets in Google Sheets


by Xiu Jean · July 7, 2021

Learning how to compare two sheets in Google Sheets is useful to identify matches and
differences between two…

https://www.sheetaki.com/googlefinance-function-google-sheets/ 14/17
1/14/22, 10:37 PM How to Use GOOGLEFINANCE Function in Google Sheets - Sheetaki

  

G — GOOGLE SHEETS

How to Create a Gantt Chart in Google Sheets


by Leo Suarez · April 19, 2021

Learning how to create a Gantt chart in Google Sheets is useful for creating a graphical display
of…

G — GOOGLE SHEETS

How to Use PROPER Function in Google Sheets


by Roderick Timbal · May 22, 2021

The PROPER function in Google Sheets is useful if you want to capitalize words on a given text…

https://www.sheetaki.com/googlefinance-function-google-sheets/ 15/17
1/14/22, 10:37 PM How to Use GOOGLEFINANCE Function in Google Sheets - Sheetaki

  

G — GOOGLE SHEETS

How To Use COUNTA Function in Google Sheets


by Deion Menor · December 28, 2021

The COUNTA function in Google Sheets is useful when you want to return the number of values
in…

https://www.sheetaki.com/googlefinance-function-google-sheets/ 16/17
1/14/22, 10:37 PM How to Use GOOGLEFINANCE Function in Google Sheets - Sheetaki

G — GOOGLE SHEETS
  

How to Calculate Reverse Percentages in Google


Sheets
by Deion Menor · January 6, 2022

This guide will show you how you can compute reverse percentages in Google Sheets using
basic arithmetic operations.…

Hire or Contact Us Privacy Policy Terms of Use

https://www.sheetaki.com/googlefinance-function-google-sheets/ 17/17

You might also like