Stock Portfolio Calculator
Track your stocks in one place. Enter your buying price and market price manually, add as many stocks as you need, and calculate your portfolio profit or loss instantly.
Portfolio Allocation
Share of total invested amount by stock
Add stock details to view allocation.
Profit / Loss Overview
Current gain or loss for each stock
Add stock details to view profit or loss.
| Stock Name | Qty | Buying Price (₹) | Market Price (₹) | Investment (₹) | Current Value (₹) | Profit / Loss (₹) | Return % | Action |
|---|---|---|---|---|---|---|---|---|
| TOTAL | 0 | — | — | ₹0.00 | ₹0.00 | ₹0.00 | 0.00% | — |
This calculator is for tracking and educational purposes only. Values are based on the prices you enter and exclude brokerage, taxes, dividends, and other charges. It does not provide investment advice.
How to use the stock portfolio calculator
- Select Add New Stock and enter a stock name, such as IREDA or TATA.
- Enter the number of shares you own, your buying price per share, and the current market price per share.
- The calculator automatically updates investment, current value, profit or loss, and return percentage for that stock.
- Add more rows to track your portfolio. Save it in your browser or export the data as an Excel workbook or CSV file for a spreadsheet.
How is stock profit or loss calculated?
Total investment is the sum of quantity multiplied by buying price for every stock. Current market value is the sum of quantity multiplied by the market price you enter. Total profit or loss is current market value minus total investment. A positive result means a gain; a negative result means a loss.
Portfolio return percentage is calculated as total profit or loss divided by total investment, multiplied by 100. This is a weighted portfolio return, not an average of each stock's percentage. If total investment is zero, the percentage is shown as zero.
Worked example
Suppose you hold three stocks. Stock A: 50 shares bought at ₹200, now ₹230. Stock B: 20 shares bought at ₹500, now ₹450. Stock C: 100 shares bought at ₹50, now ₹60.
The investments are ₹10,000, ₹10,000 and ₹5,000, so the total investment is ₹25,000. The current values are ₹11,500, ₹9,000 and ₹6,000, giving ₹26,500. The profit or loss is +₹1,500 for A, −₹1,000 for B and +₹1,000 for C, so the portfolio gain is ₹1,500, a return of 1,500 ÷ 25,000 × 100 = 6.00%.
Reading the dashboard
The allocation chart shows each stock’s share of your total invested amount. In the example, A and B are 40% each and C is 20%. It uses the amount you invested, not the current market value, so it shows how your money was spread when you bought. The profit and loss chart shows the gain or loss of each stock, so you can see which holdings are helping or hurting the total.
Tips for accurate tracking
- If you bought the same stock several times at different prices, first work out the average buy price with the Stock Average Calculator, then enter that average with your total quantity.
- Update the market prices whenever you want a fresh view. The calculator never fetches prices by itself.
- After a split or bonus issue, enter the adjusted quantity and price so that the investment amount stays correct.
- Use the stock name field to keep rows easy to recognise, for example the company or ticker name.
- Export to Excel or CSV before you clear your browser data, because the saved copy lives only in this browser.
Can I add or remove stocks?
Yes. Add as many rows as you need, edit any field to recalculate the totals, or remove a row using its Delete button. You can also save a copy in this browser and export your current portfolio as an Excel workbook or CSV file. Browser-saved data stays on this device and browser unless you clear its storage.
Does this calculator show live stock prices?
No. This version uses manual market-price entry. It does not connect to a stock exchange or financial data provider. Enter the latest price yourself before relying on the displayed estimate.
Frequently asked questions
Is this stock portfolio calculator free?
Yes. You can add stocks, calculate portfolio values, save data in your browser, and export a CSV file without creating an account.
How do I calculate the profit percentage on a stock?
Subtract the buying price from the market price, divide the difference by the buying price, and multiply by 100. The portfolio total uses total profit or loss divided by total investment.
Are brokerage and taxes included?
No. The calculation compares the entered buying and market prices and does not deduct brokerage, taxes, fees, or other charges.
Will my portfolio sync across devices?
No. Save in This Browser stores the data locally in the current browser. Use Export CSV to keep a separate copy or transfer it to another device.
How is the portfolio return percentage calculated?
Total profit or loss divided by total investment, multiplied by 100. It is a weighted return for the whole portfolio, not the average of each stock’s percentage.
Where is my portfolio data stored?
If you select Save in This Browser, the data stays in your browser’s local storage on this device. Nothing is uploaded to PraxTools, and clearing your browser data removes it.
What does Export Excel create?
It downloads a workbook named praxtools-stock-portfolio.xlsx with a Portfolio sheet. If the spreadsheet library cannot load, use Export CSV, which opens in Excel and other spreadsheet apps.
Does it calculate capital gains tax or dividends?
No. It compares your buying and market prices only. Tax, dividends, brokerage and other charges are not included. Use your official statements and a tax professional for tax reporting.
Privacy and limits
Calculations run in your browser, and the figures you enter are not sent to a PraxTools server. The Excel export uses a spreadsheet library loaded from a content delivery network, so that feature needs an internet connection. This tool is for tracking and learning, uses prices that you type yourself, and does not provide investment advice. See the Privacy Policy.