Calqpro

How to Calculate Stock Profit and Loss (With Fees)

By Calqpro Editorial Team · April 20, 2026 · 5 min read

Formula: Net Profit = (Sell Price × Shares) − (Buy Price × Shares) − Buy Fees − Sell Fees. Always include fees — they can turn a winning trade into a losing one.

Calculating stock profit sounds simple — buy low, sell high. But real returns depend on your cost basis (including fees), how long you held the stock (affects tax rate), and what you actually net after taxes. Here's the full picture.

Step-by-Step Calculation

Example: You buy 50 shares at $120 ($6,000 total) and sell at $165 ($8,250 total). $10 buy fee, $10 sell fee.

Short-Term vs. Long-Term Capital Gains

How long you hold the stock dramatically affects your tax bill:

Holding PeriodTax RateOn $2,230 profit (22% bracket)
Under 1 year (short-term)Ordinary income rate (10–37%)~$491 tax owed
Over 1 year (long-term)0%, 15%, or 20%~$335 tax owed (15%)

Holding for just one more day past the 1-year mark can save you hundreds on a significant gain.

Break-Even Price

Your break-even price is higher than your buy price because you need to cover fees. Formula: Break-even = (Cost Basis + Sell Fee) ÷ Shares. In the example above: ($6,010 + $10) ÷ 50 = $120.40. The stock must exceed $120.40 before you make a penny.

Tax-Loss Harvesting

If you have losing positions, you can sell them to realize a loss that offsets your gains — reducing your tax bill. You can offset up to $3,000 of ordinary income per year with capital losses, with unlimited ability to offset capital gains. This is called tax-loss harvesting and is one of the most effective tax strategies for investors.

Calculate your exact stock profit, ROI, and break-even

Use the Stock Profit Calculator →

Related Calculators