Free stock tool

Stock profit calculator for long and short positions

Enter the number of shares, entry and exit prices, and both commissions to calculate a stock trade’s net profit or loss and return on entry capital. Long and short positions are supported.

The result is intentionally based on the trade itself. It does not mix in dividends, tax, borrow charges or portfolio deposits, which need separate records and can vary by account and jurisdiction.

Calculate stock profit or loss

Position
Capital at entry
$6250.00
Net profit / loss
+$848.00
Return on investment
13.57%
Before tax and dividends.

Stock profit and return formulas

For a long position, gross profit is (exit price − entry price) × shares. For a short position, the price difference is reversed. Net profit subtracts entry and exit commissions. Return on investment is net profit ÷ entry value × 100, where entry value is entry price multiplied by shares.

If 50 shares are bought at $125 and sold at $142, entry capital is $6,250 and gross profit is $850. With a $1 commission on each side, net profit is $848 and the return on entry capital is 13.57%. The displayed return is not annualised and does not account for cash held elsewhere in the portfolio.

Why fees still belong in the calculation

Zero-commission marketing does not mean every trade has zero cost. Regulatory fees, spread, currency conversion and short borrow charges may still appear. Enter the known trade commissions here and use the final broker statement for the authoritative result. For active strategies, small costs repeated hundreds of times can turn an attractive gross edge into a weak net one.

Do not confuse trade return with account return

A 10% gain on one small position is not a 10% gain on the account. Portfolio return depends on how much total capital was available and for how long. The calculator reports the position result so trades can be compared consistently; your journal and broker statement should retain deposits, withdrawals, dividends and other account-level events.

Turn the number into evidence

One result says almost nothing about a strategy. Log a meaningful sample and compare win rate, average win, average loss and profit factor by setup. Edgelog is currently focused on MT4/MT5, crypto exchange and file-import workflows, so it does not claim broad automatic stock-broker sync. Stock trades can still be reviewed when supplied through a compatible CSV or Excel import.

Use the position size calculator before entry and the profit factor calculator after a sample. This calculator is educational, not tax or investment advice.

Frequently asked questions

QDoes this stock calculator include commissions?

Yes. Enter entry and exit commissions separately and both are deducted from gross P&L.

QCan I calculate a short sale?

Yes. Select Short; the result treats a lower exit price as a gain and a higher exit as a loss.

QAre dividends and taxes included?

No. Dividend income, withholding, capital-gains tax and short borrow costs vary and must be handled separately.

QIs return on investment annualised?

No. It is the net trade result divided by the value of the shares at entry, without a time adjustment.

Log your trades. Master your edge.

Free for forex and crypto traders — up to 3 connected accounts and 50,000 stored trades, with MT4/MT5 auto-sync, exchange import, and full analytics.

Create your free journal