palpha.Try demo ↗
Home / Blog / Field notes

How to calculate stock profit after fees.

Reconcile sale proceeds, the original cost and dividends. Follow a partial sale and learn why the realized gain can differ from the full position’s return.

By palpha. ·

Write down the purchase cost

A purchase of 40 shares at $25 costs $1,000. A $4 entry fee raises the cost to $1,004, or $25.10 per share. A frequent error is to subtract the purchase fee from the cost, which overstates the profit.

Separate the portion you sold

Sell 15 shares at $29 with a $3 exit fee. You receive $432. The assigned purchase cost is 15 × $25.10 = $376.50. Your realized profit is $55.50. The other 25 shares still carry $627.50 of original cost.

Reconcile the whole position

If the remaining 25 shares are also marked at $29, their value is $725 and the open gain is $97.50. Add $55.50 and you get $153. Check it a second way: $432 cash + $725 stock − $1,004 initial cost.

Include income once

A separate $20 cash dividend raises the total to $173 before tax. Reinvested dividends need different handling because the new shares are already part of the ending value. This example uses one purchase. Tax reporting for multiple lots depends on local rules.

Further reading · FINRA · Return and rate of return ↗

Educational simulations only. Prices, returns and prizes are fictional. No investment advice or real trading.