Skip to main content

Google Sheets Stock Price Tracker: GOOGLEFINANCE Formula Cheat Sheet

8 min read

Google Sheets Stock Price Tracker: GOOGLEFINANCE Formula Cheat Sheet

Why Bother Tracking Stocks in a Spreadsheet?

If you've ever kept a portfolio in Google Sheets the manual way, you know the routine. Wake up, open the laptop, open the brokerage, copy a price, switch tabs, paste, switch back, copy the next one. Fifteen tickers later you finally get to your coffee.

It's not just tedious — it's where small mistakes hide. One mistyped digit and you spend a week thinking you're down 30% before realizing it was just a fat-fingered "0".

GOOGLEFINANCE basically deletes that whole routine. It pulls live prices straight off the web into your sheet, so the numbers are always reasonably current and the only thing you touch by hand is share counts and buy prices.

Below: how the function actually works, the ticker formats for Taiwan and US stocks, and how to glue it into a portfolio tracker that updates itself.


GOOGLEFINANCE Basics: Syntax & Parameters

A live spreadsheet quietly doing the work

GOOGLEFINANCE is a built-in Google Sheets function that pulls stock prices, fund data, and currency quotes. Here's the syntax:

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

Parameter Breakdown

ticker (required) The stock code. Format depends on exchange:

  • Taiwan stocks: TPE:code (e.g., TPE:2330 = TSMC)
  • US stocks: exchange prefix + code (e.g., NASDAQ:AAPL = Apple)
  • Cryptocurrencies: CURRENCY:pair (e.g., CURRENCY:BTCUSD = Bitcoin in USD; works for major coins, not officially documented)

attribute (optional, default "price") What you want to retrieve:

  • "price" — Current stock price (most common)
  • "high" — Today's high
  • "low" — Today's low
  • "open" — Opening price
  • "close" — Yesterday's closing price
  • "volume" — Trading volume
  • "pe" — Price-to-earnings ratio
  • "market_cap" — Market capitalization

start_date & end_date (optional) For historical prices, specify a date range. Format: DATE(2026,3,1) or "2026-03-01"

interval (optional) Data frequency. 1 = daily, 7 = weekly.

Most Common Use Cases

Get current price:

=GOOGLEFINANCE("TPE:2330")

Get P/E ratio:

=GOOGLEFINANCE("TPE:2330", "pe")

Get today's high:

=GOOGLEFINANCE("TPE:2330", "high")

Taiwan Stock Examples

Taiwan Stock Ticker Format

Taiwan listed stocks use the format TPE:XXXX, where XXXX is a four-digit code. You can cross-check the code against Taiwan Stock Exchange (TWSE) listing information.

Common examples:

CompanyCodeGOOGLEFINANCE Format
TSMC2330TPE:2330
Foxconn (Hon Hai)2317TPE:2317
MediaTek2454TPE:2454
Bank of Taiwan2880TPE:2880
Cathay Financial2882TPE:2882
Chunghwa Telecom1326TPE:1326

Real Formula Examples

Try these in your Google Sheet:

Get TSMC's current price:

=GOOGLEFINANCE("TPE:2330")

Returns: TSMC's current price (e.g., 990)

Get TSMC's P/E ratio:

=GOOGLEFINANCE("TPE:2330", "pe")

Returns: P/E ratio (e.g., 28.5)

Get Foxconn's trading volume:

=GOOGLEFINANCE("TPE:2317", "volume")

Returns: Volume in shares (e.g., 12345600)


US Stock Examples

US Stock Ticker Format

US stocks require the exchange prefix:

  • NASDAQ: — Nasdaq (tech-heavy)
  • NYSE: — New York Stock Exchange (blue chips)

Common examples:

CompanyTickerExchangeGOOGLEFINANCE Format
AppleAAPLNASDAQNASDAQ:AAPL
MicrosoftMSFTNASDAQNASDAQ:MSFT
TeslaTSLANASDAQNASDAQ:TSLA
TSMC ADRTSMNYSENYSE:TSM
NvidiaNVDANASDAQNASDAQ:NVDA
GoogleGOOGLNASDAQNASDAQ:GOOGL

Real Formula Examples

Get Apple's stock price:

=GOOGLEFINANCE("NASDAQ:AAPL")

Get Tesla's P/E ratio:

=GOOGLEFINANCE("NASDAQ:TSLA", "pe")

Get Microsoft's daily high:

=GOOGLEFINANCE("NASDAQ:MSFT", "high")

Building Your Own Portfolio Tracker

Now that the syntax is out of the way, here's how to actually wire up a working tracker.

