Stock Profit Calculator
Calculate your net profit or loss from stock trades. Enter buy price, sell price, number of shares, commission fees, and capital gains tax rate to instantly see your total return, ROI, and break-even price.
Stock Profit Calculator
Calculate your stock trading profits including commissions and capital gains tax
Frequently Asked Questions
How do you calculate stock profit?
Stock Profit = (Sell Price × Shares Sold) − (Buy Price × Shares Sold) − Total Commissions. For example, buying 100 shares at $50 and selling at $60 with $10 commission each way gives you ($60 × 100) − ($50 × 100) − $20 = $980 net profit. Always include both buy-side and sell-side commissions for an accurate result.
What is the stock profit formula?
The core formula is Net Profit = Total Sale Proceeds - Total Investment Cost. In detail: Net Profit = (Sell Price x Shares - Sell Commission) - (Buy Price x Shares + Buy Commission). Subtract capital gains tax to get after-tax profit. It works for both full and partial share sales.
How do you calculate break-even share price?
Break-Even Price = (Total Investment + Sell Commission) / Shares Sold. For flat commissions, add both fees to the numerator. For percentage-based sell commissions, use Break-Even = Total Investment / (Shares x (1 - Sell Commission %)).
When should I sell my stock for profit?
Consider selling when your thesis has played out, the stock is expensive relative to fundamentals, you want to rebalance, or you have reached your target return. Decide your target profit before buying and stick to it.
Do I have to pay tax on stock profits?
Yes. In the US, stock profits are subject to capital gains tax. Short-term gains (held under 1 year) are taxed at ordinary income rates, while long-term gains (held over 1 year) are taxed at 0%, 15%, or 20% depending on income. High earners may also owe the 3.8% Net Investment Income Tax.
What is the difference between short-term and long-term capital gains?
Short-term gains apply to stocks held for one year or less and are taxed at ordinary income rates. Long-term gains apply to stocks held for more than one year and use preferential rates: 0%, 15%, or 20% depending on taxable income.
What is a good profit percentage for stocks?
The S&P 500 has historically returned about 10% per year before inflation, or about 7% after inflation. A stock returning 15-20% annually is generally considered strong. Any positive return that beats inflation and your cost of capital is a good result.
How do brokerage commissions affect stock profit?
Commissions reduce your net profit directly. Each round trip has both a buy commission and a sell commission, so even small fees can matter on frequent trades or small positions.
How do I calculate stock profit in Excel?
Use =(Sell_Price * Shares - Sell_Commission) - (Buy_Price * Shares + Buy_Commission). For ROI, use =Net_Profit / Total_Investment * 100. For break-even, use =(Total_Investment + Sell_Commission) / Shares.
How do I calculate profit on a short sale?
Short selling reverses the order: you sell first and buy to cover later. Profit = (Short Sale Price - Cover Price) x Shares - Commissions - Borrowing Fees. Losses can be unlimited because the stock price can keep rising.
What is ROI in stock investing?
ROI (Return on Investment) measures profit as a percentage of initial investment. The formula is ROI = (Net Profit / Total Investment) x 100. It is useful for comparing trades of different sizes.
How do dividends affect stock profit calculations?
Dividends add to total return but are not included in a simple buy/sell profit calculation. Total Return = Capital Gain + Dividends Received. Dividends are taxed separately from capital gains.
How to Calculate Stock Profit, Loss, and ROI
Stock profit is the money left after selling shares for more than you paid, after commissions and taxes. This guide covers the formulas, tax treatment, and practical tradeoffs behind the calculator.
Table of Contents
Stock Profit Formula
Every trade starts with what you paid, what you received, and what you lost to fees and taxes.
Gross Profit
This ignores commissions and taxes.
Net Profit (Before Tax)
Total Investment = Buy Price \times Shares + Buy Commission, and Total Sale = Sell Price \times Shares - Sell Commission.
After-Tax Profit
Tax only applies when net profit is positive.
Worked Example
- Buy 200 shares at $50 (Total cost: $10,000)
- Buy commission: $9.99 flat
- Sell all 200 shares at $65 (Gross proceeds: $13,000)
- Sell commission: $9.99 flat
- Total Investment: $10,000 + $9.99 = $10,009.99
- Total Sale: $13,000 - $9.99 = $12,990.01
- Net Profit: $12,990.01 - $10,009.99 = $2,980.02
- At 15% tax: $2,980.02 \times 0.15 = $447.00 tax, leaving $2,533.02 after tax
Calculating Profit on Partial Sales
You do not always sell all your shares at once. When you sell part of a position, the calculator allocates buy-side costs proportionally.
Percentage-based commissions are allocated automatically because they are already tied to the sold shares. Flat fees are charged once per trade.
How Brokerage Commissions Affect Your Profit
Commissions are transaction fees charged by your broker on each trade.
| Type | How It Works | Example |
|---|---|---|
| Percentage | A percentage of the trade value | 0.1% on a $10,000 trade = $10 |
| Flat fee | Fixed dollar amount per trade | $4.95 per trade regardless of size |
| Zero commission | No fee | $0 per stock trade at Fidelity, Schwab, etc. |
Percentage Commission Formula
Total Trade Cost
Even with zero-commission brokers, other costs like SEC fees, TAF fees, and bid-ask spreads still exist.
Understanding Capital Gains Tax on Stocks
When you sell stock at a profit in the United States, the IRS taxes the gain. The rate depends on how long you held the stock before selling.
Short-Term Capital Gains (Held 1 Year or Less)
Short-term gains are taxed as ordinary income. For the 2026 tax year, the federal rates are:
| Tax Rate | Single Filer Income | Married Filing Jointly |
|---|---|---|
| 10% | Up to $11,925 | Up to $23,850 |
| 12% | $11,926 - $48,475 | $23,851 - $96,950 |
| 22% | $48,476 - $103,350 | $96,951 - $206,700 |
| 24% | $103,351 - $197,300 | $206,701 - $394,600 |
| 32% | $197,301 - $250,525 | $394,601 - $501,050 |
| 35% | $250,526 - $626,350 | $501,051 - $751,600 |
| 37% | Over $626,350 | Over $751,600 |
Long-Term Capital Gains (Held More Than 1 Year)
Long-term gains are taxed at reduced rates for 2026:
| Tax Rate | Single Filer Income | Married Filing Jointly |
|---|---|---|
| 0% | Up to $48,350 | Up to $96,700 |
| 15% | $48,351 - $533,400 | $96,701 - $600,050 |
| 20% | Over $533,400 | Over $600,050 |
Net Investment Income Tax (NIIT): An additional 3.8% tax applies to net investment income for single filers earning over $200,000 or married couples earning over $250,000.
Calculating Return on Investment (ROI)
ROI tells you how efficiently your capital was used, expressed as a percentage.
ROI Formula (Before Tax)
ROI Formula (After Tax)
Annualized ROI
Use annualized ROI to compare investments held for different time periods.
How to Find Your Break-Even Price
The break-even price is the minimum sell price at which you recover your entire investment, including commissions.
Break-Even with Flat Sell Commission
Break-Even with Percentage Sell Commission
Example
You buy 100 shares at $50 with a $10 flat buy commission. Total Investment = $5,010. If the sell commission is also $10 flat, break-even is ($5,010 + $10) / 100 = $50.20.
When Should You Sell Your Stocks?
There is no single answer, but a structured decision framework helps remove emotion from the process.
Reasons to Consider Selling
- Target reached: the stock has hit your price or ROI target
- Thesis broken: the reason you bought no longer applies
- Rebalancing: a single position has grown too large
- Tax-loss harvesting: selling a loser can offset gains
- Better opportunity: capital is needed elsewhere
Common Mistakes to Avoid
- Panic selling during a broad market correction
- Holding indefinitely without reviewing your thesis
- Ignoring tax implications
- Selling winners too early while holding losers too long
Stock Return Benchmarks: What Is a Good Return?
Understanding historical returns helps you set realistic expectations and evaluate your performance.
| Benchmark | Avg. Annual Return | Notes |
|---|---|---|
| S&P 500 (nominal) | ~10% | Long-term average since 1926 |
| S&P 500 (real, after inflation) | ~7% | Adjusted for roughly 3% average inflation |
| US bonds (aggregate) | ~5% | Bloomberg US Aggregate Bond Index |
| Savings account | ~4-5% | High-yield savings, 2024-2026 |
| Inflation (US CPI) | ~3% | Long-term historical average |
A stock returning 15-20% annually is considered strong. Use our Compound Interest Calculator to project future growth.