Historical Stock Prices in Excel: How to Pull, Verify, and Analyze Price History With MarketXLS

M
MarketXLS Team
Published
Historical stock prices in excel workbook with MarketXLS formulas for OHLC, adjusted close, and return analysis

Historical stock prices in excel is the search most analysts, advisors, and self-directed investors run when they want their charts, return calculations, and backtests to live where the rest of their models already live. The web is full of price tables, downloadable CSVs, and read-only chart widgets, but none of those become real research until the numbers sit in cells you can reference. This guide shows how to bring historical stock prices in excel using MarketXLS, how to verify the data, and how to use the included workbook to run return, drawdown, and corporate action analysis without leaving the spreadsheet.

If you are reading this with a 252-day return question in your head, an earnings reaction study to build, a CAGR to settle, or a dividend reinvestment model to finish, the next sections give you the exact formulas to use, the structure of a clean history workbook, and the common gotchas around adjusted close, splits, and weekends.

Quick Reference: MarketXLS Formulas for Historical Stock Prices in Excel

What You NeedMarketXLS FormulaExample
Current last price=QM_Last("AAPL")Today's last traded price
Full OHLCV history (spilled)=QM_GetHistory("AAPL")Spill an array of daily OHLCV
Historical close on a date=CLOSE_HISTORICAL("AAPL","2024-05-13")Daily close at a date
Historical open=OPEN_HISTORICAL("AAPL","2024-05-13")Daily open at a date
Historical high=HIGH_HISTORICAL("AAPL","2024-05-13")Daily high at a date
Historical low=LOW_HISTORICAL("AAPL","2024-05-13")Daily low at a date
Adjusted close (splits + dividends)=ADJUSTED_CLOSE_HISTORICAL("AAPL","2024-05-13")Total return aware close
Dividend history=DividendHistory("AAPL")Spill of dividend events
Split history=SplitHistory("AAPL")Spill of split events
50 / 200-day moving average=SimpleMovingAverage("AAPL","50")Trend reference
52-week high and low=FiftyTwo_WeekHigh("AAPL"), =FiftyTwo_WeekLow("AAPL")Context for range position
RSI 14=RelativeStrengthIndex("AAPL","14")Momentum reference
Beta=Beta("AAPL")Risk relative to market

Every formula in this guide has been verified against the MarketXLS Function Docs. The full workbook lives at the bottom of the page in two flavors: a static sample with values pre-filled and a live MarketXLS template you can repoint to any ticker.

Why Historical Stock Prices in Excel Still Matters in 2026

Pulling historical stock prices in excel sounds old-fashioned next to dashboards, notebooks, and cloud BI tools. It is not. There are three reasons it remains the default working surface for serious price research.

The first is composability. A return number is rarely the final answer. It feeds a sizing model, a risk overlay, a fee analysis, or a client report. The moment a value sits inside a cell, every other formula in the workbook can reference it. That is harder to replicate in a chart widget or a SaaS dashboard, even a very good one.

The second is auditability. Compliance teams, investment committees, and clients expect to see the numbers they are being shown. Pulling historical stock prices in excel with =CLOSE_HISTORICAL("AAPL","2024-05-13") lets you trace any output back to a known source and a known date. That single property keeps Excel relevant even as the rest of the analytics stack has modernized.

The third is speed of iteration. Want to test a different lookback window? Change one input cell. Want to add a new ticker? Edit one row. Want to see what a strategy would have done if a dividend had been reinvested? Swap CLOSE_HISTORICAL for ADJUSTED_CLOSE_HISTORICAL. That kind of iteration is why Excel is still where most price-driven research is actually finished.

The Three Layers of Historical Stock Data

Before any formula lands in a cell, it helps to know which version of "historical price" you actually want. Three layers matter.

The raw OHLC layer is the open, high, low, and close as reported by the exchange. This is what you want when you are studying intraday range, gap behavior, or candlestick patterns. In MarketXLS you reach it through OPEN_HISTORICAL, HIGH_HISTORICAL, LOW_HISTORICAL, and CLOSE_HISTORICAL.

The adjusted close layer corrects historical closes for splits and dividends. This is the layer to use when you are calculating returns, building total return charts, or doing any kind of multi-year performance comparison. Without adjustment a 4-for-1 split looks like a 75 percent crash and a dividend-paying stock understates its true return. ADJUSTED_CLOSE_HISTORICAL handles the adjustment for you.

The corporate action layer is the underlying record of splits and dividend payments. You read it directly with SplitHistory and DividendHistory. Most analysts touch this layer only when they need to reconstruct exactly why an adjusted close differs from the raw close on a particular date.

A workbook that respects all three layers - raw, adjusted, and action - is a workbook that does not surprise you six months later when someone asks "how did you get that number."

Building the Workbook Step by Step