If you only need to verify the holdings registered in your name, you can also cross-check them with the Taiwan Depository & Clearing Corporation's e-Passbook.

Table Structure

Set up these columns:

Stock NameTickerSharesBuy PriceCurrent Price (Auto)Market ValueCost BasisGain/Loss $Gain/Loss %
TSMCTPE:233010800??8,000??
FoxconnTPE:23175180??900??
AppleNASDAQ:AAPL2150??300??

Formula Setup

Current Price column (assume column E):

=GOOGLEFINANCE(B2)

Automatically fetches the price for the ticker in cell B2.

Market Value column (assume column F):

=C2*E2

Shares × Current Price = What your position is worth today.

Cost Basis column (assume column G):

=C2*D2

Shares × Buy Price = How much you originally invested.

Gain/Loss $ column (assume column H):

=F2-G2

Market Value − Cost Basis = Profit or loss in dollars.

Gain/Loss % column (assume column I):

=(H2/G2)*100

(Gain/Loss $ ÷ Cost Basis) × 100 = Return percentage.

Complete Worked Example

Say you hold:

  • 10 shares of TSMC, bought at 800
  • Current price: 990
ItemValue
Shares10
Buy Price800
Current Price990 (auto-fetched)
Market Value9,900 (10 × 990)
Cost Basis8,000 (10 × 800)
Gain/Loss $1,900 (9,900 − 8,000)
Gain/Loss %23.75% (1,900 ÷ 8,000 × 100)

Once the formulas are in, prices refresh on their own and your returns recalculate. The only thing you actually touch is share count when you buy or sell.


Things That Will Catch You Out

A few quirks worth knowing before you build something serious on top of it:

The data isn't truly live. It's officially documented as delayed by up to 20 minutes, with no guarantee of real-time data. If you're a day trader watching the second-by-second tape, this isn't your tool.

Crypto support isn't officially documented. The CURRENCY:BTCUSD-style currency-pair syntax works for major coins like BTC and ETH, but less common coins and historical data often come back #N/A — don't treat it as a stable source.

Only TWSE-listed stocks work. OTC, emerging-board, and unlisted shares all come back blank.

No internet, no update. GOOGLEFINANCE pulls live, so an offline sheet just shows whatever was cached on the last refresh.

Tickers are picky. Forget the colon (TPE2330) or use the wrong case and you get #N/A or #VALUE! straight away.


When You've Outgrown GOOGLEFINANCE

Sooner or later most people hit something the function can't do. At that point, there are usually three paths:

  1. Use IMPORTXML for public web pages — useful for small, occasional lookups, but a page redesign can break the formula and make maintenance less predictable than manual updates.
  2. Connect a brokerage API — gives you richer holdings and quote data and lets you choose where it lives; the tradeoff is handling code, API limits, and key security.
  3. Use a third-party tool — let a service handle quotes, FX, and visualisation, including tools such as WalletMap that use a spreadsheet as the source of truth. Check supported markets, refresh frequency, and actual data storage before choosing one.

Where to Start

GOOGLEFINANCE is genuinely useful. If you're tracking Taiwan and US stocks and that's it, a few formulas honestly get the whole job done.

The flow is short:

  1. Open a Google Sheet
  2. Create a table (ticker, shares, buy price)
  3. Use =GOOGLEFINANCE("ticker") in the Current Price column
  4. Add simple formulas for gains/losses
  5. Done. It updates automatically.

If your portfolio gets messier — crypto, multiple currencies, better visuals — or you just don't feel like babysitting a spreadsheet on weekends, choose an automation option that matches your needs. Check the data source, refresh frequency, supported markets, and storage model before comparing feature counts.

Either way, the move that matters is starting. Untracked assets feel bigger than they are and smaller than they are at the same time — until you can actually see them.


Further reading

Frequently Asked Questions

Yes, but only TWSE-listed stocks. Add the TPE: prefix — for example, =GOOGLEFINANCE("TPE:2330") returns the TSMC share price. Emerging-board and OTC stocks aren't supported and come back blank.
No. It's officially documented as delayed by up to 20 minutes, so it isn't guaranteed real-time. If you need second-by-second data for day trading, this isn't the right tool.
It's not officially documented, but in practice CURRENCY:BTCUSD-style currency-pair syntax works for major coins like BTC and ETH. Less common coins and historical data often return #N/A, so don't rely on it as a stable source.
Common ones include: price (current), open, close (previous day), high (today's high), low (today's low), volume, pe (P/E ratio), and market_cap.
Usually a ticker format mistake — missing the colon (TPE2330 instead of TPE:2330) or wrong case. It can also mean the security type isn't supported (e.g. Taiwan OTC, emerging-board).

Related Articles