Did a stock trade actually make money once both trading fees are counted? Enter the share quantity, buy price, sell price and the total buy and sell fees. The result is a before-tax, one-lot estimate: it does not include dividends, taxes or tax-lot rules.
For a hypothetical trade, buying 100 shares at $40 with a $5 buy fee and selling all 100 at $50 with a $7 sell fee leaves a $988 before-tax profit, not $1,000.
Stock profit calculator
This calculator runs in your browser. This calculator’s code does not send, save, or track your entries. All dollar amounts are USD.
Optional example: Inputs start blank. Load example fills hypothetical figures without calculating. Examples are not current rates, quotes, or recommendations.
Loading calculator. No entries are submitted.
Inputs start blank; Load example fills in the hypothetical figures above. The calculator does not retrieve prices, predict returns, recommend a stock or estimate taxes.
What do you enter in the stock profit calculator?
Use the same share quantity on both sides. Fractional shares are supported, but the tool models one long position: you buy shares and later sell that entire quantity.
Enter the actual execution prices if you are reviewing a completed trade, or your own assumed prices for a scenario. An assumed sell price is a what-if input, not a forecast.
The fee fields are separate total dollar amounts. A $5 purchase commission goes in buy fees, and a $7 sale charge goes in sell fees. They are not percentages or per-share fees.
If a broker quotes a per-share charge, multiply it by the quantity first. If a fee depends on sale value, enter your expected total and remember that the break-even result holds that total constant.
Which trading costs belong in the fee fields?
The SEC’s investor bulletin on fees separates transaction fees, charged each time you buy or sell, from ongoing fees such as account maintenance or advisory fees that you pay even without a trade. This calculator only models the two transaction totals you type in.
The same bulletin notes that some brokerage fees may not be obvious from an account statement or confirmation. A zero-commission label is therefore not proof that every cost is zero. Check the firm’s fee schedule and the trade confirmation for the amounts you enter.
How much does a hypothetical 100-share trade make?
Inputs. 100 shares, a $40 buy price, a $5 total buy fee, a $50 sell price and a $7 total sell fee. All values are hypothetical.
Formula. Full initial investment is shares × buy price + buy fee. Net sale proceeds are shares × sell price − sell fee. Profit is the difference.
| Item | Calculation | Amount |
|---|---|---|
| Share purchase | 100 × $40 | $4,000.00 |
| Buy-side fee | Added to purchase cost | $5.00 |
| Full initial investment | $4,000 + $5 | $4,005.00 |
| Gross sale value | 100 × $50 | $5,000.00 |
| Sell-side fee | Subtracted from sale value | $7.00 |
| Net sale proceeds | $5,000 − $7 | $4,993.00 |
| Before-tax profit | $4,993 − $4,005 | $988.00 |
| Return on full investment | $988 ÷ $4,005 × 100 | 24.67% |
Result. The share price rose 25%, but the modeled return is 24.67%. Buying required $4,005, not $4,000, and both fees reduce profit.
What to check. Using only the $4,000 share cost as the denominator answers a different question. This calculator counts the buy fee as part of the money initially committed, so compare it only with returns measured the same way.
What sell price gets you back to break-even?
In the same hypothetical trade, break-even is ($4,005 + $7) ÷ 100 = $40.12 per share. At that price, gross sale value is $4,012, proceeds after the $7 fee are $4,005, and before-tax profit is zero.
Selling at the original $40 price would instead lose the combined $12 of fees. The break-even price is a mathematical threshold, not an order price that a market is certain to fill. Actual price increments, execution and fees may differ.
Which return percentage are you looking at?
| Measure | What it includes | What this calculator does |
|---|---|---|
| Share-price change | Buy and sell price only | Uses those prices, but does not label their change as your final return |
| Holding-period return on full investment | Price profit or loss and entered trading fees | Reports this before taxes, excluding dividends |
| Annualized or after-tax return | Holding time or applicable tax treatment | Does not calculate either |
A return earned over one month and the same return earned over several years are not equivalent annual performance, even though this tool reports the same holding-period percentage for both.
How is this different from a taxable gain or loss?
The IRS describes a capital gain or loss as the difference between your adjusted basis and the amount you realize from the sale. Its Publication 551 says the basis of stock you buy is generally the purchase price plus costs of purchase, such as commissions and transfer fees.
That is why the calculator adds the buy fee to the initial investment. Still, the result is an economic cash-in, cash-out estimate, not a tax figure. Basis can be adjusted for later events, and your broker’s tax statements may show different amounts.
Holding time also matters for taxes. The IRS says a gain or loss is generally long-term if you held the asset for more than one year and short-term if you held it one year or less. This calculator does not ask for dates, so it cannot classify the result.
How the calculator handles inputs and rounding
Let Q be shares, B the buy price, S the sell price, Fb the total buy fee and Fs the total sell fee.
- Initial investment: Q × B + Fb.
- Net sale proceeds: Q × S − Fs.
- Before-tax profit or loss: net sale proceeds − initial investment.
- Return: profit ÷ initial investment × 100, when initial investment is positive.
- Break-even sell price: (initial investment + Fs) ÷ Q, when Q is positive.
The displayed break-even price is rounded to four decimal places. Zero shares with zero fees produces no trade and no defined break-even price. Zero initial investment has no defined percentage return.
If sale fees exceed gross proceeds, the result can show negative proceeds and a loss worse than 100%. That reflects the entered cash costs, not leverage.
When does this calculator not fit your trade?
- You sold only part of a position or bought in several lots. The tool does not choose FIFO, specific identification or another basis method, and it does not handle wash sales.
- Dividends are part of the question. Dividends and reinvested shares are excluded. For cash income from holding shares, use the separate stock dividend calculator.
- The trade used margin, a short sale, options or another currency. Margin interest, borrowing costs, option premiums and currency conversion are not modeled.
- A corporate action changed the share count. Splits and similar events change quantity and per-share basis, so enter post-event figures consistently or use a split-specific tool first.
The SEC’s stock overview reminds investors that stock prices move down as well as up and that money invested in stocks can be lost. A positive scenario in this calculator is not evidence that a future profit is likely.
Quick decision checklist
- Confirm the share quantity bought and sold is the same single lot.
- Convert per-share or percentage fees into total dollar amounts for each side.
- Compare returns only with figures that use the same denominator, including the buy fee.
- Check the broker’s confirmation and tax statements before using any figure for taxes.
- Note the purchase and sale dates separately, since the calculator ignores holding time.
Sources and calculation review
- SEC Investor.gov: How Fees and Expenses Affect Your Investment Portfolio, transaction versus ongoing fees and less obvious brokerage fees.
- SEC Investor.gov: Stocks, dividends, price declines and risk of loss.
- IRS Topic No. 409, Capital Gains and Losses, adjusted basis, amount realized and the one-year holding-period line.
- IRS Publication 551, Basis of Assets, stock basis generally including commissions and transfer fees.
Sources checked September 28, 2026. The worked example and break-even figures were recalculated by hand and in the calculator. Educational calculations only, not investment or tax advice.
Prepared with AI-assisted research, drafting, and calculation checks. Not independently reviewed by a human financial professional.