The companion template puts six sheets in one file: How To Use, Snapshot Dashboard, Historical Prices, Return Analysis, Dividends and Splits, and Volatility and Drawdown. The structure is simple on purpose. Each sheet has one job, and each formula points back to either a yellow input cell or to a ticker in column A.

Sheet 1: How To Use

The How To Use sheet is a one-page workflow guide. It lists the inputs you can change, the sheets you can navigate to, and the links you may need - product page at https://marketxls.com, demo booking at https://marketxls.com/book-demo, and the formula reference at the bottom of every other sheet. Tellingly, this is also the sheet you should share with a teammate before they touch the workbook. A clear cover page prevents most of the questions you would otherwise have to answer later.

Sheet 2: Snapshot Dashboard

The Snapshot Dashboard puts a watchlist of eight tickers next to today's reference values: last price, 50 and 200-day moving averages, 52-week high and low, RSI 14, beta, and dividend yield. The formulas are exactly the ones in the quick reference table above. Two derived columns add context:

  • Trend Points: =IF(B10>C10,1,0)+IF(C10>D10,1,0) returns 0, 1, or 2 depending on whether the last price is above the 50 DMA and the 50 DMA is above the 200 DMA.
  • Range Position: =IFERROR((B10-F10)/(E10-F10),0) expresses where the last price sits inside the 52-week range, between 0 percent at the low and 100 percent at the high.

Neither column is a recommendation. Both are diagnostic - they make the watchlist easier to scan and remind you that price history is not just a list of closes, it is also context.

Sheet 3: Historical Prices

This is the sheet most readers came here for. The setup is deliberately boring:

A         B            C       D       E       F       G          H
Ticker    Ref Date     Open    High    Low     Close   Adj Close  Range %
AAPL      =$B$2        =OPEN_HISTORICAL(A5,B5)
                              =HIGH_HISTORICAL(A5,B5)
                                      =LOW_HISTORICAL(A5,B5)
                                              =CLOSE_HISTORICAL(A5,B5)
                                                      =ADJUSTED_CLOSE_HISTORICAL(A5,B5)
                                                                  =(D5-E5)/F5

The single reference date cell in B2 propagates to every row through =$B$2, so you change one cell and the whole table updates. Below it, a multi-date matrix pulls ADJUSTED_CLOSE_HISTORICAL for three different reference dates against the same ticker list. That table is the core of the return analysis on the next sheet.

A few small but important formatting details:

  • Dates are strings in YYYY-MM-DD format. MarketXLS accepts either a string or a date-typed cell. Using strings is the safest default if you ever copy the workbook to another machine with different regional settings.
  • If a reference date is a weekend or a US market holiday, the formulas return the value for the next available trading session. That is usually what you want, but it is worth knowing if you are reconciling against another data vendor.
  • Volume is not part of the per-date functions in this layer because each date only has one volume number. If you want a full daily volume series, use =QM_GetHistory("AAPL") which spills OHLC and volume across columns.

Sheet 4: Return Analysis

Once historical closes are in place, returns are an arithmetic exercise. The template uses adjusted closes so the numbers are total-return correct:

1Y Return = QM_Last(A4) / ADJUSTED_CLOSE_HISTORICAL(A4,"2025-05-13") - 1
3Y Return = QM_Last(A4) / ADJUSTED_CLOSE_HISTORICAL(A4,"2023-05-13") - 1
5Y Return = QM_Last(A4) / ADJUSTED_CLOSE_HISTORICAL(A4,"2021-05-13") - 1
CAGR 5Y  = (1 + 5Y Return)^(1/5) - 1

The fifth column adds a forward-looking volatility reference using =ImpliedVolatility1Y(A4) for context. Realized volatility from price history can be added with STDEV over a daily return column, which the live template version supports by referencing the QM_GetHistory spill on the last sheet.

This is where the "boring sheet" philosophy pays off. Every cell has one source, and there is no place to hide a calculation error. If someone questions the 5-year return on a name, you can show them exactly which closes are being used.

Sheet 5: Dividends and Splits

Returns without dividends and splits are returns with a hole in them. The Dividends and Splits sheet uses DividendHistory and SplitHistory as spill anchors so you can see the actual events behind any adjusted close. Two static reference columns - trailing yield and dividend per share - give you a quick read on the income side without scrolling through the spill output.

When you reconcile a return number to a source, the order is usually:

  1. Start with CLOSE_HISTORICAL for the start and end dates.
  2. Compare against ADJUSTED_CLOSE_HISTORICAL for the same dates.
  3. If they differ, scan DividendHistory and SplitHistory between the two dates to see what happened.

If you can answer "why does adjusted differ from raw" in 30 seconds with this workbook, you have done your job.

Sheet 6: Volatility and Drawdown

