How to Track Stock Sales in an Excel Investment Tracker
Question details
The user wants to create a comprehensive investment tracker in Excel to record and calculate stock sales, returns, and fees.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Creating a personal finance or investment tracking spreadsheet to monitor stock portfolio performance after selling shares.
- Observed behavior
- Needs to set up proper columns, utilize data types for live stock tracking, and apply formulas to calculate net returns accurately.
Gather all your transaction records, including purchase prices, sale dates, share quantities, and any brokerage fees, before setting up your spreadsheet.
Creating an Investment Tracker for Stock Sales
Set up a structured worksheet with essential columns and use formulas to calculate your net return from stock sales.
A well-organized investment tracker allows you to accurately monitor the performance of your sold assets. By utilizing Excel's built-in formulas and data types, you can automate much of the calculation process and maintain a clear overview of your financial gains or losses.
Open a blank worksheet and create headers for your data in the top row. Recommended columns include Stock Symbol, Shares Sold, Purchase Price, Sale Price, Sale Date, Fees, and Net Return.
Select the cells containing your stock ticker symbols. Navigate to the 'Data' tab on the ribbon and click on 'Stocks' in the Data Types group. This will convert the text into linked data types, allowing you to extract company information and historical prices if needed.
Fill in the rows with the corresponding data for each stock sale, including the exact number of shares sold, the price you bought them for, the price you sold them for, and any commissions or fees charged by your broker.
In the 'Net Return' column, enter a formula to calculate your profit or loss. Assuming Sale Price is in D2, Purchase Price is in C2, Shares is in B2, and Fees is in F2, type =((D2-C2)*B2)-F2 and press Enter. Drag the fill handle down to apply this formula to other rows.

Track Your Stock Portfolio with WPS Spreadsheet
Easily build customized investment trackers, calculate returns, and manage your financial data using WPS Spreadsheet's powerful formulas and formatting tools.
- 1. Create a new tracker: Open WPS Spreadsheet and select a blank workbook to start building your investment tracker.
- 2. Input headers and data: Set up columns for Stock Symbol, Shares, Purchase Price, Sale Price, and Fees, then input your transaction details.
- 3. Apply financial formulas: Use standard formulas like =((Sale Price - Purchase Price) * Shares) - Fees to instantly calculate your net returns.
- 4. Save and analyze: Save your document in .xlsx format for full compatibility and use WPS charts to visualize your portfolio's performance.

Frequently Asked Questions
How do I calculate the percentage return on my stock sale?
To calculate the percentage return, divide your net profit (Sale Price minus Purchase Price) by the Purchase Price. In Excel, the formula is =(Sale Price - Purchase Price) / Purchase Price. Once calculated, select the cell and apply the Percentage format from the Home tab.
Can I link live stock prices in my Excel tracker?
Yes. If you have Microsoft 365, you can highlight your ticker symbols, go to the Data tab, and select 'Stocks'. This converts your text into a linked data type, enabling you to add columns that automatically pull live market prices and other company metrics.
How do I account for multiple stock purchases at different prices?
If you bought shares of the same stock at different times and prices, you should calculate your 'cost basis' or average purchase price. Divide the total amount spent on all those shares by the total number of shares purchased, and enter that average into your Purchase Price column.




