๐Ÿ‡บ๐Ÿ‡ธ USC
Investing & Retirement
๐Ÿ“ˆ

Stock Profit Calculator

Net gain or loss after commissions & capital gains tax

โœ…

Last updated September 2026

Method: Cost basis = shares × buy price + buy commission. Proceeds = shares × sell price − sell commission. Profit = proceeds − cost basis, with your capital gains rate applied to a positive result. Tax treatment follows IRS Topic no. 409 (long-term rates of 0%, 15% or 20%; short-term gains taxed as ordinary income).

Included: Gross profit on the price move, buy and sell commissions, capital gains tax on the realized gain, net profit, profit per share, return on cost basis, break-even sell price and a table of profit at other sell prices.

Not included: Dividends, reinvestment, state income tax, the 3.8% net investment income tax, wash-sale adjustments, capital-loss carryovers, margin interest, currency effects and purchases made in several lots at different prices. Results are estimates, not tax or investment advice.

$
$
%
Commissions & fees (optional)

๐Ÿ“ˆ Net profit on this trade

$2,442.56net
Return 38.27% ยท 150 shares ยท price move 45.3%
Gross profit (price only)
$2,887.50
Commissions paid
$13.90
Capital gains tax
$431.04
Profit per share
$16.28
๐ŸŽฏ

Break-even sell price: $42.59

You need at least this price per share to cover your purchase cost plus both commissions. Your sell price of $61.75 is $19.16 above break-even.

๐Ÿ’ฐ Trade summary

Total cost basis
$6,381.95
Sale proceeds
$9,255.55
Profit before tax
$2,873.60
Return on cost (after tax)
38.27%
Return before tax
45.03%
Break-even price
$42.59

๐Ÿ“Š Profit at other sell prices

Same 150 shares, same buy price of $42.50, same commissions and a 15% tax rate on gains.

Sell pricePrice moveNet profitReturn
$25.50-40%-$2,564-40.2%
$34.00-20%-$1,289-20.2%
$38.25-10%-$651-10.2%
$42.500%-$14-0.2%
$46.75+10%$5308.3%
$53.13+25%$1,34321.0%
$63.75+50%$2,69842.3%
$85.00+100%$5,40784.7%

Estimate, not tax or investment advice. The tax line applies your entered rate to the realized gain only; it ignores wash sales, capital-loss carryovers, the net investment income tax and state tax. Losses are shown without a tax benefit.

Stock profit calculator: what you actually keep from a trade

A stock profit calculator turns four numbers - shares, buy price, sell price and commissions - into the figure that matters: the money left after fees and tax. Buy 150 shares at $42.50 and sell at $61.75 with $6.95 commissions each way, and the gross gain of $2,887.50 becomes a net profit of $2,442.56 once a 15% capital gains rate is applied.

That gap between the headline gain and the amount that reaches your account is the point of this page. Brokerage apps show a green percentage, but it rarely accounts for what you paid to get in, what you pay to get out, or what the IRS takes when the sale is realized. The calculator above closes all three gaps and also gives the exact price at which the trade stops losing money.

How stock profit is calculated

Every stock trade has two sides, and both cost money. Your cost basis is what you spent to own the shares, and your proceeds are what the sale actually put back in your pocket:

Cost basis = shares × buy price + buy commission
Proceeds = shares × sell price − sell commission
Net profit = (proceeds − cost basis) × (1 − tax rate)

The tax factor applies only when the trade is profitable, because a loss is not taxed. Two more numbers fall out of the same inputs. The return on cost is net profit divided by cost basis, expressed as a percentage, and the break-even sell price is the price at which proceeds exactly equal cost basis:

Break-even price = (shares × buy price + buy commission + sell commission) ÷ shares

Notice that the tax rate never appears in the break-even formula. At break-even there is no gain, so there is nothing to tax. Tax only changes how much of a profit you keep, never the price at which a profit begins.

Worked example: 150 shares from $42.50 to $61.75

