ADVERTISEMENT

Mobile Banner
320×100

Stock Profit Calculator

Calculate your stock investment profit, loss, and percentage return including fees.

Stock Profit Formulas

Gross Profit
Loading formula...
Net Profit
Loading formula...
Return on Investment
Loading formula...

Understanding Stock Profits

Calculating your stock profit accurately is essential for understanding your investment performance and planning for taxes. Our stock profit calculator helps you determine your actual gains or losses after accounting for trading costs and fees.

Whether you're a day trader or long-term investor, knowing your true profit helps you make better decisions about when to sell and how to optimize your portfolio.

📈

Profit/Loss Calculation

See exactly how much you made or lost on a trade.

💰

Fee Accounting

Factor in commissions that reduce your actual profit.

📊

ROI Percentage

Understand your percentage return on the investment.

🎯

Break-Even Analysis

Know the minimum sell price to avoid losses.

How Stock Profits Work

Stock profit is the difference between what you sell your shares for and what you paid for them, minus any transaction costs. Understanding all the components helps you calculate your true return.

🛒

Cost Basis

Your total investment including the purchase price and any buy-side fees. This is what the IRS considers your investment cost for tax purposes.

💵

Gross Profit

The difference between sale price and purchase price times the number of shares. This is your profit before fees and taxes.

📋

Net Profit

Your actual profit after subtracting all commissions and fees. This is what you actually keep before taxes.

📉

Break-Even Price

The minimum price you need to sell at to recover your costs. Accounts for both buy and sell fees.

Capital Gains Taxes

Stock profits are subject to capital gains taxes. The rate depends on how long you held the investment and your income level.

Holding PeriodTax RateIncome LevelStrategy
< 1 year (Short-term) 10-37% Ordinary income rates Try to hold longer if possible
> 1 year (Long-term) 0% < $44,625 single Lowest income brackets
> 1 year (Long-term) 15% $44,625 - $492,300 Most taxpayers
> 1 year (Long-term) 20% > $492,300 single High earners
Net Investment Income +3.8% > $200K/$250K Additional surtax

Maximizing Your Stock Profits

Strategic decisions can significantly impact your after-tax returns. Here are key strategies for maximizing stock profits.

📅

Hold for Long-Term Rates

If you're close to the one-year mark, consider waiting to qualify for long-term capital gains rates. The tax difference between short-term (up to 37%) and long-term (0-20%) can be substantial.

💸

Minimize Trading Costs

Use commission-free brokers when possible. Even small fees add up with frequent trading. Consider the impact of bid-ask spreads on your profits.

📊

Tax-Loss Harvesting

Sell losing positions to offset gains from winners. Up to $3,000 in net losses can offset ordinary income annually, with excess carrying forward to future years.

🏦

Use Tax-Advantaged Accounts

Trading in IRAs or 401(k)s eliminates capital gains taxes entirely. Consider holding high-growth stocks in Roth accounts for tax-free gains.

📈

Track Your Cost Basis

Keep records of all purchases, reinvested dividends, and stock splits. Accurate cost basis ensures you don't pay tax on returns you didn't actually earn.

🎯

Set Profit Targets

Have a plan for when to sell before you buy. Emotional decisions often lead to selling winners too early or holding losers too long.

Common Profit Calculation Mistakes

Accurately calculating stock profits requires attention to details many investors overlook.

Forgetting Reinvested Dividends

If you reinvested dividends, those shares have a separate cost basis. Forgetting them means overpaying taxes by understating your cost basis.

🔄

Ignoring Stock Splits

After a stock split, your cost basis per share decreases but your total cost basis stays the same. Make sure to adjust per-share calculations.

💳

Missing Transaction Fees

Commission-free trading still has costs like bid-ask spreads and potential payment for order flow. Factor in all costs for accurate profit calculations.

📅

Wrong Tax Classification

The one-year holding period starts the day after you buy. Selling exactly 365 days later is still short-term. Wait one extra day to be safe.

🔍

Not Using Specific ID

If you bought shares at different prices, you can choose which shares to sell (specific identification). Selling highest-cost shares first minimizes taxes.

🌍

Forgetting Currency Gains

For international stocks, your profit includes both stock gains and currency gains/losses. Both are taxable events.

How to use this stock profit calculator

  1. Enter the Buy Price per Share ($) — your original cost per share, before any commissions.
  2. Enter the Sell Price per Share ($) — the price you sold at or are modeling a sale at.
  3. Type the Number of Shares you bought and sold; the calculator assumes the same lot in and out.
  4. Optional: add Buy Commission ($) and Sell Commission ($) to reflect broker fees, plus any bid-ask spread you absorbed.
  5. Optional: enter a Capital Gains Tax (%) — use 15 for the typical long-term federal rate, or your marginal rate for short-term trades.
  6. Click Calculate Profit to see gross profit, net profit after fees, ROI, estimated tax owed, after-tax profit, and your break-even price.

Examples

Basic: long-term winner at the 15% LTCG rate

You bought 100 shares of an index ETF at $50 in January 2023 and sold them in March 2025 at $75. You used a commission-free broker and fall into the 15% long-term capital gains bracket.

