Stock Profit Calculator

Stock Profit Calculator

Calculate your stock profit or loss after fees and capital gains tax. Enter your shares, buy and sell prices, commissions, and any dividends received to see your total return on investment, net gain after tax, break-even price, and a scenario table across different sell prices.

Stock Profit Calculator

Net gain, ROI, break-even price, and after-tax profit in one calculation

Trade Details
Tax Estimate (optional)

Enter your trade details to see profit, ROI, tax estimate, and scenario table.

Stock Profit Calculator - Content

How a Stock Profit Calculator Works

A stock profit calculator takes four core inputs (shares, buy price, sell price, and commissions) and computes your true gain or loss after all costs. The number you care about isn't the difference between the two share prices. It's the difference between what you actually paid to acquire the position and what you actually received after selling it, then reduced further by any capital gains tax owed on the profit.

Most brokers now show a rough P&L in your account, but they calculate before tax and often before fees. A standalone calculator gives you the full picture: gross profit, return on investment (ROI), estimated tax owed, net profit after tax, and a break-even sell price that accounts for all round-trip costs.

📊
The core formula: Net profit = (Sell Price × Shares) - (Buy Price × Shares) - Buy Commission - Sell Commission - Tax Owed. Total return % = Gross Profit / Cost Basis × 100. Break-even price = (Cost Basis + Sell Commission) / Shares. Enter your actual numbers in the calculator above to see all three instantly.

How to Calculate Stock Returns

Step 1: Calculate Your Cost Basis

Your cost basis is the total amount you paid to acquire the position, including commissions. For a straightforward purchase:

Cost Basis = Shares × Buy Price + Buy Commission

Example: 100 shares at $45.00 with a $4.95 commission = $4,504.95 cost basis.

Step 2: Calculate Your Net Proceeds

Net Proceeds = Shares × Sell Price - Sell Commission

Example: 100 shares sold at $62.50 with a $4.95 commission = $6,245.05 net proceeds.

Step 3: Calculate Gross Profit and ROI

Gross Profit = Net Proceeds - Cost Basis

ROI = (Gross Profit / Cost Basis) × 100

From the example above: $6,245.05 - $4,504.95 = $1,740.10 gross profit. ROI = $1,740.10 / $4,504.95 × 100 = 38.6%.

Step 4: Calculate After-Tax Net Profit

Tax Owed = Gross Profit × Capital Gains Tax Rate

Net Profit = Gross Profit - Tax Owed

At a 15% long-term capital gains rate: Tax = $1,740.10 × 0.15 = $261.02. Net profit = $1,740.10 - $261.02 = $1,479.08.

Capital Gains Tax on Stock Sales: 2026 Rates

The tax on a stock sale depends on two things: how long you held the shares, and your total taxable income for the year. Holding for more than one year makes the gain long-term and qualifies it for lower preferential rates. Selling within one year produces a short-term gain taxed at your ordinary income rate.

Long-Term Capital Gains Rates (2026)

For assets held more than one year (IRS Rev. Proc. 2025-32, confirmed via OBBBA permanent provisions):

RateSingle Filers (Taxable Income)Married Filing Jointly
0%Up to $49,450Up to $98,900
15%$49,451 to $533,400$98,901 to $600,050
20%Over $533,400Over $600,050
+3.8% NIITMAGI over $200,000MAGI over $250,000

* Effective top federal rate on long-term capital gains: 23.8% (20% + 3.8% NIIT). State taxes are additional. Sources: IRS Rev. Proc. 2025-32; Kiplinger; NerdWallet.

Short-Term Capital Gains Rates (2026)

For assets held one year or less, the gain is taxed as ordinary income at your marginal federal rate: 10%, 12%, 22%, 24%, 32%, 35%, or 37%. At the top bracket, short-term gains carry a combined federal rate of 37% plus the 3.8% NIIT surcharge = 40.8%. Long-term status, earned by holding just one additional day past the one-year mark, can reduce that rate to 23.8% on the same profit, a difference worth thousands of dollars on a large position.

⚠️
Holding period mechanics matter. The IRS counts the holding period from the day after the purchase date through the sale date. One year means more than one year. Holding for exactly 366 days qualifies. Wash-sale rule: if you sell at a loss and repurchase the same or substantially identical security within 30 days before or after the sale, the IRS disallows the loss. This resets your cost basis but delays the tax benefit.

