STOCKHISTORY Function

Excel Functions › Information

Excel 365 Information

The Excel STOCKHISTORY function pulls historical market prices for a stock, fund, or currency straight into a spilled array — dates and prices, no add-in, refreshed on demand.


Quick answer: daily closes for a month:
=STOCKHISTORY("MSFT", "1/1/2026", "1/31/2026") // spills date + close columns

Syntax

=STOCKHISTORY(stock, start_date, [end_date], [interval], [headers], [properties...])
ArgumentDescription
stockRequiredA ticker or linked Stocks data type, e.g. "MSFT".
start_dateRequiredFirst date to retrieve.
end_dateOptionalLast date (defaults to start_date).
intervalOptional0 daily (default), 1 weekly, 2 monthly.
headersOptional0 none, 1 show (default), 2 show with instrument.
properties...OptionalWhich columns: 0 Date, 1 Close, 2 Open, 3 High, 4 Low, 5 Volume.

How to use it

STOCKHISTORY returns a dynamic array that spills onto the sheet. It needs a Microsoft 365 subscription and an internet connection — it draws on the same data provider as the Stocks data type. Choose columns with the property arguments (0 Date, 1 Close, 2 Open, 3 High, 4 Low, 5 Volume).

Requires Microsoft 365 + internet. Not available in perpetual Excel (2019/2021) or offline. Data is for analysis, not guaranteed real-time.

Try it: interactive demo

Live demo

Pick an input and watch the formula and result update.

Result:

Practice workbook

📊
Download the free STOCKHISTORY practice workbook
Every example on this page, ready to open in Excel — plus practice challenges with answers on a separate tab. No sign-up required.

Frequently asked questions

Which versions have STOCKHISTORY?
Microsoft 365 only, with an internet connection. Not in Excel 2019/2021 or Excel for the web offline.
How do I choose which columns?
Add property numbers at the end: 0 Date, 1 Close, 2 Open, 3 High, 4 Low, 5 Volume.
Can I get weekly or monthly data?
Yes — set the interval argument to 1 (weekly) or 2 (monthly).
Is the data real-time?
No — it’s historical end-of-period data, delayed and meant for analysis.

Master functions like this in one day

This page covers one function. Our Excel Formulas and Functions class covers the 30 that matter most — live, hands-on, taught by professionals in Dallas–Fort Worth, Houston, Austin, Oklahoma City, Denver, or online.

See the Formulas & Functions Class

Related functions: ISERROR · ISNUMBER · ISBLANK · IFERROR · NA