How to Use
- 1.
Choose a currency and enter the stock symbol, sell price, and at least one positive purchase lot.
- 2.
Add more purchase lots when shares were bought at different prices or quantities.
- 3.
Enter fixed buy and sell commissions, other trading charges, and an optional estimated tax rate.
- 4.
Add purchase and sale dates for holding-period context, plus optional stop-loss, target, and benchmark returns.
- 5.
Review investment, proceeds, weighted average price, break-even price, net profit or loss, and return percentage.
- 6.
Optionally add other portfolio positions, save locally, copy, share, export CSV, or print the result.
Features
Real-time stock profit and loss calculation
Multiple purchase lots
Weighted average buy price
Total investment and sale proceeds
Separate buy and sell commissions
Other market charges
User-entered estimated tax
Net profit or loss after costs
Return percentage
Green, red, and neutral result states
Break-even stock price
Stop-loss and target analysis
Risk-reward ratio
Holding-period context
Portfolio position comparison
Combined portfolio return
Benchmark return comparison
Currency selector
Visual investment and proceeds chart
Local browser history
Copy and browser share
Spreadsheet-compatible CSV export
Print or save as PDF
Input validation
Responsive mobile interface
Dark mode support
Frequently Asked Questions
How do I calculate stock profit or loss?+
Subtract cost basis and all entered selling costs from sale proceeds. Cost basis includes share purchase value plus entered buy fees. The calculator also subtracts an optional estimated tax from positive gain.
How is stock return percentage calculated?+
Net return percentage equals net profit or loss divided by total cost basis, multiplied by 100. A zero cost basis cannot produce a valid return percentage.
How are multiple stock purchase lots averaged?+
The tool uses a quantity-weighted average: total purchase value across lots divided by total shares. It does not use a simple average of the listed buy prices.
Are brokerage commissions included?+
Yes. Enter fixed buy and sell commissions separately. Add STT, stamp duty, regulatory fees, or other market charges in the other-charge fields.
How does the capital gains tax estimate work?+
The entered tax percentage is applied only to positive gain after entered trading charges. The tool does not determine the legally applicable rate or create a tax benefit for losses.
Does holding period automatically choose my tax rate?+
No. Dates provide short-term or long-term context only. Tax treatment varies by jurisdiction, account, lot, security, residency, and tax year.
How is the stock break-even price calculated?+
It divides cost basis plus entered fixed sell charges by total shares. This estimate excludes tax at break-even and may differ when a broker uses percentage or tiered fees.
What is the risk-reward ratio?+
Potential reward from average buy price to target is divided by potential risk from average buy price to stop. It is a planning ratio, not a forecast or guarantee.
Can I compare multiple stocks?+
Yes. Add other portfolio positions with invested and current values. The tool compares them and combines them with the current stock calculation.
Can I compare my return with a market benchmark?+
Yes. Enter a benchmark percentage for the same period. The result is a percentage-point comparison and is meaningful only when dates, currency, fees, dividends, and risk are aligned.
Does the calculator include dividends?+
Not automatically. Dividends, currency effects, stock splits, bonus shares, rights issues, and other corporate actions should be accounted for separately in your figures.
Where is saved calculation history stored?+
History is stored only in local browser storage on the current device. It is not uploaded or synchronized and can disappear when browser data is cleared.
Is this calculator investment or tax advice?+
No. It is an educational estimate. Verify fees, tax rules, execution prices, and official gain or loss with broker records and qualified professionals.
About this tool
Free Stock Profit/Loss Calculator
Use this Stock Profit/Loss Calculator to estimate the result of buying and selling shares after transaction costs. Enter one or more purchase lots, a selling price, buy and sell commissions, other market charges, and an optional estimated tax rate. The calculator shows total investment, gross proceeds, gross gain or loss, estimated tax, net profit or loss, and percentage return.
How the Stock Profit/Loss Calculator Works
The calculator builds a cost basis from every entered purchase lot. Cost basis includes share cost, buy-side commission, and other buy charges. It then subtracts sell-side commission, other sell charges, and user-entered estimated tax from sale proceeds. Net profit or loss equals net proceeds after those deductions minus total cost basis.
Buy Price, Sell Price, and Share Quantity
For a single purchase, enter buy price per share and quantity in the first lot. Add more lots when the same stock was purchased at different prices. Total shares are added together, while average buy price is weighted by quantity rather than taking a simple average of listed prices.
Multiple Stock Lots and Average Buy Price
Weighted average buy price equals total share purchase value divided by total shares. Transaction fees are included separately in cost basis, so the tool also displays an effective cost per share after buy charges. This distinction helps when a broker statement separates execution price from fees.
Brokerage Fees and Other Trading Charges
Buy commission, sell commission, STT, stamp duty, regulatory fees, exchange fees, and similar market-specific costs can reduce returns. The calculator accepts separate fixed amounts for buy commission, sell commission, and other charges on each side. The SEC's Investor.gov guidance notes that transaction fees and commissions reduce investment returns, even when an individual fee appears small.
Estimated Capital Gains Tax
Tax rules vary by country, account type, holding period, security, residency, loss treatment, and tax year. This calculator does not select a legal tax rate. Enter an estimated percentage only if appropriate; it is applied to a positive gain after entered trading charges and never creates a tax benefit for a loss. Confirm actual tax treatment with current official guidance or a qualified tax professional.
Short-Term and Long-Term Holding Period
Purchase and sale dates produce an approximate holding-period label. The tool marks more than 365 days as long-term context, but that label does not determine legal tax treatment in every jurisdiction. Multiple purchase lots can also have different acquisition dates, which may require lot-by-lot tax accounting.
Break-Even Stock Price
Break-even price estimates the per-share sale price needed to recover cost basis plus entered fixed sell charges before tax. Actual execution may differ because market prices move, orders may fill at different prices, and some brokers calculate percentage or tiered charges instead of fixed amounts.
Stop-Loss, Target Price, and Risk Reward
Enter optional stop-loss and target prices to compare downside from weighted average buy price with potential upside. Risk-reward is target reward divided by stop risk. It is a planning measurement, not a forecast, recommendation, or guarantee that either order will execute at the entered price.
Portfolio Profit and Loss Comparison
Add other stock positions using invested amount and current value to compare them side by side. The calculator combines those positions with the current stock result and displays total invested value, current or net value, and aggregate profit or loss. This lightweight comparison does not replace brokerage records or full portfolio accounting.
Return Compared with a Market Benchmark
Enter an optional benchmark return for the same measurement period. The tool subtracts benchmark return from the calculated stock return to show percentage-point outperformance or underperformance. Meaningful comparison requires matching dates, currency, dividends, fees, and risk.
Local History, Export, and Privacy
Saved calculations remain in local browser storage on the current device and are not synchronized. Copy a text summary, download a spreadsheet-compatible CSV, share through the browser when supported, or print and save the page as PDF. Clearing browser data removes local history.
Using the Result Responsibly
This calculator is an educational arithmetic tool and does not provide investment, legal, accounting, or tax advice. It does not include dividends, currency changes, corporate actions, bid-ask spreads, slippage, percentage-based fees, inflation, or every jurisdiction-specific charge unless you enter them. Verify important results against broker contract notes and official records before making financial or tax decisions.
To compare this investment with another project or asset, use the ROI Calculator. Include investment values in a broader financial snapshot with the Net Worth Calculator, or compare business selling prices with the Markup vs Margin Calculator.