What the Stock Profit Calculator Shows You

Cost Basis

Your total acquisition cost including all buy-side commissions. This is the number the IRS uses to determine your taxable gain. For positions with multiple purchases at different prices (not covered by this calculator), your cost basis is the sum of all lots purchased.

Return on Investment (ROI)

Gross profit expressed as a percentage of your cost basis. A 38.6% ROI means you made $38.60 for every $100 invested. ROI ignores time entirely. A 38.6% return in 8 months is dramatically better than the same return over 8 years. For time-adjusted comparisons, use the annualized return (CAGR) formula instead.

CAGR = ((Ending Value / Beginning Value) ^ (1 / Years)) - 1

A 38.6% gross return held for 8 months (0.667 years) is an annualized return of approximately 64%. The same return over 3 years annualizes to about 11.5%.

Break-Even Sell Price

The minimum sell price at which you recover your full cost basis plus sell-side commission, with zero profit. Sell above this price and the trade is profitable; sell below it and you take a loss. At break-even, capital gains tax has nothing to apply to. No profit means no taxable gain.

Scenario Table

The calculator shows your gross profit and ROI at nine different sell prices centered on your entered sell price, ranging from 30% below to 30% above. Use this to evaluate risk/reward before entering a trade or to plan partial profit-taking at different target prices.

Total Return vs. Price Return: Include Your Dividends

A stock's total return combines two components: price appreciation (the gain from the sell price exceeding the buy price) and dividend income received while holding. Ignoring dividends understates your actual performance, especially for long-term positions in dividend-paying stocks.

Example: You hold 200 shares of a stock for 3 years. The price rises from $40 to $50 (25% price return), and the stock paid $4.50 per share in total dividends during that period. Your total return on 200 shares is ($10 price gain × 200) + ($4.50 dividends × 200) = $2,000 + $900 = $2,900 total profit. Without the dividend, you'd calculate only $2,000. Enter total dividends received in the Dividends field in the calculator above to include this in your results.

💡
Qualified dividends vs. ordinary dividends. Dividends from US corporations held for more than 60 days in the qualifying window are taxed at the same preferential long-term capital gains rates (0%, 15%, or 20%) in 2026. Ordinary dividends (from REITs, short-held positions, money market funds) are taxed as regular income at your marginal rate. Set the rate input accordingly for your situation.

Commissions, Fees, and Your True Return

Most US retail brokers eliminated stock trading commissions in 2019 to 2020. Fidelity, Schwab, Vanguard, E*TRADE, Robinhood, and most others now charge $0 for online stock trades. If your broker charges commissions, enter them in the calculator. They directly reduce gross profit and increase the break-even price. Even small fees matter on short-term trades with thin margins.

Fees you may still encounter:

  • SEC fee: Currently $8.00 per $1,000,000 in proceeds (effectively tiny on retail trades, approximately $0.001 per $100 of stock sold).
  • Options commissions: Most brokers still charge per-contract fees for options, typically $0.50 to $0.65 per contract.
  • Regulatory fees: FINRA TAF of $0.000166 per share sold (max $8.30 per trade), negligible for most retail positions.
  • Wire transfer and account transfer fees: Some brokers charge $25 to $75 for outgoing ACAT transfers. Relevant if you're moving a position between brokers.

Frequently Asked Questions