ResultGross profit $2,500. Net profit $2,500 (no fees). ROI 50%. Estimated tax owed $375. After-tax profit $2,125. Break-even price $50.00 per share.

Gross profit is (75 − 50) × 100 = $2,500. With no commissions, net profit equals gross profit. ROI is $2,500 ÷ $5,000 cost basis = 50%. Because the position was held more than one year and your taxable income falls in the middle bracket, the 15% long-term capital gains rate applies: 0.15 × $2,500 = $375 owed, leaving $2,125 after tax.

Intermediate: short-term trade taxed as ordinary income

You bought 200 shares of a momentum stock at $80 in February and sold them in August of the same year at $95. Each leg cost a $5 commission, and your marginal federal income tax rate is 24%.

ResultGross profit $3,000. Total fees $10. Net profit $2,990. ROI about 18.69%. Estimated tax $717.60. After-tax profit $2,272.40.

Gross profit is (95 − 80) × 200 = $3,000. Subtracting the $10 in commissions gives a $2,990 net profit. Because the holding period is under one year, the gain is short-term and taxed as ordinary income at your 24% marginal rate, not the long-term capital gains rate. Tax is 0.24 × $2,990 ≈ $717.60, leaving $2,272.40.

Edge case: tax-loss harvest with wash-sale risk

You bought 150 shares of a biotech stock at $40 and sold in December at $28 to harvest the loss against other gains. You then consider buying back the same ticker on January 5.

ResultGross loss -$1,800. Net loss -$1,800. ROI -30%. Tax owed $0. The loss can offset capital gains dollar-for-dollar and up to $3,000 of ordinary income, with the rest carrying forward.

Loss is (28 − 40) × 150 = -$1,800. The IRS wash-sale rule disallows the loss if you buy substantially identical shares within 30 days before or after the sale. Buying back on January 5 falls inside that window, so the $1,800 loss would be disallowed and added to the cost basis of the replacement shares instead. Wait until day 31 (or buy a different fund tracking a similar index) to keep the deduction.

How it works

The calculator starts with gross profit (PsellPbuy)×Shares(P_{sell} - P_{buy}) \times \text{Shares}. For 100 shares bought at $50 and sold at $75, that's $2,500 before any costs. This is the raw price change times your position size and ignores fees and taxes.

Net profit subtracts buy and sell commissions: Net=GrossBuy FeeSell Fee\text{Net} = \text{Gross} - \text{Buy Fee} - \text{Sell Fee}. Even on commission-free platforms, you still pay an implicit cost through the bid-ask spread, so enter a realistic per-trade cost if you trade thinly traded names.

Return on investment is net profit divided by total cost Net ProfitTotal Cost×100%\frac{\text{Net Profit}}{\text{Total Cost}} \times 100\%, where total cost is (Pbuy×Shares)+Buy Fee(P_{buy} \times \text{Shares}) + \text{Buy Fee}. ROI lets you compare returns across positions of different sizes — a $500 profit on $5,000 invested (10%) and a $500 profit on $50,000 invested (1%) are very different outcomes.

If you enter a Capital Gains Tax rate, the calculator applies it only to positive net profit, mirroring how the IRS treats losses (no tax on losses, but they can offset gains). After-tax profit is what actually lands in your pocket. The calculator also shows a break-even sell price — what you'd need to sell at to recover your cost basis plus fees — useful when deciding whether to hold or cut a position.

When to use this calculator

  • Planning a sale at year-end. Before December 31, model the after-tax outcome of selling a position now versus waiting until you cross the one-year mark for long-term treatment. The rate gap between short-term and long-term can change the decision.
  • Setting a target price. Compute the sell price needed to clear a specific dollar profit or ROI threshold after fees and tax. Saves you from setting a limit order that looks good gross but disappoints net.
  • Comparing brokers and fee structures. Run the same trade with two different commission and spread assumptions to see how much fees erode an active strategy. Frequent traders often underestimate the drag.
  • Tax-loss harvesting decisions. Quantify the harvestable loss on a position and confirm it's worth triggering. Remember to plan around the 30-day wash-sale window before you sell.
  • Reviewing a closed trade. After a sale settles, run the actual numbers to check your broker's 1099-B reconciliation and learn how much of your gross return survived fees and tax.

Common mistakes

  • MistakeUsing the wrong tax rate on a short-term trade.
    FixIf you held the position one year or less, the gain is taxed as ordinary income at your marginal rate (10–37%), not at the long-term 0/15/20% rates. Look up your federal bracket before entering a value in the Capital Gains Tax field.
  • MistakeCounting the day of purchase when measuring the one-year holding period.
    FixThe IRS holding period starts the day after you acquire the shares. To get long-term treatment, you must sell on or after the date one year and one day later. Selling on the exact one-year anniversary is still short-term.
  • MistakeTreating commission-free trading as cost-free.
    FixEven at $0 commission, you pay an implicit cost via the bid-ask spread and any payment-for-order-flow markup. For low-volume stocks, model 0.1%–1% of trade value as an effective fee.
  • MistakeBuying back a sold loser inside the 30-day wash-sale window.
    FixBuying the same or substantially identical security within 30 days before or after a loss sale disallows the loss. The disallowed amount is added to the basis of the replacement shares — defer realizing it. Wait 31 days or buy a different fund tracking a similar index.
  • MistakeIgnoring reinvested dividends when computing cost basis.
    FixEach dividend reinvestment creates a new lot with its own basis and acquisition date. If you only use your original purchase price, you'll overstate the gain and overpay tax. Pull the full lot history from your broker.
  • MistakeForgetting the 3.8% Net Investment Income Tax (NIIT).
    FixAbove $200,000 single or $250,000 married filing jointly modified AGI, capital gains face an additional 3.8% NIIT on top of the regular rate. Add it to the Capital Gains Tax field if it applies to you.

