Google Finance RSI in Google Sheets: How to Calculate
In this article
Google Sheets does not have a built-in RSI function for Google Finance data, but you can calculate the Relative Strength Index yourself using a helper column of daily closing prices and two short formulas. The result is a live RSI that updates when the sheet recalculates, which is enough for screening and monitoring. This guide shows the exact formulas, how to lay out the sheet, and the mistakes that make RSI values come out wrong.
What You'll Need
- A Google account with access to Google Sheets (desktop browser is easiest; the mobile app works for viewing but is awkward for formulas).
- The ticker symbol exactly as Google Finance uses it, including the exchange prefix where needed (for example
NASDAQ:AAPLorNYSE:IBM). - At least 30 trading days of closing prices. RSI is normally calculated over 14 periods, and the first value needs a full run of prior prices.
- A basic understanding of relative references and how to drag a formula down a column.
Step-by-Step
- Open a blank sheet and label your columns. In row 1, put these headings: A1
Date, B1Close, C1Change, D1Gain, E1Loss, F1Avg Gain, G1Avg Loss, H1RS, I1RSI. Keeping one value per column makes the formulas readable and easy to audit. - Pull the closing prices with GOOGLEFINANCE. In A2 enter a start date, for example
=TODAY()-60. In B2 enter=GOOGLEFINANCE("NASDAQ:AAPL", "close", A2, TODAY()). This spills a two-column array: dates in one column and closing prices in the next. If the array spills into A and B automatically, your manual Date and Close headings may be overwritten; in that case, put the GOOGLEFINANCE formula in a separate area (for example columns K and L) and reference those cells from your calculation columns. The exact syntax isGOOGLEFINANCE(ticker, "close", start_date, end_date); labels and behaviour can differ slightly by region and by how Sheets handles array formulas. - Calculate the daily change. In C3 (the first row with two prices) enter
=B3-B2. Drag the fill handle down to the last row of prices. This gives the day-over-day point change. - Split the change into gains and losses. In D3 enter
=IF(C3>0,C3,0)and in E3 enter=IF(C3<0,-C3,0). Drag both down. Gains are positive changes only; losses are stored as positive numbers so the averages stay comparable. - Seed the first average gain and loss. RSI uses a smoothed average, not a simple average. For the first 14 periods, use a simple average. In F16 enter
=AVERAGE(D3:D16)and in G16 enter=AVERAGE(E3:E16). Adjust the row numbers if your data starts on a different row, but keep the range exactly 14 rows. - Continue the averages with Wilder's smoothing. In F17 enter
=(F16*13+D17)/14and in G17 enter=(G16*13+E17)/14. Drag both formulas down to the last row. The 13 and 14 come from the 14-period lookback: the previous average is weighted 13/14 and the new value 1/14. - Compute RS and RSI. In H17 enter
=IF(G17=0,"",F17/G17). In I17 enter=IF(G17=0,100,100-100/(1+H17)). Drag both down. The IF guard prevents a divide-by-zero error when there are no losses in the window, which would otherwise show an error instead of an RSI near 100. - Format and read the result. Select column I and format it as a number with one or two decimal places. The latest row's RSI is your current reading. Values above 70 are conventionally called overbought and below 30 oversold, though these thresholds are conventions, not rules.
- Refresh the data. GOOGLEFINANCE updates on its own schedule, but you can force a recalculation by editing any cell or pressing Ctrl+Shift+F9 (Cmd+Shift+F9 on Mac). If prices look stale, check that the ticker is valid and that the date range includes trading days.
Common Mistakes
- Using a simple average for every row. Replacing the Wilder smoothing with
AVERAGEacross a rolling 14-row window gives a different, more jumpy RSI. It is not wrong as a variation, but it will not match most charting platforms. - Starting the average too early. If the first average gain formula covers fewer than 14 rows, the seed is wrong and every later value inherits the error.
- Mixing up the sign of losses. Storing losses as negative numbers makes the average loss negative, which breaks the RS ratio. Keep losses positive.
- Dividing by zero. A stock that only rises in the window has zero average loss. Without the IF guard, the RSI cell shows
#DIV/0!. - Using the wrong ticker format. A bare symbol may resolve to a different exchange than you expect. Include the exchange prefix when Google Finance requires it.
- Assuming intraday prices. The
closeattribute returns daily closing prices. For intraday data you need a different attribute and a different layout; the RSI method above is built for daily closes.
Tips
- Put the ticker in a single cell (for example K1) and reference it in the GOOGLEFINANCE formula with
$K$1. Changing one cell then updates the whole model for a new stock. - Add a second sheet that pulls RSI for several tickers side by side so you can compare readings at a glance.
- Use conditional formatting on column I to colour cells above 70 and below 30; it makes the current state obvious without reading numbers.
- Keep a fixed date range rather than a moving one while you are checking your formulas, so you can compare results against a charting platform for the same days.
- Round only for display. Let the underlying cells keep full precision, or small rounding errors compound through the smoothing.
Troubleshooting
- The GOOGLEFINANCE formula returns
#N/A. The ticker is probably invalid for Google Finance, or the date range contains no trading days. Test the ticker on the Google Finance website first, then widen the range. - Prices are blank or stale. Force a recalculation, confirm the sheet is not in a state where automatic calculation is off, and check that the date range ends on or after the last trading day.
- RSI shows
#DIV/0!. The average loss cell is zero. The IF guard in step 7 should prevent this; if you removed it, put it back. - RSI is wildly different from your broker's chart. Check three things: the number of periods (14 by default), whether the platform uses Wilder smoothing or a simple average, and whether the price series is adjusted for splits and dividends. Any of these can shift the value.
- The array formula overwrote your headings. Move the GOOGLEFINANCE call to a separate block of columns and point the calculation columns at those cells, as described in step 2.
- Dragging a formula gives wrong results. Look for missing dollar signs on fixed references, or a range that shifts when it should stay anchored.
Frequently Asked Questions
Does Google Sheets have a built-in RSI function?
No. There is no RSI function in Google Sheets and no RSI attribute in GOOGLEFINANCE. You calculate it from closing prices with your own formulas, as above.
Can I calculate RSI for a different number of periods?
Yes. Replace 14 with your chosen period throughout: the seed average range, and the 13 and 14 in the smoothing formula become period minus one and period. Keep them consistent or the result will drift.
Why does my RSI not match the one on a charting site?
Most often because of smoothing method (Wilder versus simple average), the exact price series used, or whether adjusted prices are used. Confirm all three before assuming a formula error.
Can I use GOOGLEFINANCE for intraday RSI?
The close attribute is daily. Intraday attributes exist but return a different data shape, so the same column layout will not work without changes. For most screening purposes, daily RSI is the practical choice.
How often does the RSI update?
It updates when the sheet recalculates and when GOOGLEFINANCE returns fresh data. You can force a recalculation manually, but you cannot set a custom refresh interval.