The last sheet is a small risk-context table: last price, 52-week high and low, drawdown from the 52-week high, beta, and an anchor cell for the full daily history spill. The spill is what enables more advanced calculations. Two examples you can add on top of it:

  • Annualized realized volatility: with a daily return column derived from the spill, =STDEV(returns_range) * SQRT(252) is the standard annualization.
  • Maximum drawdown over the spilled window: with a running maximum column built from the adjusted close spill, drawdown is =close / running_max - 1 and max drawdown is the MIN of that column.

These are educational calculations, not investment advice. They exist because risk numbers should be derivable from the same workbook that produces the return numbers, not from a separate tool.

Live MarketXLS Implementation in Action

To make this concrete, here is the exact formula set the template applies to a single row. Assume row 10 is AAPL on the Snapshot Dashboard:

B10  =QM_Last(A10)
C10  =SimpleMovingAverage(A10,"50")
D10  =SimpleMovingAverage(A10,"200")
E10  =FiftyTwo_WeekHigh(A10)
F10  =FiftyTwo_WeekLow(A10)
G10  =RelativeStrengthIndex(A10,"14")
H10  =Beta(A10)
I10  =DividendYield(A10)
J10  =IF(B10>C10,1,0)+IF(C10>D10,1,0)
K10  =(B10-F10)/(E10-F10)

Change A10 from AAPL to NVDA, and every dependent cell on the same row updates. The same pattern is repeated on every other sheet, so editing one ticker repoints the entire workbook for that name. That is the practical payoff of doing historical stock prices in excel rather than in a closed dashboard - one input change, one consistent answer everywhere.

Adjusted Close vs Raw Close: The Single Most Common Mistake

Most analysts who blow up a return number do it by mixing adjusted and raw closes. The fix is mechanical.

Use raw close when:

  • You are studying single-day behavior, like the close on the day before an earnings release.
  • You are reproducing what a trader would have seen on the screen at that moment.
  • You are working inside a single trading day and corporate actions are not a factor.

Use adjusted close when:

  • You are calculating returns across any corporate action - splits, special dividends, regular dividends.
  • You are computing CAGR, alpha, beta, volatility, or any statistic that requires a continuous return series.
  • You are comparing performance across stocks that have different dividend policies.

The template defaults to adjusted close for any cross-date calculation. The raw close columns exist for inspection, not for arithmetic.

Edge Cases You Will Hit

A few situations come up often enough to mention.

Weekends and holidays. If your reference date is not a trading day, the historical functions return the next available trading session's value. If you need the most recent close on or before that date, use the date one day earlier, or build a helper column with WORKDAY and an exchange holiday list.

Tickers that have changed. Symbols change after mergers, spin-offs, and listing transfers. If a historical function returns a blank or an error for an old date, check whether the ticker was different at that point in time. The corporate action history can usually point you to the previous identifier.

Indices vs ETFs. For broad market reference, the template uses SPY rather than the S and P 500 index symbol. ETFs have clean historical data, dividends, and a daily NAV that lines up with what an investor could have actually held. If you want pure index levels for research, the same historical functions accept index tickers, but be aware that ETFs and indices will diverge slightly due to tracking error and dividend timing.

International tickers. MarketXLS supports exchange-prefixed tickers for most major venues. Pass them as a single string just like a US ticker. The historical functions will return the local currency price unless you explicitly use the FX-converted helpers.

Manual notes. If you embed a manually researched note in a cell - for example, a one-line comment about an unusual move - keep it in a clearly labeled comment column. The discipline of separating live formulas from static notes makes a workbook age well.

Where MarketXLS Fits Compared to Other Approaches

There are a few common ways to get historical stock prices in excel today. Each has a reasonable place.

CSV downloads from a data portal are free and quick for a one-time pull. The downside is that they are static. The day after you download them, they are out of date. They also do not adjust for corporate actions unless the portal explicitly says so, and the adjustment methodology often is not documented.

Web-based dashboards are great for reading and presenting but not for modeling. Once you want to feed a number into your own formula, you are back to copy-paste, which is exactly the problem that drove the historical stock prices in excel question in the first place.

Python or R notebooks are powerful but introduce a parallel toolchain. Most teams either invest fully in code or stay in spreadsheets. A hybrid where the canonical return number lives in a notebook and the client report lives in Excel is a frequent source of reconciliation pain.

MarketXLS sits inside Excel and refreshes on demand. Every number is a cell, every cell is auditable, and the same workbook that pulls history also runs the rest of your model. That alignment is the practical reason to use it for daily research.

A Note on Methodology

This guide is educational. The watchlist tickers, reference dates, and example return numbers exist to show how the formulas behave, not to recommend any security. Returns are highly path-dependent, and any single historical window is a small sample of possible outcomes. The workbook is designed to be transparent so that you can replace the example tickers with your own and reproduce any number you publish.

Download the Templates