Frequently asked questions

What's the difference between short-term and long-term capital gains?

Holding period is measured day-by-day from the day after purchase to the day of sale. One year or less is short-term and taxed at your ordinary federal income tax rate (10–37%). More than one year is long-term and taxed at preferential rates of 0%, 15%, or 20% depending on your taxable income. The IRS describes this split in Topic 409.

Are stock trading commissions deductible?

Commissions are not separately deductible as expenses, but they adjust your cost basis and proceeds. The buy commission is added to your cost basis and the sell commission reduces your proceeds, which lowers your taxable gain. Most brokers report net proceeds and adjusted basis on Form 1099-B, so they're already baked in.

What is a wash sale and how do I avoid one?

A wash sale occurs when you sell a security at a loss and buy substantially identical securities within 30 days before or after the sale (a 61-day window total). The loss is disallowed for the current tax year and added to the basis of the replacement shares. To preserve the deduction, wait 31 days before repurchasing or buy a different security that isn't substantially identical.

How do I calculate my stock profit?

Net profit = (Sell Price − Buy Price) × Number of Shares − Total Commissions. For example, 100 shares bought at $50 and sold at $75 with $10 total fees: (75 − 50) × 100 − 10 = $2,490 net profit. If you apply a 15% long-term capital gains rate, after-tax profit is $2,490 × (1 − 0.15) ≈ $2,116.50.

How are dividends taxed differently from stock sale profits?

Dividends are reported on Form 1099-DIV, not on this calculator. Qualified dividends (paid by US corporations on shares held more than 60 days during the 121-day window around the ex-dividend date) are taxed at the long-term capital gains rates of 0/15/20%. Ordinary (non-qualified) dividends and most REIT distributions are taxed at your ordinary income rate.

Do I report stock sales on Schedule D?

Yes. Sales are first detailed on Form 8949, which categorizes each lot as short-term or long-term and reconciles broker-reported basis. Totals flow to Schedule D, where short-term and long-term gains and losses are netted. Net capital losses up to $3,000 ($1,500 if married filing separately) can offset ordinary income, with the rest carrying forward indefinitely.

Does the wash-sale rule apply to cryptocurrency?

Under current IRS guidance, the wash-sale rule in IRC §1091 applies to 'stock or securities,' and the IRS treats cryptocurrency as property rather than a security. That means crypto losses are not currently subject to the 30-day wash-sale restriction. Proposed legislation has repeatedly sought to extend it to digital assets, so check the current rules before tax-loss harvesting crypto positions.

What if I sold at a loss?

Losses offset gains dollar-for-dollar within their holding-period category first (short-term losses against short-term gains, long-term against long-term). Excess net losses can offset ordinary income up to $3,000 per year ($1,500 if married filing separately). Anything beyond that carries forward to future tax years until used up.

Why is my profit different from what the calculator shows?

Common reasons: you forgot reinvested dividends in your basis, the broker used a different basis method (e.g., average cost instead of specific identification), wash-sale adjustments shifted the loss to a later lot, or you owe an extra 3.8% Net Investment Income Tax that the calculator does not include. Always reconcile with your year-end 1099-B.

What is cost basis and why does it matter?

Cost basis is the total amount you've invested in a position: purchase price plus buy commissions, adjusted for splits, reinvested dividends, and any wash-sale disallowances. It's subtracted from sale proceeds to compute your taxable gain. Brokers must report basis to the IRS for shares bought after 2010 ('covered shares'), but you're responsible for older lots.

Sources

Methodology

The calculator computes gross profit as (sell price − buy price) × shares, subtracts buy and sell commissions to get net profit, divides net profit by total cost (buy price × shares + buy commission) for ROI, applies the user-supplied capital gains rate only to positive net profit to estimate tax owed, and solves for the break-even sell price that recovers cost basis plus both fees. The capital gains rate field is user-supplied — short-term holdings (≤1 year) should use the marginal ordinary income rate (10–37%), and long-term holdings (>1 year) use the preferential 0/15/20% rates. The 3.8% Net Investment Income Tax and state taxes are not modeled separately; include them by adding to the rate field if applicable.

Pro Tips

  • Bookmark this calculator for quick access in the future
  • Use the share button to send your results to others
  • Try different scenarios to compare outcomes
  • Check out our related calculators for more insights

Found this calculator helpful? Share it with others:

Embed this calculator