Stock Profit Calculator Guide: How to Calculate Capital Gains, Taxes, and True Investment Returns
Stock Profit Calculator Guide: How to Calculate Your Real Profit After Taxes
You bought a stock at $50, sold it at $80, and think you made $30 per share. But after commissions, taxes, and fees, your actual profit might be closer to $20-$23. That's a 23-33% haircut on your gains.
Understanding your true, after-tax profit is essential for making smart investment decisions. Our Stock Profit Calculator does this math instantly — showing your gross profit, tax liability, net profit, and annualized return.
The Stock Profit Formula
Net Profit = (Sell Price × Shares) - (Buy Price × Shares) - Buy Commission
- Sell Commission - Capital Gains Tax
Annualized Return = ((Ending Value / Starting Value) ^ (365 / Days Held)) - 1
Quick Example
| Detail | Amount |
|---|---|
| Bought 100 shares at $50 | $5,000 |
| Sold 100 shares at $80 | $8,000 |
| Gross profit | $3,000 |
| Buy commission | $0 (most brokers are free now) |
| Sell commission | $0 |
| Capital gains tax (15%, held > 1 year) | -$450 |
| Net profit | $2,550 |
| After-tax return | 51% |
Capital Gains Tax Rates (2026)
The tax you owe depends on how long you held the investment:
Short-Term Capital Gains (Held Less Than 1 Year)
Taxed at your ordinary income tax rate:
| Taxable Income (Single) | Tax Rate | Tax on $10K Gain |
|---|---|---|
| $0 - $11,925 | 10% | $1,000 |
| $11,926 - $48,475 | 12% | $1,200 |
| $48,476 - $103,350 | 22% | $2,200 |
| $103,351 - $197,300 | 24% | $2,400 |
| $197,301 - $250,525 | 32% | $3,200 |
| $250,526 - $626,350 | 35% | $3,500 |
| Over $626,350 | 37% | $3,700 |
Long-Term Capital Gains (Held More Than 1 Year)
Preferential tax rates — much lower than ordinary income:
| Taxable Income (Single) | Tax Rate | Tax on $10K Gain |
|---|---|---|
| $0 - $47,025 | 0% | $0 |
| $47,026 - $518,900 | 15% | $1,500 |
| Over $518,900 | 20% | $2,000 |
The Tax Savings of Holding Over 1 Year
| Income Level | Short-Term Tax | Long-Term Tax | Savings |
|---|---|---|---|
| $60K income, $10K gain | $2,200 (22%) | $1,500 (15%) | $700 |
| $120K income, $10K gain | $2,400 (24%) | $1,500 (15%) | $900 |
| $200K income, $10K gain | $3,200 (32%) | $1,500 (15%) | $1,700 |
Holding for 366 days instead of 364 can save you thousands. This is the single easiest tax optimization for investors.
How to Use Our Stock Profit Calculator
Step 1: Enter Buy Details
- Buy price per share — What you paid
- Number of shares — How many you bought
- Buy commission — Fee to purchase (usually $0 at major brokers)
Step 2: Enter Sell Details
- Sell price per share — What you sold for (or current price for unrealized gains)
- Sell commission — Fee to sell (usually $0)
Step 3: Enter Tax Information
- Holding period — Short-term (< 1 year) or long-term (> 1 year)
- Tax bracket — Your current income tax bracket
- State tax rate — Some states tax capital gains additionally
Step 4: Review Results
The calculator shows:
- Gross profit/loss — Before taxes
- Capital gains tax owed — Federal and state
- Net profit — What you actually keep
- Total return percentage — Your real return
- Annualized return — Normalized for comparison
Net Investment Income Tax (NIIT): The Extra 3.8%
High earners pay an additional 3.8% tax on investment income:
| Filing Status | MAGI Threshold | Extra Tax |
|---|---|---|
| Single | Over $200,000 | 3.8% on investment income |
| Married Filing Jointly | Over $250,000 | 3.8% on investment income |
This means a high earner could pay up to 23.8% on long-term capital gains (20% + 3.8% NIIT).
State Capital Gains Taxes
Some states add their own capital gains tax:
| State | Capital Gains Tax Rate | Impact on $10K Gain |
|---|---|---|
| California | 13.3% (highest) | +$1,330 |
| New York | 8.82% | +$882 |
| New Jersey | 10.75% | +$1,075 |
| Texas | 0% | $0 |
| Florida | 0% | $0 |
| Nevada | 0% | $0 |
| Washington | 7% (over $250K) | +$700 |
If you live in California and earn $150K, a $10K long-term gain costs $2,830 total (15% federal + 13.3% state) — not just $1,500.
Strategies to Minimize Stock Taxes
1. Hold for More Than One Year
The most impactful strategy. The jump from short-term to long-term rates saves 7-22% on gains.
2. Use Tax-Advantaged Accounts
- Roth IRA: $0 tax on all gains forever
- Traditional IRA/401k: Tax-deferred until withdrawal
- HSA: Tax-free for medical, tax-deferred for everything else after 65
3. Tax-Loss Harvesting
Sell losing positions to offset gains:
| Gains | Losses | Net Taxable | Tax Saved (15% rate) |
|---|---|---|---|
| $10,000 | -$4,000 | $6,000 | $600 |
| $10,000 | -$10,000 | $0 | $1,500 |
| $10,000 | -$15,000 | -$3,000 (deduct from income) | $2,160+ |
Excess losses beyond gains can offset up to $3,000 of ordinary income annually, with unlimited carryforward.
4. Gift Appreciated Shares
Donate appreciated stocks to charity: avoid capital gains tax AND get a charitable deduction. Double benefit.
5. Step-Up in Basis at Death
Unrealized gains are eliminated at death through the step-up in basis provision. Your heirs receive the stock at current market value, erasing all accumulated gains.
Common Stock Profit Mistakes
1. Forgetting to Include All Costs
Include commissions, transfer fees, SEC fees, and any advisory fees. They reduce your actual profit.
2. Not Tracking Cost Basis
If you buy the same stock multiple times, your cost basis varies by lot. Use specific identification (SpecID) to choose which shares to sell — sell the highest-cost shares first to minimize gains.
3. Selling at 364 Days Instead of 366
Check your holding period before selling. Two extra days can save you thousands in taxes. Set a calendar reminder.
4. Ignoring the Wash Sale Rule
If you sell at a loss and buy the same (or substantially identical) stock within 30 days, the loss is disallowed for tax purposes.
5. Not Considering Opportunity Cost
Holding a losing stock "to avoid realizing the loss" has a cost too. That money could be invested in a better opportunity. Losses are real whether you sell or not.
Calculate Your Stock Profit
Use our Stock Profit Calculator to:
- Calculate exact profit after all costs and taxes
- Compare short-term vs long-term holding tax impact
- See your annualized return for accurate performance measurement
- Plan when to sell for maximum after-tax returns
Pair it with our Investment Return Calculator for portfolio-level analysis and our Compound Interest Calculator for long-term growth projections.
Disclaimer: This article is for educational purposes only and does not constitute financial or tax advice. Tax rates and brackets change annually. Capital gains tax treatment varies by situation. Consult a qualified tax professional for personalized guidance.