Two files ship with this post. Both are free and require an active MarketXLS connection for the live version.

Download the templates:

  • - Pre-filled with values as of 2026-05-13 and a labeled formula reference column on every sheet
  • - Live formulas that update against the MarketXLS data feed

Both files use the same sheet structure so you can compare the static example to the live behavior side by side.

FAQ

How do I pull historical stock prices in excel for a single date?

Use =CLOSE_HISTORICAL("TICKER","YYYY-MM-DD") for the raw close, or =ADJUSTED_CLOSE_HISTORICAL("TICKER","YYYY-MM-DD") if you want the corporate-action-adjusted version. Both accept either a string or a date-typed cell as the second argument.

How do I pull a full daily price history for a ticker?

Use =QM_GetHistory("TICKER"). The formula spills an array of dates, open, high, low, close, and volume across the rows below it. From there you can build daily return, rolling volatility, and drawdown columns with standard Excel formulas.

Which formula should I use for total return calculations?

Use ADJUSTED_CLOSE_HISTORICAL for the start and end of any return window. The adjusted close already accounts for splits and regular dividends, so the resulting return is a clean total-return number.

What if the date I pick is a weekend or a market holiday?

The historical functions return the next available trading session's value. If you need the last trading day on or before a given date, subtract one day with WORKDAY or simply pass the prior business day as the date argument.

Can I see the dividend and split events behind the adjusted close?

Yes. =DividendHistory("TICKER") spills a table of dividend events with dates and amounts, and =SplitHistory("TICKER") spills a table of split events. Reconcile against ADJUSTED_CLOSE_HISTORICAL minus CLOSE_HISTORICAL to see exactly which events caused the adjustment.

How do I keep the workbook fast with a long watchlist?

Reduce the number of QM_GetHistory spills to only the rows where you actually need the full series. Per-date functions like CLOSE_HISTORICAL are lightweight even at scale. Refresh through the MarketXLS ribbon when you change inputs, rather than letting every keystroke trigger a recalculation.

The Bottom Line

Pulling historical stock prices in excel is one of those tasks that looks small until you do it badly. The difference between using raw close and adjusted close, the difference between handling a split correctly and silently losing 75 percent of return, the difference between a reproducible workbook and a brittle one - all of those compound into the quality of every return number you ever publish.

MarketXLS turns the work of pulling, adjusting, and verifying historical stock prices into a small number of well-named formulas: CLOSE_HISTORICAL, OPEN_HISTORICAL, HIGH_HISTORICAL, LOW_HISTORICAL, ADJUSTED_CLOSE_HISTORICAL, DividendHistory, SplitHistory, and QM_GetHistory for full spills. The template ties them together with the rest of the MarketXLS function library so that the same workbook handles current price, moving averages, beta, dividend yield, and the historical context that makes any of those numbers meaningful.

If you want to see how this fits into a daily workflow, visit https://marketxls.com or book a working session at https://marketxls.com/book-demo. Drop the templates into your own ticker list and the workbook will repoint everything for you.

Important Disclaimer

The information provided in this article is for educational and informational purposes only and should not be construed as investment advice, a recommendation, or an offer to buy or sell any securities. MarketXLS is a financial data platform and is not a registered investment advisor, broker-dealer, or financial planner. Always conduct your own research and consult with a qualified financial professional before making any investment decisions. Past performance is not indicative of future results. Trading and investing involve substantial risk of loss.

Interested in building, analyzing and managing Portfolios in Excel?
Download our Free Portfolio Template
I agree to the MarketXLS Terms and Conditions
Call: 1-877-778-8358
Ankur Mohan MarketXLS
Welcome! I'm Ankur, the founder and CEO of MarketXLS. With more than ten years of experience, I have assisted over 2,500 customers in developing personalized investment research strategies and monitoring systems using Excel.

I invite you to book a demo with me or my team to save time, enhance your investment research, and streamline your workflows.
Implement "your own" investment strategies in Excel with thousands of MarketXLS functions and templates.
MarketXLS provides all the tools I need for in-depth stock analysis. It's user-friendly and constantly improving. A must-have for serious investors.

John D.

Financial Analyst

I have been using MarketXLS for the last 6+ years and they really enhanced the product every year and now in the journey of bringing in AI...

Kirubakaran K.

Investment Professional

MarketXLS is a powerful tool for financial modeling. It integrates seamlessly with Excel and provides real-time data.

David L.

Financial Analyst

I have used lots of stock and option information services. This is the only one which gives me what I need inside Excel.

Lloyd L.

Professional Trader

Meet The Ultimate Excel Solution for Investors

Live Streaming Prices in your Excel
All historical (intraday) data in your Excel
Real time option greeks and analytics in your Excel
Leading data service for Investment Managers, RIAs, Asset Managers
Easy to use with formulas and pre-made sheets