Suppose you bought 150 shares at $42.50 through a broker that charges a $6.95 commission, held them for two years, and sold at $61.75 with another $6.95 commission. Because you held longer than one year, the gain is long-term and you enter a 15% rate. Step by step:

  • Cost basis: 150 × $42.50 = $6,375.00, plus the $6.95 buy commission = $6,381.95.
  • Proceeds: 150 × $61.75 = $9,262.50, minus the $6.95 sell commission = $9,255.55.
  • Gross profit on the price move: 150 × ($61.75 − $42.50) = $2,887.50.
  • Profit before tax: $9,255.55 − $6,381.95 = $2,873.60 (the two commissions cost $13.90).
  • Capital gains tax at 15%: $2,873.60 × 0.15 = $431.04.
  • Net profit: $2,873.60 − $431.04 = $2,442.56, which is $16.28 per share.
  • Return on cost basis: $2,442.56 ÷ $6,381.95 = 38.27% after tax, or 45.03% before tax.
  • Break-even sell price: ($6,375.00 + $6.95 + $6.95) ÷ 150 = $42.59.

Two things stand out. The commissions took only 0.48% of the gross gain because the position was reasonably large, while the tax took 15% of everything above break-even. And had the same shares been held for eleven months instead of two years, the gain would have been short-term: at a 24% ordinary rate the tax would be $689.66 instead of $431.04, cutting the net profit to $2,183.94 and the return to 34.22%. Waiting past the one-year mark was worth $258.62 on this single trade.

Profit at different sell prices

The table below takes a simple position - 100 shares bought at $50.00 with no commissions - and shows what each sell price produces at a 15% long-term rate. It makes the asymmetry obvious: losses arrive at full size, gains arrive shrunk by tax.

Sell price Profit before tax Tax at 15% Net profit Return
$30.00-$2,000$0-$2,000-40.0%
$40.00-$1,000$0-$1,000-20.0%
$45.00-$500$0-$500-10.0%
$50.00$0$0$00.0%
$55.00$500$75$4258.5%
$60.00$1,000$150$85017.0%
$70.00$2,000$300$1,70034.0%
$80.00$3,000$450$2,55051.0%
$100.00$5,000$750$4,25085.0%

Doubling the share price from $50 to $100 is a 100% gross move but only an 85% net return at a 15% rate. A 10% fall, meanwhile, is a full 10% loss. This is why comparing a raw price chart against your account statement is so often disappointing.

Break-even sell price and why commissions punish small trades

The break-even price is the quiet number that decides whether a trade was ever winnable. It is your buy price plus the round-trip commission spread across your shares, so it depends heavily on position size. The table below uses a $25.00 buy price and shows the break-even price for four commission levels:

Shares $0 round trip $6.95 round trip $9.99 round trip $19.90 round trip
10$25.00$25.70$26.00$26.99
25$25.00$25.28$25.40$25.80
50$25.00$25.14$25.20$25.40
100$25.00$25.07$25.10$25.20
250$25.00$25.03$25.04$25.08
500$25.00$25.01$25.02$25.04

At 10 shares, a $19.90 round trip forces the stock up 7.96% before you break even. At 500 shares the same fee is a 0.16% hurdle. Commission-free brokers have made the left column the norm for ordinary online stock orders, but broker-assisted trades, options contracts and some foreign or over-the-counter securities still carry real fees, and those are the trades where position size matters most.

Capital gains tax: which rate belongs in the box

The rate you enter should reflect how long you held the shares. The IRS separates gains into two buckets. A long-term gain comes from shares held more than one year and is taxed at 0%, 15% or 20%, with the tier depending on your taxable income and filing status. A short-term gain comes from shares held one year or less and is taxed as ordinary income at your marginal bracket, which for tax year 2025 is 10%, 12%, 22%, 24%, 32%, 35% or 37%.

The table below applies each rate to the same $5,000 gross gain on a $20,000 cost basis, so you can see how much a single classification decision is worth:

