Trade outcome estimate

Stock Profit and Loss Calculator

Estimate a stock trade’s investment cost, net sale proceeds, capital-gains tax, and final profit or loss after commissions.

Trade inputs

Enter purchase, sale, fee, and tax details

Stock P/L
shares
$
$
%
$
$
Trade summary

Estimated profit or loss

Your trade estimate will appear here

Enter shares, buy and sell prices, commissions, and the assumed capital-gains tax rate.

How Is Stock Profit or Loss Calculated?

A stock trade’s profit depends on more than the change in share price. This calculator adds a fixed buy commission to purchase cost, subtracts a fixed sell commission from sale proceeds and applies your chosen tax percentage only to a positive resulting trade gain.

It returns estimated net profit or loss, total investment, net sale proceeds, return on investment and a break-even sell price. It models one purchase and one sale of the same share quantity. It does not forecast prices, include dividends or determine actual tax liability across multiple trades.

How to Enter a Stock Trade, Fees and Tax Rate

  1. Enter Number of shares as a positive quantity. Fractional shares are accepted; the form minimum is 0.00000001.
  2. Enter a positive Purchase price per share and a nonnegative Sell price per share in dollars.
  3. Enter Capital gains tax rate as your assumed percentage from 0 to 100. The tool does not select a legal rate.
  4. Enter Buy commission and Sell commission as total fixed dollar charges for the trade, not per-share charges or percentages. Use 0 for no commission.
  5. Select Calculate trade result. Review Net profit or loss, return, tax and the fee-inclusive break-even price.

Share count, each price and each commission cannot exceed 1000000000000. Keep all dollar amounts on the same basis. The same quantity is used for both transaction legs, so partial sales, multiple purchase lots, splits and currency conversion require separate work.

The calculator computes the full trade before rounding returned amounts to cents and return to two decimals. Outcome uses the unrounded net result; a very small gain or loss can therefore display $0.00 while retaining a nonzero sign label. Extreme products remain limited by native numeric precision.

Stock Profit, Return and Break-Even Formulas

Investment I = shares N × buy price B + buy commission Cᵇ

Net sale proceeds S = N × sell price P − sell commission Cˢ

Gain before modeled tax G = S−I

Modeled tax T = max(G,0) × tax rate/100

Net result K = G−T; trade return (%) = K/I × 100

Break-even sell price = (I+Cˢ)/N

The Gross profit or loss card already includes both commissions; “gross” here means before the modeled tax, not before fees. Net buy price per share is B+Cᵇ/N, while net sell price per share is P−Cˢ/N.

The break-even formula covers the initial investment and the fixed sale commission. It assumes no tax on a zero gain and no price-dependent commission. Return is for the whole modeled trade, not an annualized rate. At a 100% assumed tax rate every positive gain becomes zero net profit, so the displayed cost-recovery threshold is not a unique zero-result price in that boundary case.

Investor.gov: How Fees and Expenses Affect Your Investment Portfolio explains the underlying concepts. Field limits, supported modes and rounding above describe this calculator’s implementation.

Shares, Trade Prices, Commissions and Results

Number of shares
Positive common quantity bought and sold; fractional quantities are allowed.
Purchase and sell prices
Dollar amounts per share, before the separate fixed commissions.
Capital gains tax rate
Flat illustrative percentage applied only to this trade’s positive fee-adjusted gain.
Buy and sell commissions
Total dollar fees for the respective transaction legs.
Net profit or loss and trade outcome
Featured after-modeled-tax result and its unrounded sign.
Return on investment
Net result divided by purchase cost including the buy commission.
Investment, sale value and gross result
Fee-inclusive cost, sale proceeds after sell commission and their pretax difference.
Estimated tax
No positive charge on a loss; no modeled tax credit for that loss.
Break-even and per-share references
Cost-recovery sale price and commissions allocated per share, rounded to cents.

Stock Profit Worked Example

