Stock Profit Calculator

Calculate your net profit or loss on stock trades after commissions and taxes. See your real return on investment.

Your data stays in your browser. Nothing is stored or sent to any server.
Built by Abiot Y. Derbie, PhD — Postdoctoral Research Fellow. Quantitative researcher specializing in statistical modeling and data-driven decision systems.
Mathematical models independently verified by Eskezeia Y. Dessie, PhD (Indiana University School of Medicine) and Armin Allahverdy, PhD (LinkedIn) — Data Scientist, Machine Learning & Data Mining.

Enter Your Details

0
helpful
Create a free account to save and compare your results across devices.

This calculator is for informational and educational purposes only. Results are estimates based on the information you provide and standard financial formulas. This is not financial advice. Consult a qualified financial advisor for decisions specific to your situation. Full Disclaimer

Things to Know

Essential concepts for understanding your results

Calculation
How do you calculate stock profit?

Profit = (Selling Price − Purchase Price) × Shares − Fees. Bought 100 shares at $45 ($4,500), sold at $62 ($6,200): gross profit = $1,700. Subtract commission ($0-10 at most brokers): net profit ≈ $1,700. Percentage return: $1,700 ÷ $4,500 × 100 = 37.8%. Annualized return: if held 18 months, annualized = (1.378)^(12/18) − 1 = 24.5%. Always calculate annualized return to compare investments held for different periods.

Tax Impact
How much of your stock profit goes to taxes?

Short-term (held under 1 year): taxed as ordinary income at 10-37%. Long-term (held over 1 year): taxed at 0%, 15%, or 20% depending on income. On $5,000 profit in the 22% bracket: short-term tax = $1,100, long-term tax = $750. Saving: $350 by waiting one year. The Net Investment Income Tax adds 3.8% for high earners (MAGI above $200K single). Always consider after-tax return when evaluating investment performance.

Dividend Inclusion
Should you include dividends in profit calculations?

Yes — total return = price appreciation + dividends. A stock bought at $50, now at $55 with $3 in dividends received: total return = ($55 − $50 + $3) ÷ $50 = 16%, not just 10% from price alone. Dividends reinvested through DRIP compound returns further. The S&P 500's historical 10% average includes approximately 1.5-2% from dividends — excluding them understates returns by 15-20%. Always use total return when comparing to benchmarks.

Common Mistakes
What mistakes reduce stock profits?

Selling winners too early: locking in a 20% gain when the stock eventually goes up 200%. Holding losers too long: hoping for recovery instead of harvesting the tax loss. Trading too frequently: each trade incurs fees and taxes — active traders underperform buy-and-hold by 1.5-4% annually. Ignoring fees: a 1% advisory fee on $500,000 costs $5,000/year. Checking too often: daily monitoring increases emotional trading. The best stock profit strategy: buy quality investments, hold for years, and ignore the noise.

Calculating Your Stock Investment Profit

True stock profit is more than just the price difference between buying and selling. A complete profit calculation accounts for purchase price, sale price, dividends received, trading commissions, and taxes. Missing any of these produces an inaccurate picture of your actual returns.

The basic formula: Profit = (Sale Price × Shares) - (Purchase Price × Shares) + Dividends Received - Commissions - Taxes. Example: You bought 100 shares at $50 ($5,000), received $200 in dividends, and sold at $65 ($6,500). Gross profit: $1,500 price gain + $200 dividends = $1,700. After $0 commissions (most brokers are commission-free now) and $255 in capital gains tax (15% long-term on $1,700): net profit = $1,445.

This calculator handles all these components automatically — enter your buy price, sell price, shares, dividends, and holding period, and see your true after-tax profit and annualized return.

Short-Term vs Long-Term Capital Gains

The tax treatment of stock gains depends entirely on your holding period — the time between buying and selling:

Short-term gains (held under 1 year): Taxed at your ordinary income tax rate — 10-37% depending on your bracket. A $5,000 short-term gain in the 24% bracket costs $1,200 in federal tax. This is the same rate as your salary, with no preferential treatment.

Long-term gains (held over 1 year): Taxed at reduced capital gains rates — 0% if taxable income is below $47,025 (single) / $94,050 (MFJ), 15% up to $518,900 / $583,750, and 20% above that. The same $5,000 gain at 15% costs only $750 — a $450 savings compared to the 24% short-term rate.

