Stock Profit Calculator (Long and Short, With Fees)

Enter your shares, buy price and sell price to see your profit or loss in dollars and percent, including fees. Works for long and short trades. It runs in your browser; nothing is sent anywhere.

Net profit / loss
–
Return on cost
–
Gross profit / loss
–
Position cost
–
Per share
–
Break-even exit
–

How stock profit is calculated

Long trade: profit = (sell price − buy price) × shares − fees.

Short trade: profit = (short sale price − buy-to-cover price) × shares − fees.

Return % is net profit divided by what the position cost at entry (entry price × shares).

Example

You buy 500 shares at $4.20 and sell at $4.65, paying $2 in total fees.

  • Gross profit: ($4.65 − $4.20) × 500 = $225
  • Net profit: $225 − $2 = $223
  • Position cost: $4.20 × 500 = $2,100
  • Return: $223 ÷ $2,100 = 10.62%
  • Break-even exit: $4.20 + $2 ÷ 500 = $4.204

What the calculator doesn’t include

  • The spread. If you enter the prices you actually got filled at, the spread is already included. If you enter the last price you saw, your real result will usually be a bit worse. See bid-ask spread.
  • Taxes. These depend on your country, account type and holding period.
  • Currency conversion. If your account is in another currency, conversion fees reduce the result.
  • Borrow costs on shorts, unless you add them to the fees box.

Profit is only half of it

A trade’s profit means more next to what you risked. A $223 gain that risked $100 is a +2.2R trade; the same gain that risked $1,000 is only +0.22R. Before entering, size the trade from your stop with the position size calculator, and check the risk/reward ratio.

More free tools: stock average calculator · risk of ruin calculator · position size calculator

Checking the numbers by hand

Every result can be checked with a few formulas. For a long trade (buy first, sell later):

  • Cost of the position = buy price × shares + buy fees
  • Proceeds = sell price × shares − sell fees
  • Profit or loss = proceeds − cost
  • Return % = profit ÷ cost × 100
  • Break-even sell price = (cost + sell fees) ÷ shares

For a short trade (sell first, buy back later), the order flips: profit = (sell price − buy-back price) × shares − all fees, and any borrow or locate fees count as costs too.

Three worked examples

The numbers are hypothetical.

1. A small winning day trade

You buy 400 shares at $3.15 and sell at $3.42. Fees are $1.00 each way.

  • Cost: 400 × $3.15 + $1.00 = $1,261.00
  • Proceeds: 400 × $3.42 − $1.00 = $1,367.00
  • Profit: $106.00, a return of about 8.4% on the money used

2. The same trade with real slippage

You meant to buy at $3.15 but got $3.17, and meant to sell at $3.42 but got $3.39.

  • Cost: 400 × $3.17 + $1.00 = $1,269.00
  • Proceeds: 400 × $3.39 − $1.00 = $1,355.00
  • Profit: $86.00. Five cents of slippage cost $20, almost a fifth of the profit.

3. A losing trade on a cheap stock

You buy 5,000 shares at $0.42 and sell at $0.38. Your broker charges $0.002 per share, about $10 each way.

  • Cost: 5,000 × $0.42 + $10 = $2,110
  • Proceeds: 5,000 × $0.38 − $10 = $1,890
  • Loss: −$220. Per-share fees on large share counts add up quickly on sub-$1 stocks.

Why the break-even price matters

Before you enter, it helps to know how far the stock must move just to cover costs. In example 1, the break-even sell price is ($1,261 + $1) ÷ 400 = $3.155, half a cent above the entry. That sounds tiny, but on a stock with a two-cent spread you start the trade about two cents down, so the real hurdle is closer to $3.17. Run the numbers in the trading cost calculator to see what spreads and fees do over a month.

If you bought in more than one piece

Use your average price per share as the buy price. If you bought 200 shares at $3.10 and 200 at $3.20, your average is $3.15 on 400 shares. The stock average calculator does this for you, including fees.

Frequently asked questions

Does the calculator include taxes?

No. Tax depends on where you live and your situation. Treat the result as profit before tax.

Why is my broker’s P&L different?

Your broker may include fees differently, use your average cost across several fills, or show unrealised P&L at the current price. Check the individual executions.

Can I use it for short trades?

Yes, if you enter the sell price as the entry and the buy-back price as the exit, and add any borrow or locate fees to the fees.

Is the return % the same as my account return?

No. The return here is on the money used in the trade. Your account return is the profit divided by your whole account.

Educational tool only, not financial advice.

Leave a Comment

Your email address will not be published. Required fields are marked *