How do I calculate stock profit?
Stock profit = (Sell Price × Shares) - (Buy Price × Shares) - Buy Commission - Sell Commission. Your cost basis is the total you paid including buying commission. Net proceeds is the total received minus the selling commission. Gross profit is net proceeds minus cost basis. For net profit after tax, subtract estimated capital gains tax from gross profit. The calculator above handles all four steps automatically. Enter your shares, prices, and fees to see the full result.
What is ROI on a stock investment?
ROI (return on investment) is your gross profit expressed as a percentage of your cost basis. Formula: ROI = (Gross Profit / Cost Basis) × 100. If you invested $5,000 and grossed $6,500, your ROI is ($1,500 / $5,000) × 100 = 30%. ROI does not factor in time. A 30% return in 6 months is far better than 30% over 5 years. To compare positions held for different lengths of time, convert ROI to CAGR (compound annual growth rate).
What is the stock capital gains tax rate in 2026?
For stocks held more than one year (long-term), the federal capital gains rate is 0%, 15%, or 20% depending on your taxable income. For 2026: the 0% rate applies to single filers with taxable income up to $49,450 (up to $98,900 for married filing jointly). The 15% rate covers most middle-income earners. The 20% rate kicks in at $533,400 (single) or $600,050 (joint). High earners may also owe an additional 3.8% NIIT, pushing the effective top rate to 23.8%. For stocks held one year or less (short-term), gains are taxed as ordinary income from 10% to 37%. State taxes are additional.
What is the break-even sell price on a stock?
The break-even price is the minimum sell price at which you recover your full investment and all round-trip fees with zero profit. Formula: Break-Even Price = (Cost Basis + Sell Commission) / Shares. If you paid $5,004.95 for 100 shares ($50 + $4.95 commission) and your broker charges $4.95 to sell, your break-even is ($5,004.95 + $4.95) / 100 = $50.10/share. You need to sell above $50.10 to be profitable. At break-even, no capital gains tax applies because no gain exists.
Should I include dividends in my stock profit calculation?
Yes, for an accurate total return calculation. Dividends are a real component of investment performance and can represent a significant portion of long-term returns, especially for income-focused stocks and ETFs. Total return = Capital Gain + Dividends Received. For example, a stock that rises 15% in price but pays a 4% annual dividend yield over 3 years produced a 15% price return but a roughly 27% total return (15% + 12% in cumulative dividends). The calculator includes a dividends field for exactly this reason.
What is a stock gain calculator used for?
A stock gain calculator computes the actual profit or loss from a stock trade by accounting for the number of shares, buy and sell prices, commissions, dividends, and capital gains tax. It gives you figures your brokerage account often does not: after-tax net profit, total return percentage including dividends, break-even sell price, and estimated tax owed. Investors use it for trade planning (evaluating risk/reward before entering), performance tracking (comparing returns across positions on an apples-to-apples basis), and tax planning (understanding the impact of short-term vs. long-term holding periods on the tax bill).
How does the wash-sale rule affect stock losses?
The wash-sale rule disallows a capital loss deduction if you buy the same or substantially identical security within 30 days before or after the sale. For example, if you sell 100 shares of Apple at a $500 loss on December 10 to harvest the tax benefit, then rebuy Apple shares on December 20, the IRS disallows the $500 loss for that year. The disallowed loss is added to the cost basis of the new shares, deferring the benefit rather than eliminating it permanently. To harvest the loss cleanly, wait 31 days before rebuying, or replace the position with a similar but not substantially identical security (for example, replace a S&P 500 ETF with a total market ETF).
What is CAGR and how do I calculate it for a stock?
CAGR (Compound Annual Growth Rate) is the annualized rate of return that accounts for the holding period, making it the correct way to compare investments held for different lengths of time. Formula: CAGR = ((Ending Value / Beginning Value) ^ (1 / Years)) - 1. If you invested $5,000 and it grew to $7,200 over 2.5 years: CAGR = ($7,200 / $5,000) ^ (1 / 2.5) - 1 = 1.44 ^ 0.40 - 1 = approximately 16.3% annualized. A simple 44% total ROI over 2.5 years sounds impressive but resolves to about 16.3% per year, which helps you compare it fairly against other investments with different holding periods.
2026 Long-Term Capital Gains Rates
IRS Rev. Proc. 2025-32 0% (single) Taxable income up to $49,450 0% (joint) Taxable income up to $98,900 15% Most middle-income earners 20% Single over $533,400 / Joint over $600,050 NIIT surcharge +3.8% above $200K/$250K MAGI Effective top rate 23.8% (20% + NIIT)
Short-Term vs Long-Term
Holding period rule: >1 year for long-term Short-term ≤365 days · taxed as ordinary income (10–37%) Long-term >365 days · taxed at 0/15/20% $10,000 gain at 22% short = $2,200 tax $10,000 gain at 15% long = $1,500 tax Savings from holding longer $700 on a $10K gain Top combined rate (ST) 40.8% (37% + NIIT)
Key Formulas
Cost basis Shares × Buy Price + Buy Comm. Net proceeds Shares × Sell Price - Sell Comm. Gross profit Proceeds - Cost Basis + Dividends ROI % (Profit / Cost Basis) × 100 Break-even price (Cost Basis + Sell Comm) / Shares CAGR (End / Start)^(1/Years) - 1