The one-year threshold is one of the most important dates in investing. If you are sitting on gains in a stock you plan to sell, waiting just a few extra days or weeks to cross the one-year mark can save hundreds or thousands in taxes. On a $20,000 gain: short-term at 24% = $4,800 tax. Long-term at 15% = $3,000. Waiting saves $1,800.

0% long-term capital gains rate: Often overlooked — if your total taxable income (including gains) falls below $47,025 single / $94,050 married, you pay zero federal tax on long-term gains. This is incredibly valuable for retirees with modest income, students with investment accounts, or anyone in a low-income year. You can harvest gains completely tax-free up to this threshold.

Tax-Loss Harvesting: Turning Losses into Tax Savings

Investment losses are not just bad news — they can offset gains and reduce your tax bill. This strategy, called tax-loss harvesting, is one of the most effective tax-management tools available to investors.

The rules: capital losses first offset capital gains of the same type (short-term losses offset short-term gains, long-term offset long-term). Remaining losses offset the other type. After all gains are offset, up to $3,000/year in net losses can offset ordinary income. Losses beyond $3,000 carry forward to future years indefinitely.

Example: You have $8,000 in long-term gains and $12,000 in long-term losses from different stocks. Net loss: $4,000. $3,000 offsets ordinary income (saving $660-$1,110 depending on bracket), and $1,000 carries forward to next year. Meanwhile, you reinvest the loss proceeds in a similar (but not "substantially identical") investment to maintain your market exposure.

The wash sale rule: If you sell a stock at a loss and repurchase the same or "substantially identical" security within 30 days (before or after the sale), the loss is disallowed. To harvest losses legally, either wait 31 days before repurchasing, or buy a different but similar investment (e.g., sell one S&P 500 ETF and buy a different S&P 500 ETF from another provider — the IRS considers these different securities).

Measuring Real Investment Performance

Raw profit does not tell the full story. Two investments that both profit $10,000 are not equivalent if one took 2 years and the other took 10 years. Use these metrics for meaningful comparison:

Total Return: (Ending Value - Beginning Value + Dividends) ÷ Beginning Value × 100. Includes all sources of return (appreciation + income) as a single percentage. A $10,000 investment returning $15,000 with $500 in dividends: ($15,500 - $10,000) ÷ $10,000 = 55% total return.

Annualized Return (CAGR): The annual rate that would compound to your total return. [(1 + Total Return)^(1/years) - 1] × 100. That 55% return over 5 years: [(1.55)^(1/5) - 1] = 9.2% annualized. This is the standard metric for comparing investments held for different time periods.

Comparison benchmark: The S&P 500 has returned approximately 10% annualized before inflation over the long term. If your stock portfolio returns less than a simple index fund, the individual stock picking is not adding value — and you would be better off in a total market index fund with zero effort.

Frequently Asked Questions

How do I calculate my profit on a stock?
Profit = (Sale Price - Purchase Price) × Shares + Dividends Received - Taxes. For after-tax profit, subtract 15% long-term capital gains tax (if held over 1 year) or your income tax rate (if held under 1 year). Enter your exact numbers above for a precise calculation including tax impact and annualized return.
How are stock gains taxed?
Short-term gains (held under 1 year): taxed at your ordinary income rate (10-37%). Long-term gains (held over 1 year): taxed at 0%, 15%, or 20% depending on income. The 0% rate applies to taxable income below $47,025 single / $94,050 married. Always try to hold investments for at least 1 year to qualify for the lower long-term rate.
What is tax-loss harvesting?
Selling investments at a loss to offset capital gains and reduce your tax bill. Losses first offset gains (dollar for dollar), then up to $3,000/year in excess losses offset ordinary income. Remaining losses carry forward indefinitely. You must avoid the wash sale rule — do not repurchase the same or substantially identical security within 30 days of the loss sale.
Should I sell my stock for a profit?
Selling decisions should be based on your investment thesis, not just the profit amount. Ask: has the reason I bought this stock changed? Do I need the money for a financial goal? Is the stock significantly overvalued? Am I rebalancing my portfolio? Selling purely because a stock is "up" is not a strategy — many of the best long-term returns come from holding winners for decades.
What is a good annual return on stocks?
The S&P 500 has returned approximately 10% annualized over the long term (7% after inflation). Consistently beating this benchmark with individual stock picking is extremely difficult — most professional fund managers fail to do it over 15+ year periods. If your portfolio underperforms the index, consider switching to a low-cost total market index fund.
Powered by FinCalcs — Free Financial Calculators