Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Google Sheets GOOGLEFINANCE Function: How to Use It

· 4 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

The GOOGLEFINANCE function in Google Sheets pulls live and historical financial data—stock prices, currency rates, mutual fund values—directly into your spreadsheet. It returns a value or a table depending on the attributes you request. To use it, you need a Google account and a blank or existing Google Sheet; no add-ons or API keys are required. The function works in the web version of Google Sheets and the mobile apps, though some attributes may behave differently on mobile.

What You'll Need

  • A Google account (free).
  • Access to Google Sheets via a web browser or the mobile app.
  • Internet connection (data is fetched from Google's servers).
  • Exchange ticker symbols (e.g., "NASDAQ:GOOG", "NYSE:IBM") for stocks; currency pairs (e.g., "USD/EUR") for exchange rates.

Step-by-Step

  1. Open a Google Sheet. Go to sheets.google.com and create a new blank spreadsheet or open an existing one.
  2. Select a cell. Click the cell where you want the result to appear (e.g., A1).
  3. Start the formula. Type =GOOGLEFINANCE( and you'll see the syntax hint: GOOGLEFINANCE(ticker, [attribute], [start_date], [end_date], [interval]). Note: menu labels and function hints can differ slightly by version or region.
  4. Enter the ticker. For stocks, use the exchange prefix and symbol in quotes, e.g., "NASDAQ:GOOG". For currencies, use "CURRENCY:USDGBP" or "USD/GBP" (the latter works in some contexts). For mutual funds, use "MUTF:VFIAX".
  5. Add the attribute (optional). If you omit it, the function returns the current price. Common attributes: "price", "priceopen", "high", "low", "volume", "marketcap", "tradetime", "change", "changepct", "yield" (for bonds), "name", "closeyest". Enclose in quotes: "price".
  6. For historical data, add start and end dates. Use DATE(2020,1,1) or a cell reference. Example: =GOOGLEFINANCE("NASDAQ:GOOG", "close", DATE(2020,1,1), DATE(2020,12,31), "DAILY"). The interval can be "DAILY" or "WEEKLY".
  7. Close the parenthesis and press Enter. The cell will display the result. For a single attribute, you get a number; for historical data, you get a two-column table (Date, Close).
  8. Copy the formula down or across. Drag the fill handle to apply to other tickers. Use absolute references (e.g., $A$1) for the ticker if you want to change it in one place.
  9. Format the result. Select the cell and use Format > Number > Currency or Percent as needed. For dates, use Format > Number > Date.
  10. Refresh data. GOOGLEFINANCE updates automatically roughly every 20 minutes during market hours, but you can force a refresh by reloading the sheet or using File > Settings > Calculation > Recalculate now (on desktop).

Common Mistakes

  • Missing exchange prefix. Using "GOOG" instead of "NASDAQ:GOOG" often returns #N/A. Always include the exchange for stocks.
  • Wrong attribute name. Attributes are case-sensitive and must be in quotes. "Price" may fail; use "price".
  • Forgetting quotes around text arguments. Ticker and attribute must be text strings in double quotes.
  • Using dates as text. Dates must be actual date values (via DATE function or cell reference), not strings like "2020-01-01".
  • Expecting real-time data. GOOGLEFINANCE is delayed (often 20 minutes) and not suitable for high-frequency trading.
  • Historical data limits. Requesting too many days at daily interval may return #N/A if the range is too large; use weekly interval for long ranges.
  • Currency pair format. Use "CURRENCY:USDGBP" or "USD/GBP"; other formats may not work.

Tips

  • Use GOOGLEFINANCE("NASDAQ:GOOG", "name") to get the company name.
  • Combine with SPARKLINE to create mini charts: =SPARKLINE(GOOGLEFINANCE("NASDAQ:GOOG", "price", TODAY()-30, TODAY())).
  • For a portfolio, list tickers in one column and use a single formula with ARRAYFORMULA to fetch prices for all.
  • Use IFERROR to handle #N/A gracefully: =IFERROR(GOOGLEFINANCE("NASDAQ:GOOG", "price"), "N/A").
  • Check the official GOOGLEFINANCE documentation for the full list of attributes.

Troubleshooting

If you see #N/A, check the ticker symbol and exchange prefix. For #REF!, ensure the formula isn't trying to overwrite existing data. If the function returns #NAME?, you may have mistyped the function name. If data doesn't update, verify your internet connection and that the sheet is set to recalculate automatically (File > Settings > Calculation). For historical data, ensure the date range is valid and not in the future. If you get a #VALUE! error, check that dates are proper date values. On mobile, some attributes may not be supported; try the web version for full functionality.

Frequently Asked Questions

Is GOOGLEFINANCE real-time?

No, it is delayed by up to 20 minutes for most exchanges. It is not suitable for real-time trading.

Can I get cryptocurrency prices?

GOOGLEFINANCE supports some cryptocurrencies via "CURRENCY:BTCUSD" or similar, but coverage varies. Check the documentation for supported pairs.

Why does my formula return #N/A?

Common causes: missing exchange prefix, incorrect ticker, or unsupported attribute. Double-check the symbol and attribute spelling.

How often does the data refresh?

Google refreshes data roughly every 20 minutes during market hours. You can force a refresh by reloading the sheet.

Can I use GOOGLEFINANCE for historical currency rates?

Yes, use the same syntax with a currency pair and date range, e.g., =GOOGLEFINANCE("CURRENCY:USDGBP", "close", DATE(2020,1,1), DATE(2020,12,31)).

Does GOOGLEFINANCE work in all countries?

It is available globally, but some exchanges or data may be restricted in certain regions. If you encounter issues, try a different ticker or check local restrictions.