Tax rate Gain Tax Kept Net return
0% (long-term)$5,000$0$5,00025.00%
15% (long-term)$5,000$750$4,25021.25%
20% (long-term)$5,000$1,000$4,00020.00%
22% (short-term)$5,000$1,100$3,90019.50%
24% (short-term)$5,000$1,200$3,80019.00%
32% (short-term)$5,000$1,600$3,40017.00%
35% (short-term)$5,000$1,750$3,25016.25%
37% (short-term)$5,000$1,850$3,15015.75%

The same $5,000 gain is worth $5,000 to one investor and $3,150 to another, purely because of holding period and income. If your shares sit in a traditional IRA, a Roth IRA or a 401(k), enter 0%: gains inside those accounts are not taxed as they are realized, though traditional-account withdrawals are taxed later as ordinary income. For a full federal estimate including your income and filing status, run the numbers through the Capital Gains Tax Calculator.

How to use this stock profit calculator

  1. Shares: enter the number of shares in the lot you are selling. Fractional shares are fine.
  2. Buy price: the price you actually paid per share. If you bought in several lots, use your average cost per share, which your broker reports on the position.
  3. Sell price: the price you sold at, or the price you are considering. Change it repeatedly to test scenarios.
  4. Capital gains tax rate: tap 0% for a retirement account or an untaxed situation, 15% or 20% for a long-term gain, or type your ordinary bracket for a short-term gain.
  5. Commissions: open the optional panel and enter your broker's per-trade fee on each side, or use the one-tap button to set both to $0.

The results update as you type. Read the net profit headline first, then check the break-even price card and the scenario table underneath, which recomputes profit at eight sell prices around your buy price.

Who this calculator is for

  • Investors deciding whether to sell, who want to see the after-tax number before pressing the button rather than after.
  • New investors learning why a 10% price gain is not a 10% gain in the bank.
  • Active traders checking how much of a small move survives a round-trip commission on a small position.
  • Anyone reconciling a 1099-B, comparing the broker's reported proceeds and cost basis against their own arithmetic.
  • People planning a tax year, testing what a sale in December at short-term rates costs versus a sale after the one-year mark.

A second worked example: a losing trade

Losses work differently, and the calculator reflects that. Say you bought 200 shares at $88.00 with no commission, a cost basis of $17,600.00, and sold at $71.40 for proceeds of $14,280.00. Your loss is $3,320.00, which is $16.60 per share and a return of -18.86%. No tax is owed, and the calculator shows the loss at full size with a $0 tax line.

In your actual return the loss is not wasted. Under IRS rules a capital loss first offsets capital gains for the year. If losses exceed gains, you may deduct up to $3,000 of net capital loss against ordinary income per year ($1,500 if married filing separately) and carry the remainder forward indefinitely. In this example, $3,000 could offset ordinary income this year and $320 would carry to the next. The calculator deliberately does not model that benefit, because it depends on your other gains, and because the wash-sale rule can disallow the loss entirely if you repurchase the same or a substantially identical security within 30 days before or after the sale.

Key terms explained

  • Cost basis: what you paid for the shares including the buy commission. It is the figure subtracted from proceeds to compute a taxable gain, and it appears on your broker's Form 1099-B.
  • Proceeds: the cash the sale produced after the sell commission was deducted.
  • Realized gain: a gain that exists because you sold. Until then the gain is unrealized and not taxable.
  • Holding period: the time between the day after purchase and the sale date. More than one year makes the gain long-term.
  • Break-even price: the sell price at which profit is exactly zero after both commissions.
  • Return on cost: profit divided by cost basis. It answers "how hard did my money work?" rather than "how many dollars did I make?"
  • Wash sale: a loss sale followed by repurchase of the same or a substantially identical security inside a 30-day window, which the IRS disallows for that year.

