Pull real historical stock prices directly into Excel — no API, no add-in, no manual downloading.
STOCKHISTORY retrieves historical price data for a stock, fund, or currency pair from Microsoft's data provider and spills it directly into your spreadsheet. One formula can return months of daily closing prices, ready for analysis or charting.
STOCKHISTORY(stock, start_date, [end_date], [interval], [headers], [property0, ...])| Argument | What it means |
|---|---|
| stock required | Ticker symbol as text, e.g. "AAPL", "MSFT", "BTC/USD". |
| start_date required | The first date to retrieve data for. |
| end_date optional | The last date. Defaults to today if omitted. |
| interval optional | 0 = daily (default), 1 = weekly, 2 = monthly. |
| headers optional | 0 = no headers, 1 = header row, 2 = instrument + header rows. |
| property0 optional | 0=Date, 1=Close, 2=Open, 3=High, 4=Low, 5=Volume. Default returns Date and Close. |
=STOCKHISTORY("AAPL", TODAY()-90, TODAY(), 0, 1)=STOCKHISTORY("MSFT", DATE(2026,1,1), DATE(2026,12,31), 2, 1, 0, 2, 3, 4, 1)Returns columns: Date, Open, High, Low, Close — with a header row.
=STOCKHISTORY("BTC/USD", DATE(2026,1,1))STOCKHISTORY pulls live data from Microsoft's servers. It requires an active Microsoft 365 subscription, an internet connection, and the Stocks data type enabled. It is not available in Excel 2021, 2019, or offline installations.
Once STOCKHISTORY spills price data into a column, you can reference those cells in AVERAGE, STDEV, or MAX/MIN formulas just like any other data — building a full price analysis without downloading a single CSV.
Type it in a live spreadsheet, get instant feedback. No videos, no downloads.
Start practising free →