Illustrative example. Buy 80 shares at $32.50 and sell them at $41. Use a $12 total buy commission, an $18 total sell commission and an illustrative 20% tax rate on positive gain. Investment is 80 × 32.50 + 12 = $2612, and net sale proceeds are 80 × 41 − 18 = $3262.

The gain before modeled tax is 3262 − 2612 = $650. Tax is 650 × 0.20 = $130, leaving $520 net profit. Trade return is 520/2612 × 100 ≈ 19.91%. The unrounded break-even price is (2612 + 18)/80 = $32.875, displayed as $32.88. Substituting $32.875 gives proceeds of $2612 and zero gain before tax.

Calculation check. These illustrative values were checked independently against the formula and calculator response. Retain unrounded intermediate values when checking approximations.

Stock Profit Worked Example
QuantityValue
Total investment$2,612.00
Net sale proceeds$3,262.00
Gain before modeled tax$650.00
Illustrative tax$130.00
Net profit$520.00
Trade return19.91%
Break-even sell price$32.88, rounded

Price Gain, Fee-Adjusted Gain and Net Return

Each step changes the meaning of the result. The calculator’s Gross profit or loss label refers to the fee-adjusted pretax row, while the featured card shows the last row.

Price Gain, Fee-Adjusted Gain and Net Return
MeasureExample calculationValue
Price-only change80 × (41−32.50)$680
Fee-adjusted gain680−12−18$650
Modeled positive-gain tax650 × 20%$130
Net trade result650−130$520
Return denominator80 × 32.50 + 12$2,612

How to Interpret Net Trade Return and Break-Even

A positive net result means proceeds cover purchase cost, both entered commissions and the assumed tax. A negative result means the modeled trade loses money. A high sell price can still leave a loss if fees are sufficiently large.

The estimated tax is a simple scenario charge, not a tax return. Actual treatment may depend on jurisdiction, holding period, adjusted basis, other gains and losses and special rules. U.S. IRS guidance illustrates those distinctions; it does not make the entered flat rate legally correct for every investor.

Compare trade return with alternatives only after considering timing, dividends, risk and omitted charges. This form has no holding-period input and cannot annualize performance. The break-even price is an arithmetic reference, not advice to hold or sell, a forecast or a guarantee that a trade can execute at that price.

Common Stock Profit Calculation Mistakes

  • Entering per-share or percentage commissions instead of fixed total fees.
  • Adding commissions again to results that already include them.
  • Treating Gross profit or loss as a before-fees amount.
  • Expecting a modeled tax credit on a loss.
  • Calling the trade return an annual return without a holding period.
  • Using a flat scenario tax estimate as the final legal liability for all holdings.

Frequently Asked Questions

How are stock profit and loss calculated here?

Subtract fee-inclusive purchase cost from sale proceeds after the sell commission, then subtract your assumed tax on any positive resulting gain.

Are commissions entered per share or for the whole trade?

Enter a fixed total dollar buy commission and a fixed total dollar sell commission. The calculator allocates them per share for its reference outputs.

Does Gross profit or loss exclude commissions?

No. In this calculator that card includes both commissions and excludes only the modeled tax. The name describes a pretax trade result, not a before-fees price gain.

Is estimated tax charged on a loss?

No. The model charges tax only when the fee-adjusted trade gain is positive. It also gives no tax credit for a loss or offsets against other trades.

What does the break-even sell price include?

It covers the purchase price, buy commission and fixed sell commission for the entered quantity. It assumes no tax at zero gain and rounds the reference price to cents.

Is return on investment annualized?

No. It is net trade result divided by total investment, including the buy commission. The form has no holding-period input for annualization.

Can I use fractional shares or a zero sell price?

Yes. Share quantity must be positive, purchase price positive and sell price nonnegative. Use the same quantity for the modeled purchase and sale.

Does this calculate my actual capital gains tax bill?

No. It uses one flat rate supplied by you. Actual tax treatment can depend on holding period, basis, jurisdiction, other trades and special rules that are not modeled.

Sources and References