What changes the result the most

  • The price move: by far the biggest lever. Everything else adjusts a number the price already decided.
  • Holding period: crossing one year can move the rate from 24% to 15%, which on a $5,000 gain is worth $450.
  • Position size versus commissions: a fixed fee is a rounding error on 500 shares and a serious hurdle on 10.
  • Account type: the same trade inside a Roth IRA has no capital gains tax at all, so enter 0%.
  • Your taxable income: it determines whether your long-term rate is 0%, 15% or 20%, and which ordinary bracket applies to a short-term gain.
  • State tax: several states tax capital gains as ordinary income. Add your state rate to the federal rate for a combined figure.

Tips for keeping more of the gain

  • Watch the calendar. If a position is a few weeks short of one year and you have no urgent reason to sell, the long-term rate is usually the single largest saving available on the trade.
  • Match gains with losses. Realizing a loss in the same tax year as a gain reduces the net amount taxed, which is why many investors review losers before year end.
  • Use tax-advantaged accounts for high-turnover ideas. Frequent trading in a taxable account converts most gains into short-term income.
  • Do not trade small positions at a per-trade fee. If your broker charges commissions, size the position so the round trip is a fraction of a percent.
  • Check your cost basis method. When you sell part of a holding bought in several lots, which lot the broker sells changes the gain, and therefore the tax.

Limitations and assumptions

  • It models one buy and one sell at a single price each. Multiple purchase lots need an average cost per share.
  • It applies your rate as a flat percentage of the gain and does not model bracket boundaries, the standard deduction, or the point at which a long-term gain moves from 0% to 15%.
  • It excludes the 3.8% net investment income tax that applies to investment income above certain modified adjusted gross income thresholds.
  • It excludes state and local income tax, which several states apply to capital gains.
  • It gives a loss no tax benefit, since the value of a loss depends on your other gains and on the wash-sale rule.
  • It ignores dividends, reinvestment, margin interest, currency conversion and bid-ask spread.

Which calculator should you use?

Several tools on this site answer neighboring questions about the same trade. Use this page when you want the dollars and cents of a completed or planned sale, commissions and tax included. Use the Stock Return Calculator when you also collected dividends and want a total return and an annualized (per-year) figure, which is the fair way to compare a two-year hold against a five-year one. Use the Stock Average Calculator first if you bought in several lots and need the average cost per share to type into the buy-price field. Use the Capital Gains Tax Calculator when the tax itself is the question and you want your bracket worked out from income and filing status. For income from shares you are keeping rather than selling, the Dividend Calculator and the Dividend Yield Calculator cover the payout side, while the ROI Calculator and the Investment Calculator handle general return and growth questions beyond a single stock.

Sources

โš ๏ธ Common mistakes & edge cases

Treating the price gain as the profit

A $2,887.50 price gain became $2,442.56 in the example above once commissions and a 15% rate were applied. Always read the net line, not the green percentage in the app.

Using the wrong tax rate for the holding period

Shares held one year or less are taxed as ordinary income, not at 15%. Entering a long-term rate on a short-term trade can understate the tax by hundreds of dollars.

Forgetting the buy commission in the cost basis

The fee you paid to buy is part of what the shares cost you. Leaving it out inflates both the reported gain and the tax you calculate on it.

Averaging lots incorrectly

If you bought at $30, $45 and $60, the buy price is not $45 unless you bought equal share counts. Use a share-weighted average cost, which your broker reports on the position.

Assuming a loss always cuts your tax bill

The deduction against ordinary income is capped at $3,000 per year, and a repurchase within 30 days can disallow the loss entirely under the wash-sale rule.

Ignoring state tax and the 3.8% surtax

The rate box here is a single federal number. Several states tax capital gains as income, and higher earners may also owe the net investment income tax on top.

Note: This calculator is an estimate, not tax or investment advice. Your actual tax depends on your income, filing status, state and other gains and losses for the year.

❓ Frequently asked questions

How do you calculate profit on a stock?

Profit is what you got out minus what you put in. Sale proceeds are shares x sell price minus the sell commission; your cost basis is shares x buy price plus the buy commission. Subtract cost basis from proceeds and you have the profit before tax. Apply your capital gains rate to a positive result and you have the net profit you actually keep.

What is the break-even price on a stock trade?

