Quick Answer

GOOGLEFINANCE Function

GOOGLEFINANCE pulls live stock prices, currency rates, and historical market data into your spreadsheet.

✓ Excel✓ Google SheetsExcel Google Sheets only

Syntax

GOOGLEFINANCE
(ticker, [attribute], [start_date], [end_date|num_days], [interval])

Parameters

ParameterDescriptionRequired
tickerThe ticker symbol to look up, including exchange prefix when needed, e.g. 'NASDAQ:GOOG' or 'EURUSD'. For currency pairs, use 'CURRENCY:EURUSD'.Required
attributeThe data point to retrieve, e.g. 'price', 'change', 'changepct', 'high', 'low', 'volume', 'marketcap', 'eps', 'pe', 'name', 'close', 'open', 'high52', 'low52'. Default is 'price'.Optional
start_dateFor historical data, the start date of the range. Omit for current data.Optional
end_dateFor historical data, the end date of the range, or a number of days (e.g. 30) to retrieve from the start_date.Optional
intervalFrequency of historical data: 'DAILY' or 'WEEKLY'. Default is 'DAILY'.Optional

Basic Example

Get the current stock price for Apple

=GOOGLEFINANCE('AAPL', 'price')
ResultCurrent AAPL price

The first argument is the ticker. The second argument asks for the current price.

Advanced Examples

Example 1: Historical closing prices for the last 30 days

Stock analysis

Pull daily closing prices for Tesla over the past 30 days

=GOOGLEFINANCE('TSLA', 'close', TODAY()-30, TODAY())
Result: Two-column table of dates and closing prices
TODAY()-30 and TODAY() define the date range. The function returns a table with dates and 'close' values.

Example 2: Currency exchange rate

Forex lookup

Get the current EUR to USD exchange rate

=GOOGLEFINANCE('CURRENCY:EURUSD')
Result: Current EUR/USD rate
The CURRENCY: prefix tells Google Finance to return the exchange rate for the pair.

Example 3: Company fundamentals

Fundamental analysis

Retrieve the P/E ratio and market cap for Microsoft

=GOOGLEFINANCE('MSFT', 'pe')
Result: Microsoft P/E ratio
Attributes like 'pe', 'eps', 'marketcap', and 'high52' return company fundamentals.

How GOOGLEFINANCE Works

GOOGLEFINANCE connects to Google Finance and returns live or historical market data. The ticker argument identifies the security or currency pair. Attributes specify which metric to retrieve. For historical data, dates and interval control the returned table.

1
Find the ticker
Use the stock symbol or add an exchange prefix, e.g. 'NASDAQ:TSLA'.
2
Choose an attribute
Pick 'price' for current price, 'close' for historical, or 'pe', 'eps', etc. for fundamentals.
3
Add dates for history
For historical data, include start_date and end_date or a number of days.
4
Set the interval
Use 'DAILY' or 'WEEKLY' for historical data. Default is daily.

Important Notes & Limitations

  • GOOGLEFINANCE is Google Sheets only and does not work in Excel.

  • Data may be delayed (typically 15-20 minutes) and is not suitable for real-time trading.

  • Some attributes are not available for all tickers or exchanges.

  • Google may limit the number of GOOGLEFINANCE calls in a spreadsheet.

Common Errors & Fixes

#N/A errorTicker is unrecognized or the attribute is not supported for that ticker.

Fix: Try a different exchange prefix (e.g. 'NYSE:T' instead of 'T') or verify the attribute name.

Blank resultThe market is closed or the ticker has no data.

Fix: Check the ticker and try again during market hours.

Wrong currency rateCurrency pair syntax is incorrect.

Fix: Use 'CURRENCY:EURUSD' for EUR to USD, not 'EURUSD' alone.

Download Practice File

Practice GOOGLEFINANCE with Real Data

Download a sample CSV file with pre-populated data and practice exercises for the GOOGLEFINANCE function. Works in both Excel and Google Sheets.

Works in Google SheetsCompatible with ExcelIncludes exercises

File format: CSV (comma-separated values) - opens in Excel, Google Sheets, and all spreadsheet apps

Frequently Asked Questions

Is GOOGLEFINANCE data real-time?
No, it is delayed by about 15-20 minutes for most exchanges.
Can I get options or futures data?
GOOGLEFINANCE does not support options or futures directly. It covers stocks, ETFs, mutual funds, and currency pairs.
How do I get historical dividends?
Use the attribute 'dividend' or 'yield' for current yield; full historical dividend series is not available through GOOGLEFINANCE.
Can I use GOOGLEFINANCE with Excel?
No, it is a Google Sheets function. In Excel, use STOCKHISTORY or Power Query with a financial data source.