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.
Syntax
| Argument | Description | |
|---|---|---|
stock | Required | A ticker or linked Stocks data type, e.g. "MSFT". |
start_date | Required | First date to retrieve. |
end_date | Optional | Last date (defaults to start_date). |
interval | Optional | 0 daily (default), 1 weekly, 2 monthly. |
headers | Optional | 0 none, 1 show (default), 2 show with instrument. |
properties... | Optional | Which 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
Pick an input and watch the formula and result update.
Practice workbook
Frequently asked questions
Which versions have STOCKHISTORY?
How do I choose which columns?
Can I get weekly or monthly data?
Is the data real-time?
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