The break-even sell price is (shares x buy price + buy commission + sell commission) divided by the number of shares. It is the price at which your sale exactly repays your purchase cost and both commissions, leaving zero profit and zero tax. Selling one cent above it produces a gain; selling below it locks in a loss.

Does this stock profit calculator include commissions?

Yes. You enter a commission for the buy side and one for the sell side, and the calculator adds the buy fee to your cost basis and subtracts the sell fee from your proceeds, exactly the way a brokerage does. Most large U.S. brokers now charge $0 for online stock trades, so you can set both fields to zero with one button.

What tax rate should I enter for capital gains?

It depends on how long you held the shares. The IRS taxes a long-term gain (shares held more than one year) at 0%, 15% or 20% depending on your taxable income and filing status. A short-term gain (one year or less) is taxed as ordinary income, so enter your marginal federal rate, which for 2025 is 10%, 12%, 22%, 24%, 32%, 35% or 37%. Add state tax if your state taxes capital gains.

What is the difference between gross profit and net profit on a stock?

Gross profit is only the price move: shares x (sell price minus buy price). Net profit subtracts both commissions and the tax on the gain. On 150 shares bought at $42.50 and sold at $61.75 with $6.95 commissions each way and a 15% rate, the gross profit is $2,887.50 but the net profit is $2,442.56, a difference of $444.94.

How do I calculate return on a stock trade as a percentage?

Divide the profit by your cost basis and multiply by 100. Using the example above, $2,442.56 divided by $6,381.95 is 38.27%. Dividing by cost basis rather than by the purchase amount alone is the honest version, because the buy commission was money you had to spend to own the shares.

Is a stock loss tax deductible?

A realized capital loss first offsets your capital gains for the year. If losses exceed gains, the IRS lets you deduct up to $3,000 of net capital loss against ordinary income per year ($1,500 if married filing separately) and carry the rest forward to future years indefinitely. This calculator does not credit a loss with any tax benefit, so a loss result is shown at its full pre-tax size.

What is the wash sale rule?

If you sell a security at a loss and buy the same or a substantially identical security within 30 days before or after the sale, the IRS disallows the loss on that year's return. The disallowed amount is added to the cost basis of the replacement shares instead. It is one reason a loss shown here may not reduce your tax bill in the year you expect.

Does the calculator include dividends?

No. This page measures the profit on the trade itself: buy price, sell price, commissions and tax. If you collected dividends while holding the shares, add them separately, or use the Stock Return Calculator, which folds dividend income into a total return and an annualized figure.

How much do commissions really cost on a small trade?

They matter most when the position is small. A $19.90 round trip on 10 shares bought at $25.00 raises the break-even price to $26.99, so the stock must gain about 8% before you make a cent. The same $19.90 on 500 shares moves break-even only to $25.04, a hurdle of about 0.16%.

Do I owe tax on a stock that went up but that I have not sold?

No. A gain is only taxable when it is realized, meaning when you actually sell. Unrealized gains on shares you still hold are not reported on your return. That is why this calculator asks for a sell price: the tax line applies only to a completed sale.

Can I use this for ETFs, options, or crypto?

The arithmetic works for anything you buy in units at one price and sell at another, so ETFs and mutual fund shares fit directly. Options contracts usually need a multiplier of 100 per contract, so enter the total number of underlying shares. Digital assets are treated as property by the IRS, so the same gain and loss math applies, but the reporting rules differ.

๐Ÿ’ก Good to know

One year and one day is the line that matters

The IRS counts the holding period from the day after you bought. Selling on day 366 rather than day 365 can move the same gain from an ordinary bracket to a 0%, 15% or 20% long-term rate.

A gain is only taxable once it is realized

Paper gains on shares you still own are not reported. Tax arrives with the sale, which is why the sell price field is what switches the tax line on in this calculator.

Break-even is a fixed number, tax is not

Commissions decide the price at which you start making money; the tax rate only decides how much of the gain above that price you keep. Knowing both before you sell keeps the decision honest.

Related Calculators